Hello,
This is a basic question but I could not find any other post answering this and hence I am posting it.
My perl script is simple and it looks like this:
====
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "banana";
====
The HTML file looks like this:
=======
<html>
<body>
apple <br>
<!--#exec cgi="/cgi-bin/test.pl"-->
orange <br>
</body>
</html>
========
However, when the HTML file is rendered on a browser, it does not display the "banana" part.
The strange part is that when the perl script is run standalone on the browser using the following URL, it works:
My question is:
1. Do I need any Apache webserver settings to make this happen? What settings are they?
2. Does it need any perl module to be installed at the webserver to make this happen? What are they?
3. Are there any other issues that will make this run?
I have been struggling with this for quiet some time. Any help would be much appreciated.
Regards
Shantanu
This is a basic question but I could not find any other post answering this and hence I am posting it.
My perl script is simple and it looks like this:
====
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "banana";
====
The HTML file looks like this:
=======
<html>
<body>
apple <br>
<!--#exec cgi="/cgi-bin/test.pl"-->
orange <br>
</body>
</html>
========
However, when the HTML file is rendered on a browser, it does not display the "banana" part.
The strange part is that when the perl script is run standalone on the browser using the following URL, it works:
My question is:
1. Do I need any Apache webserver settings to make this happen? What settings are they?
2. Does it need any perl module to be installed at the webserver to make this happen? What are they?
3. Are there any other issues that will make this run?
I have been struggling with this for quiet some time. Any help would be much appreciated.
Regards
Shantanu