Problem importing in a cgi script

Justin Shaw wyojustin at hotmail.com
Tue Jul 16 20:53:55 EDT 2002


After upgrading to Solaris 8 my cgi scripts are unable to import some
modules.  The code runs standalone but not when called as a cgi script.  I
was able to isolate the problem to these short scripts:

#!/usr/local/bin/python
# test_cgi.py
import socket
print 'OK!'

# cgi_server_like.py
import os
os.execve('test_cgi.py', ('',), {})

Too bad I don't have the actual traceback.  I look like the loader can't
find _socket.so.  I've done runs where I print sys.path right before the
import showing that the directory where _socket.so resides is in there.  Any
ideas?


OS: Solaris 8
Python version: 2.2





More information about the Python-list mailing list