From: ahoward Date: 2002-11-09T02:53:33+09:00 Subject: Re: Basic CGI question On Sat, 9 Nov 2002, Mark Probert wrote: > I'm just starting to play with cgi and forms. I have a simple script > which runs okay, except that the page changes to 500: Internal Server > Error, with the error message "Premature end of script headers" on > the script. > > Search, this seems to be a permissioning problem. Permissions are 755. > Ideas? if the cgi runs from the command line, but does not from the browser, chances are that user nobody (or www or whatever) does not have permission to *write* to the specified directory. two things which generally help me alot with cgis are * get sudo su nobody permission - run all your scripts from the command line as user nobody (or www, or whatever apache runs as) * when all else fails, make everything 777 (chmod -R 777) and run again, if that works the problem IS a permissions one, track it down and gradually shut permissions down untill it stops working - you found the problem i KNOW many will freak out at that suggestion, like about half the developers in our group, but i've solved at LEAST 50 or 60 bugs that way in under a minute - in every case the developer just didn't want to go 777 on principle, but there is no problem with this, IMHO, if it's *temporary*. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================