Urgent. malformed header from script error!
Erik Max Francis
max at alcyone.com
Mon Jan 13 06:18:23 EST 2003
Manos Papagelis wrote:
> Running apache on solaris the following error occurs when trying to
> run a
> python script:
>
> malformed header from script. Bad header=Could not read-open file
> /bla:
> blabla.py
>
> Although it seems to be a simple permition problem, it is not fixed by
> changing the permitions of the refered directory and file.
>
> Could anyone suggest what's the problem and how can be solved?
The exact message is crucial; when asking for technical answers for
technical questions, paraphrasing is never helpful.
>From the description, it's either a permissions problem (the script is
not executable by the user the server runs as, usually nobody), a server
configuration problem (the server is not configured to execute CGI
scripts in the place you've put the file, or it does not recognize the
.py extension as a legal CGI script), or it's a header problem (you're
not printing a proper HTTP header at the top of the script). Which of
the three it is, it's hard to say without accurate information.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Only the winners decide what were war crimes.
\__/ Gary Wills
Bosskey.net: Counter-Strike / http://www.bosskey.net/cs/
A personal guide to Counter-Strike.
More information about the Python-list
mailing list