Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 24th, 2003, 01:36 PM
DigitalSmash DigitalSmash is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 6 DigitalSmash User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old August 27th, 2003, 05:56 AM
ilves ilves is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Norway
Posts: 41 ilves User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 22 sec
Reputation Power: 6
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
__________________
Good web hosting info - articles about web hosting
hb's web dev blog

Reply With Quote
  #3  
Old August 27th, 2003, 06:14 AM
DigitalSmash DigitalSmash is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 6 DigitalSmash User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old August 27th, 2003, 12:50 PM
ilves ilves is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Norway
Posts: 41 ilves User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 22 sec
Reputation Power: 6
Ok, that's one more thing to put on the "will cause 500 error list".

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Premature end..... again....


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT