Don't know how, but I've managed to get away with never having to get a cgi script working for about the last 8 years. Now I do.
I enabled CGI in hpshere and set .cgi as one of the file extensions.
I uploaded a small file hello.cgi into my root directory.
It's just
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>\n";
If I go to mydomaincom/hello.cgi it shows me 'Hello World' in H1. No problem.
If I include it in another file like this:
<!--#include file="hello.cgi"-->
it shows me the Perl script as above, and doesn't try to parse the script at all.
So it includes the file, but doesn't try to interpret it, just displays it all as text, including the '#!/usr/local/bin/perl' part etc.
What am I doing wrong? Can Perl scripts be included like this on JH servers? I have files from another host to try to get working, so I know this format is possible elsewhere.
('SSI Exec Enable' is enabled in hsphere.)
I enabled CGI in hpshere and set .cgi as one of the file extensions.
I uploaded a small file hello.cgi into my root directory.
It's just
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>\n";
If I go to mydomaincom/hello.cgi it shows me 'Hello World' in H1. No problem.
If I include it in another file like this:
<!--#include file="hello.cgi"-->
it shows me the Perl script as above, and doesn't try to parse the script at all.
So it includes the file, but doesn't try to interpret it, just displays it all as text, including the '#!/usr/local/bin/perl' part etc.
What am I doing wrong? Can Perl scripts be included like this on JH servers? I have files from another host to try to get working, so I know this format is possible elsewhere.
('SSI Exec Enable' is enabled in hsphere.)