CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Perl error in Apache Error File???


mike robb

Aug 6, 2000, 7:46 AM

Post #1 of 5 (799 views)
Perl error in Apache Error File??? Can't Post

I have some perl files running on apache. They run fine via telnet and produce the correct looking text with the proper header for html output.

When I run them via a web browser - I get the following error dumped into the error log.

[Sun Aug 6 11:32:12 2000] [error] [client] Premature end of scri
pt headers: /web/sites/

I have no idea what this means - so I'm not sure if I should be providing more information with this post.

Thanks for any help you can provide! Smile




Aug 6, 2000, 8:08 AM

Post #2 of 5 (799 views)
Re: Perl error in Apache Error File??? [In reply to] Can't Post


If the program runs fine in telnet, there are 3 things to check:

1) That you have a line that says:

print "Content-type: text/html\n\n";

before anything is output to the browser.

2) That you have the correct permissions set for the program. This usually is 755 (rwxr-xr-x).

3) That you have permission to run cgi scripts. If your user id does not have permission to run scripts, it will run fine in telnet, but will not output to the browser.

Hope this helps.

mike robb

Aug 6, 2000, 8:45 AM

Post #3 of 5 (799 views)
Re: Perl error in Apache Error File??? [In reply to] Can't Post

The header is correct.
The permissions are correct.
I can run other perl scripts just fine.

I'll recheck everything just to make sure, but this cgi script runs on one server and I just ported it to another server. (so the header is correct).
The file permissions might have gotten messed up (i did a zip and unzip -a) so that's not likely.. but sure is worth checking again.

I'm wondering if their might be something else - like a database (mysql) account problem as these files use a mysql database..

Thanks for the info...



Aug 6, 2000, 9:21 AM

Post #4 of 5 (799 views)
Re: Perl error in Apache Error File??? [In reply to] Can't Post

That may be it. If it worked on one server and not another, something either may be missing on the new server, or there is server or platform-specific code in the program. Check with your server admin to ensure that the requirements for the program are met.

It would also help to know if both servers (the one it's working on and the one that isn't) is the same platform (*nix, Win32, etc).

Good luck!

mike robb

Aug 6, 2000, 9:27 AM

Post #5 of 5 (799 views)
Re: Perl error in Apache Error File??? [In reply to] Can't Post

there appears to be more than just 1 problem Smile I did find that the topmost directory had file settings of 755 (which is okay on server #1 and not on server #2)

both servers are running apache on unix.

I did find that a perl module is not installed on server 2 that should be.

I'm hoping that these 2 things are going to be all the differences Smile

Thanks again for your help!




Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives