using python as cgi on apache unix

Simon Callan simon at
Tue Sep 17 14:43:56 EDT 2002

In message <am6fm301477 at>
          <josh_py at> wrote:

> All,
> I have developed a python solution to run and connect to a mysql
> database. I did all my development under windows apache 1.3.26 and
> python 2.2.1.  I know want to move this to my unix server. 
> Unfortunately, no matter what I do I can not get apache on my linux
> box to execute any python scripts.  I get the following errors in
> apache:
> Premature end of script headers: /var/www/html/cgi-bin/

Check the access permissions on the file. On my setup, the file has to
have the "other" access permissions set to read and execute. Ie try
typing "chmod o+rx", and trying again.

It took me some time to spot this problem, when I had it.


More information about the Python-list mailing list