The first thing I recommend is to check the syntax of your httpd conf files (http://httpd.apache.org/docs/2.2/programs/httpd.html, http://httpd.apache.org/docs/2.2/programs/apachectl.html, http://httpd.apache.org/docs/2.2/configuring.html). Something like the following should work:
> httpd -t -D DUMP_MODULES The syntax check will fail if it can't locate and/or load any used apache modules. For the details, check the apache errors log. A "Syntax OK" message would indicate that the necessary apache module DLLs could be found and loaded. I've seen DLL load errors when testing my build script for mod_wsgi.so due to the following errors: 1) the mod_wsgi.so dll did not contain a required embedded manifest (the mod_wsgi.so dll I included in the zip does have an embedded manifest) 2) visual c++ 2008 runtime libraries could not be found (see my other post about this) What's going on here is that starting with VC++ 2005, MS is trying to fix the "DLL hell" problem (http://en.wikipedia.org/wiki/DLL_hell, http://en.wikipedia.org/wiki/Dependency_hell) by using side-by-side assemblies. These are similar to .Net assemblies, but are for native code. In my humble opinion, the information about side-by-side assemblies is scattered, at best. I believe VC++ 2008 (used to build python 2.6) forces the use of side-by-side assemblies, so we have to deal with their additional complexity. The good news is that side-by- side assemblies will allow multiple versions of the same DLL to reside on the same computer and should prevent "DLL hell". Peter On Jan 25, 6:26 pm, Jon Prater <[email protected]> wrote: > Thank you for this, Peter, it loads perfectly! :D > For background, I'm running Apache 2.2.11 on Windows XP SP3. > I'm trying to load a Django site through mod_wsgi, and when I go to > the url I've set for it, I get 500 Internal Server Error, and this is > put in my Apache error log: > > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] mod_wsgi > (pid=3216): Target WSGI script 'C:/djangoproj/apache/django.wsgi' > cannot be loaded as Python module. > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] mod_wsgi > (pid=3216): Exception occurred processing WSGI script 'C:/djangoproj/ > apache/django.wsgi'. > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] Traceback (most > recent call last): > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "C:/ > djangoproj/apache/django.wsgi", line 11, in <module> > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] import > django.core.handlers.wsgi > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "c:\ > \python26\\lib\\site-packages\\django-1.0.2_final-py2.6.egg\\django\ > \core\\handlers\\wsgi.py", line 8, in <module> > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] from django > import http > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "c:\ > \python26\\lib\\site-packages\\django-1.0.2_final-py2.6.egg\\django\ > \http\\__init__.py", line 5, in <module> > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] from urllib > import urlencode > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "C:\ > \Python26\\Lib\\urllib.py", line 26, in <module> > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] import > socket > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "C:\ > \Python26\\Lib\\socket.py", line 46, in <module> > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] import > _socket > [Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] ImportError: DLL > load failed: The specified module could not be found. > > At the time of load, my python path looks like this: > > ['C:\\\\Python26\\\\lib\\\\site-packages\\\\setuptools-0.6c9- > py2.6.egg', 'C:\\\\Python26\\\\lib\\\\site-packages\\\ > \django-1.0.2_final-py2.6.egg', 'C:\\\\WINDOWS\\\\system32\\\ > \python26.zip', 'C:\\\\Python26\\\\Lib', 'C:\\\\Python26\\\\DLLs', 'C:\ > \\\Python26\\\\Lib\\\\lib-tk', 'C:\\\\Program Files\\\\Apache Software > Foundation\\\\Apache2.2', 'C:\\\\Program Files\\\\Apache Software > Foundation\\\\Apache2.2\\\\bin', 'C:\\\\Python26', 'C:\\\\Python26\\\ > \lib\\\\site-packages', 'C:\\\\Python26\\\\lib\\\\site-packages\\\ > \mod_python', 'C:\\\\Python26\\\\lib\\\\site-packages\\\\win32', 'C:\\\ > \Python26\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\Python26\\\ > \lib\\\\site-packages\\\\Pythonwin', 'C:\\\\djangoproj', 'C:\\\ > \djangoproj'] > > My python install path is c:\python26, my Django source is installed > in its default site-packages location, and my Django project is a > subfolder of c:\djangoproj. I've followed all the steps on the > IntegrationWithDjango page, as well > ashttp://code.djangoproject.com/wiki/django_apache_and_mod_wsgi. > Any help you can give would be welcome. > > On Jan 25, 12:10 pm, Peter <[email protected]> wrote: > > > Attached is my first cut at a windows build script for mod_wsgi 2.x, > > python 2.6.1, and apache 2.2.11. The script consists of one bat and two > > rsp files. I've also included the mod_wsgi.so and build output.txt in > > the attached zip. I've only tested mod_wsgi.so with a couple of small > > wsgi scripts. Please read the comments in build.bat before using. > > > Feedback is welcomed. > > > Peter Santoro > > > win32wsgi.zip > > 40KViewDownload --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
