
I've been having some trouble with 500 internal server errors. I looked at my logs files for apache and it was saying that i didnt have some of the proper modules installed, so i installed them. Now all i get in my error log is "Premature end of script headers: /*/*/*/*/index.pl". any ideas what could be causing this? Tony VanScoy Systems Administrator Certified Solutions Inc. 1205 Scott Street / Wilkes Barre, PA 18705 (570) 822-0789 / www.certifiedsolutionsinc.net

Hi Tony, On Mon, Sep 09, 2002 at 11:21:20AM -0400, Tony VanScoy wrote:
I've been having some trouble with 500 internal server errors. I looked at my logs files for apache and it was saying that i didnt have some of the proper modules installed, so i installed them. Now all i get in my error log is "Premature end of script headers: /*/*/*/*/index.pl".
any ideas what could be causing this?
What is the output of "cd /home/cert/OpenTRS/bin/cgi-bin/" then "perl index.pl"? It should be like this: martin@nohl:/opt/OpenTRS/bin/cgi-bin> perl index.pl Content-Type: text/html; charset=iso-8859-1; X-Powered-By: OpenTRS - Open Ticket Request System (http://otrs.org) <!-- OpenTRS: Copyright 2002, OpenTRS Project. This Software is under the GPL. --> <!-- Web: http://otrs.org/ - Lists: http://lists.otrs.org/ --> <!-- GNU Public License: http://www.gnu.org/licenses/gpl.txt --> <html> <head> <title>OpenTRS :: Login</title> <style type="text/css"> <!-- p,h1,h2,h3,h4,ul,ol,li,div,td,th,address,blockquote,nobr,b,i { font-family:Geneva,Helvetica,Arial,sans-serif;font-size:12px;} pre { font-family:Courier;font-size:12px; } //--> </style> [...] Did you get the same result?
Tony VanScoy
Martin -- Martin Edenhofer - <martin at edenhofer.de> - http://martin.edenhofer.de/ -- "The number of Unix installations has grown to 10, with more expected." The Unix Programmer's Manual, 2nd Edition, June 1972

What is the output of "cd /home/cert/OpenTRS/bin/cgi-bin/" then "perl index.pl"?
i got errors complaining about MIME base64, so i installed that module. now "perl index.pl" outputs the html like you said it would. I thought that would work but domain.com/otrs/index.pl still gets 500 internal server errors. my apache error log still only says "Premature end of script headers: /*/*/*/*/index.pl". why would it output html at the command line, but not in the browser? apache config?

Hi Tony, On Mon, Sep 09, 2002 at 11:42:37AM -0400, Tony VanScoy wrote:
What is the output of "cd /home/cert/OpenTRS/bin/cgi-bin/" then "perl index.pl"?
i got errors complaining about MIME base64, so i installed that module. now "perl index.pl" outputs the html like you said it would. I thought that would work but domain.com/otrs/index.pl still gets 500 internal server errors. my apache error log still only says "Premature end of script headers: /*/*/*/*/index.pl". why would it output html at the command line, but not in the browser? apache config?
Let me guess, you use mod_perl? If yes, restart the webserver. And it works. Reason: mod_perl is reading the source code on startup (improved performance). If not, send us your httpd.conf. Martin -- Martin Edenhofer - <martin at edenhofer.de> - http://martin.edenhofer.de/ -- "The number of Unix installations has grown to 10, with more expected." The Unix Programmer's Manual, 2nd Edition, June 1972

Let me guess, you use mod_perl? If yes, restart the webserver. And it works. Reason: mod_perl is reading the source code on startup (improved performance). If not, send us your httpd.conf. Martin
well i restarted apache and still didnt work. here is the virtual host
section from httpd.conf...

Hi Tony, On Mon, Sep 09, 2002 at 12:29:03PM -0400, Tony VanScoy wrote:
If not, send us your httpd.conf. [...]
well i restarted apache and still didnt work. here is the virtual host section from httpd.conf...
ServerAdmin webmaster@domain.com DocumentRoot /home/cert/public_html BytesLog domlogs/domain.com-bytes_log User cert Group cert ServerName www.domain.com ServerAlias www.domain.com *.www.domain.com CustomLog domlogs/domain.com combined ScriptAlias /cgi-bin/ /home/cert/public_html/cgi-bin/ ScriptAlias /otrs/ /home/cert/OpenTRS/bin/cgi-bin/ </VirtualHost>
This looks ok! That's very strange. I don't have more ideas. Check this points one more time. a) check the permission of index.pl, it should look like: [22:26:13 martin@cuba]:~ >ls -l /opt/OpenTRS/bin/cgi-bin/index.pl -rwxr-xr-x 1 root root 14416 Aug 27 00:14 /opt/OpenTRS/bin/cgi-bin/index.pl [22:26:27 martin@cuba]:~ > b) check the index.pl "su - cert", "cd /home/cert/OpenTRS/bin/cgi-bin/" then "./index.pl" If the output starts with, [...] Content-Type: text/html; charset=iso-8859-1; X-Powered-By: OpenTRS - Open Ticket Request System (http://otrs.org) <!-- OpenTRS: Copyright 2002, OpenTRS Project. This Software is under the GPL. --> [...] it's ok. c) check a simple perl example script in your "/home/cert/OpenTRS/bin/cgi-bin/" if your webserver is configured correctly. - download http://otrs.org/download/test.pl (a simple test perl script) - save it to /home/cert/OpenTRS/bin/cgi-bin/test.pl - set the permissions (chmod 755 /home/cert/OpenTRS/bin/cgi-bin/test.pl) Test this script with http://www.domain.com/otrs/test.pl If this works, your webserver is configured correctly. If not, check your webserver config. Martin -- Martin Edenhofer - <martin at edenhofer.de> - http://martin.edenhofer.de/ -- "The number of Unix installations has grown to 10, with more expected." The Unix Programmer's Manual, 2nd Edition, June 1972
participants (2)
-
Martin Edenhofer
-
Tony VanScoy