Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have only seen some related questions to this with answers stating that there are version mix ups.

Specs:

  • Windows XP
  • Apache HTTP server 2.2.22
  • Python 2.7.2
  • WSGI mod mod_wsgi-win32-ap22py27-3.3.so

I have renamed the wsgi file to mod_wsgi.so and place it in my Apache modules folder.

The only changes I have made to my Apache httpd.conf file is the following inserted line:

LoadModule wsgi_module modules/mod_wsgi.so

(I had inserted a wsgi script but commenting it out doesn't make a difference.)

My system path includes Python27 and Python27\Lib

Upon attempting to start the apache service, it fails and produces this error log:

[Wed Apr 25 17:22:02 2012] [warn] mod_wsgi: Compiled for Python/2.7.

[Wed Apr 25 17:22:02 2012] [warn] mod_wsgi: Runtime using Python/2.7.2.

[Wed Apr 25 17:22:02 2012] [notice] Apache/2.2.22 (Win32) mod_wsgi/3.3 Python/2.7.2 configured -- resuming normal operations

[Wed Apr 25 17:22:02 2012] [notice] Server built: Jan 28 2012 11:16:39

[Wed Apr 25 17:22:02 2012] [notice] Parent: Created child process 5680

[Wed Apr 25 17:22:02 2012] [warn] mod_wsgi: Compiled for Python/2.7.

[Wed Apr 25 17:22:02 2012] [warn] mod_wsgi: Runtime using Python/2.7.2.

[Wed Apr 25 17:22:02 2012] [notice] Child 5680: Child process is running

ImportError: No module named site

[Wed Apr 25 17:22:02 2012] [crit] (OS 6)The handle is invalid. : master_main: create child process failed. Exiting.

The only thing I can think of that could be different from normal usage is that my Windows is running on drive F: not C:. However, I made a C:\Python27\Lib\site.py and that didn't seem to resolve anything.

This is blowing my brain up - any help appreciated.

share|improve this question
    
What is sys.path set to in the interpreter? What happens if you try to import site from the interpreter –  dwurf Apr 25 '12 at 22:10
    
sys.path contains: ['F:\\Python27\\Lib\\idlelib', 'F:\\Python27\\python27.zip', 'F:\\Python27\\DLLs', 'F:\\Python27\\lib', 'F:\\Python27\\lib\\plat-win', 'F:\\Python27\\lib\\lib-tk', 'F:\\Python27', 'F:\\Python27\\lib\\site-packages'] import site in python IDLE is successful. –  Blego Apr 25 '12 at 22:13
    
Did you compile mod_wsgi yourself? If so, how did you compile it? If not, how did you install it? –  Andrew M. Apr 25 '12 at 23:46
    
I downloaded the .so via this link: code.google.com/p/modwsgi/downloads/… I then renamed that file and placed it in my apache modules folder. –  Blego Apr 25 '12 at 23:53
    
Using the precompiled .so for python 2.6 from the same source, and using python 2.6 this error does not pop. I will see if I can get django running properly on 2.6 and deployed, but this does not make sense to me. Same system paths and everything, just change a 7 to a 6. –  Blego Apr 26 '12 at 5:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.