I have a script which runs fine from the UNIX shell. As soon as I try going thru the browser, I get an error which says -
"Premature end of Script Header".
best first guess is that the script is trying to do something that the web server process lacks sufficient priledges to do. When you run from a command prompt, it runs as you with your priveledges. When it runs via the web server it is running as the web daemon which is usually intentionally restricted in it's priveleges. Check anywhere that you are trying to open/read/change a file to see if the web daemon has sufficient access to that(those) file(s). The ""Premature end of Script Header" simply means the code did not run... consequently, the web server did not produce a valid HTTP header.
You should run this yuor-script as user no root.
1.Login as simple user.
2 Run your script : Lynx localhost/cgi-bin/your-script.cgi
If all right. Your script will run in any browser.
If error.
You should
1. login as root
2.copy your-script in directory localhost/cgi-bin
3. run command - chmod 755 your-script.cgi
And try again as simple user.
andrei@vap.baltnet.ru
Andrei Voronetski from Kaliningrad Russia.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.