Closed p5pRT closed 21 years ago
Hi\, I have software perl-5.005_03-sol26-sparc-local.gz for installing Perl on Solaris2.6/Sparc . I performed in followed step by step :
#gzip -d perl-5.005_03-sol26-sparc-local.gz #pkgadd -d perl-5.005_03-sol26-sparc-local This step is ended successfully complete with binary code in /usr/local/bin However \, when i test Perl program in CGI on WebServer Apache that is also on this Ultra10/Sparc machine with URL : http://142.152.212.12/cgi-bin/test.pl and the file test.pl contains first line as " #!/usr/local/bin/perl " . It results error messages on browser as : " Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator\, dedang@psv.com.vn and inform them of the time the error occurred\, and anything you might have done that may have caused the error. Premature end of script headers: /usr/local/apache/share/cgi-bin/test.pl _________________________________________________________ Apache/1.3.3 Server at sun.psv.com.vn Port 80
" Please help me to resolve this problem \, if it can you instruct me in detail . Thank you very much . De.dm
At 12:59 +0700 2000-03-09\, De Minh Dang wrote:
Premature end of script headers: /usr/local/apache/share/cgi-bin/test.pl
In a few weeks\, we would definitely be able to answer you "Read the documentation!"\, because the forthcoming perl 5.6.0 will have an exact match on the last line of your error message:
Premature end of script headers See Server error.
However\, even perl 5.005_03's perldiag man page manages a match in the first line of your diagnostic:
Internal Server Error
Here's what the 5.6.0 documentation\, which expands a little on what 5.005_03 has to say\, will tell you about that:
Server error This is the error message generally seen in a browser window when trying to run a CGI program (including SSI) over the web. The actual error text varies widely from server to server. The most frequently-seen variants are "500 Server error"\, "Method (something) not permitted"\, "Document contains no data"\, "Premature end of script headers"\, and "Did not produce a valid header".
This is a CGI error\, not a Perl error.
You need to make sure your script is executable\, is accessible by the user CGI is running the script under (which is probably not the user account you tested it under)\, does not rely on any environment variables (like PATH) from the user it isn't running under\, and isn't in a location where the CGI server can't find it\, basically\, more or less. Please see the following for more information:
http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html http://www.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html ftp://rtfm.mit.edu/pub/usenet/news.answers/www/cgi-faq http://hoohoo.ncsa.uiuc.edu/cgi/interface.html http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
You should also look at the perlfaq9 manpage.
Good luck. -- Dominic Dunlop
Migrated from rt.perl.org#2290 (status was 'resolved')
Searchable as RT2290$