[Python-au] Windows Python different than Linux Python

Wilson Afonso wafonso at gmail.com
Tue Oct 11 08:27:23 CEST 2005

On 11/10/05, Mike Dewhirst <miked at dewhirst.com.au> wrote:
> Does import work differently in Linux (python 2.3) than Windows (python
> 2.4) ???
> [...]
> ... and all works fine with Apache 2.0.54 on Tosh. Under SuSE 9.1 linux,
> it doesn't. Apache 2.0.53 is giving an error (see below) which Mr Google
> indicates is a bad path to a file. All the scripts including fcrypt are
> in the same /srv/www/cgi-bin/ directory and the above imports must
> surely be on the path somewhere.

The error doesn't look like import is failing; the problem happens
before the script even starts. This error:

> [Tue Oct 11 14:18:32 2005] [error] [client] (2)No such file
> or directory: exec of '/srv/www/cgi-bin/collect.py' failed, referer:

means that Apache failed to open the script. That either means that
/srv/www/cgi-bin/collect.py does not exist, or that the web server has
no permissions to open it, or that it specifies an interpreter which
does not exist (in the first line of the script, starting with "#!").
The script never started, to Python never had a chance to do an

Can you cd into that directory and run "./collect.py"? If so, does the
web server have permissions to do the same (not only for the script,
but for all the directories in the path)? If not, check that the path
to Python is correct inside the script. From your description, I'm
betting on a wrong path to Python as the most likely cause of the
problem (as you say other scripts in the same directory run

Wilson Roberto Afonso        wafonso at gmail.com

More information about the python-au mailing list