petersonryanace
01-28-2004, 06:34 PM
The answer is not chmod... i don't think.
I'm getting started with cgi and perl in order to do something with some forms in html. Non-interactive sites are boring! I've started at ground level doing some basic hello world stuff. I've found the tutorial here (http://www.troubleshooters.com/codecorn/littperl/perlhelo.htm) to be most helpful in stating my problem.
I can run a hello world perl script and a cgi script, i can dump the perl output to a html file that loads (although the content-type line appears in the browser still which is troubling), i can run cgi file using ./ notation or perl filename.cgi. But, when I try to start with an html page, something like this:
Content-type: text/html
<P><A HREF="hello.cgi">RUN hello.cgi</A>.</P>
Clicking the link only links me to a text version of the hello.cgi file, it doesn't execute the script. Sounded like it had to be a chmod problem so i did chmod 755 hello.cgi, reloaded the webpage and clicked the link. Same result. Where is the problem? Browser, perl, cgi, html, or something else. Admittedly, I am running on some odd SGI machines for the most part but the perl and cgi work fine on their own.
Any help getting me off the ground would be great.
Ace
I'm getting started with cgi and perl in order to do something with some forms in html. Non-interactive sites are boring! I've started at ground level doing some basic hello world stuff. I've found the tutorial here (http://www.troubleshooters.com/codecorn/littperl/perlhelo.htm) to be most helpful in stating my problem.
I can run a hello world perl script and a cgi script, i can dump the perl output to a html file that loads (although the content-type line appears in the browser still which is troubling), i can run cgi file using ./ notation or perl filename.cgi. But, when I try to start with an html page, something like this:
Content-type: text/html
<P><A HREF="hello.cgi">RUN hello.cgi</A>.</P>
Clicking the link only links me to a text version of the hello.cgi file, it doesn't execute the script. Sounded like it had to be a chmod problem so i did chmod 755 hello.cgi, reloaded the webpage and clicked the link. Same result. Where is the problem? Browser, perl, cgi, html, or something else. Admittedly, I am running on some odd SGI machines for the most part but the perl and cgi work fine on their own.
Any help getting me off the ground would be great.
Ace