|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Premature end..... again....
I feel bad about asking for help on this topic, cos there is so many other posts about it (mainly in perl though), and I've tried everything but am lost.
I've got a python script, works fine from command line, but error_log is giving me "Premature end of script headers: index.cgi". I'm trying to get to it using Apache/2.0.46 (Unix) mod_perl/1.99_09 Perl/v5.8.0 PHP/4.3.3RC2-dev mod_python/3.0.3 Python/2.2.2 Server I've tried permissions, ownership, content-type headers (with first-caps, and not, and with one and two lines after it). mod_python should be working as it works on a basic Hello World script. Any ideas would be much appreciated. Thanks, Dave |
|
#2
|
|||
|
|||
|
import module
Are you running it as a cgi script and shell script on the same machine?
I have gotten that error because i tried to import a module that wasn't installed on the server. It was installed on my machine so it worked just fine here. If you haven't been there already, the module docs is a good place to learn. http://www.python.org/doc/current/lib/module-cgi.html |
|
#3
|
|||
|
|||
|
I figured it out. I was writing it on Windows, saving to Linux, and was using Windows Line breaks.
Doh! Thanx for the reply though, much appreciated. |
|
#4
|
|||
|
|||
|
Ok, that's one more thing to put on the "will cause 500 error list".
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Premature end..... again.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|