Premature end of script headers
I'm trying to get a program called sql-ledger up and running. The instructions say: create a file sql-ledger-httpd.conf in the same location where your httpd.conf is and copy the next section into the file: Alias /sql-ledger/ /usr/local/sql-ledger/ <Directory /usr/local/sql-ledger> AllowOverride All AddHandler cgi-script .pl Options ExecCGI Includes FollowSymlinks Order Allow,Deny Allow from All </Directory> <Directory /usr/local/sql-ledger/users> Order Deny,Allow Deny from All </Directory> I did this. edit httpd.conf and add: # SQL-Ledger Include <ServerRoot>/sql-ledger-httpd.conf Note: Replace <ServerRoot> with the server's root directory! restart your web server. I did this using /srv/www/htdocs/sql-ledger-httpd.conf. This produced errors, I could not connect to local host and there was an error in restarting apache2. So I put a copy of sql-ledger-httpd.conf in htdocs. Now I can connect to localhost and restart without error. The instructions above say: create a file sql-ledger-httpd.conf in the same location where your httpd.conf is; but this didn't work. Only after I put the file in htdocs could I connect to localhost. Even though http://localhost/index.html.en works now, http://localhost/sql-ledger/admin.pl gives this error: Server error! The server encountered an internal error and was unable to complete your request. Error message: Premature end of script headers: admin.pl If you think this is a server error, please contact the webmaster. Error 500 localhost Wed Jan 28 23:51:43 2004 Apache/2.0.48 (Linux/SuSE) Is /srv/www/htdocs apache2's root directory? How do I correct this error? Thanks, Jerome
On Thursday 29 January 2004 04:55, Susemail wrote:
I'm trying to get a program called sql-ledger up and running. The instructions say:
<snip>
Error message: Premature end of script headers: admin.pl
If you think this is a server error, please contact the webmaster. Error 500 localhost Wed Jan 28 23:51:43 2004 Apache/2.0.48 (Linux/SuSE)
Is /srv/www/htdocs apache2's root directory? How do I correct this error? Thanks, Jerome
Make sure your perl script is executable (chmod +x). I often get this message when I forget to do that. As far as I can tell on my 8.2 Pro machine, yes /srv/www/htdocs is the default root for apache2. Best Regards, Charlie
On Thursday 29 January 2004 07:43 am, Charles Kunce wrote:
On Thursday 29 January 2004 04:55, Susemail wrote:
I'm trying to get a program called sql-ledger up and running. The instructions say:
<snip>
Error message: Premature end of script headers: admin.pl
Is /srv/www/htdocs apache2's root directory? How do I correct this error? Thanks, Jerome
Make sure your perl script is executable (chmod +x). I often get this message when I forget to do that. As far as I can tell on my 8.2 Pro machine, yes /srv/www/htdocs is the default root for apache2.
Best Regards,
Charlie
The script is executable;user:wwwrun,group:www
Yeah. The location of the file should match what you say in the Include statement. Delete the config file from htdocs and change the Include to /etc/httpd/sql-ledger-httpd.conf
I will. Any more ideas on the 'Premature end of script' error messages? Thanks, Jerome
On Thursday 29 January 2004 10.55, Susemail wrote:
edit httpd.conf and add:
# SQL-Ledger Include <ServerRoot>/sql-ledger-httpd.conf
Note: Replace <ServerRoot> with the server's root directory!
This surely must be a typo. Why should you put a config file in a publicly readable directory? I think they mean the config directory (/etc/httpd).
restart your web server.
I did this using /srv/www/htdocs/sql-ledger-httpd.conf.
Do it with /etc/httpd/sql-ledger-httpd.conf There's no reason to let the rest of the world read your configuration details
This produced errors, I could not connect to local host and there was an error in restarting apache2. So I put a copy of sql-ledger-httpd.conf in htdocs. Now I can connect to localhost and restart without error.
The instructions above say: create a file sql-ledger-httpd.conf in the same location where your httpd.conf is; but this didn't work. Only after I put the file in htdocs could I connect to localhost.
Yeah. The location of the file should match what you say in the Include statement. Delete the config file from htdocs and change the Include to /etc/httpd/sql-ledger-httpd.conf
participants (4)
-
Anders Johansson
-
Charles Kunce
-
Jerome Lyles
-
Susemail