mod_wsgi under Windows 7

253 views
Skip to first unread message

Canassa

unread,
Jan 23, 2010, 6:33:14 PM1/23/10
to modwsgi
Hi all,

I was trying to run an Apache 2.2 + mod_wsgi + Python 2.6(x64) under
Windows 7 64-bits.

I copied the mod_wsgi to the Apache's modules directory, changed the
httpd.conf and restarted the server, but it crashed with the following
error:

httpd: Syntax error on line 127 of C:/Program Files (x86)/Apache
Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program
Files (x86)/Apache Software Foundation/Apache2.2/modules/mod_wsgi.so
into server: The specified module could not be found.

This error message was misleading, so I lost some time messing around
with file permissions and paths. After some googling I found a topic
on this board saying that this error message can be related to running
the mod_wsgi with a incorrect Python version.

I ended up "fixing" the problem by uninstalling the Python 64-bits and
installing the 32-bits version. It seens to be working fine now.

Has anyone already faced this issue? I searched on the web for 64-bits
mod_wsgi but had no luck.


Thanks,
Canassa

Graham Dumpleton

unread,
Jan 24, 2010, 6:16:37 PM1/24/10
to mod...@googlegroups.com
2010/1/24 Canassa <cesar....@gmail.com>:

I can only provide 32 bit binaries for Windows. The above seems about
right for trying to use those binaries with 64 bit Windows and 64 bit
Python installation.

If you have access to 64 bit version of Microsoft VS2008 C/C++ compiler from:

http://www.microsoft.com/express/Windows/

you can try and following instructions in:

http://code.google.com/p/modwsgi/wiki/InstallationOnWindows#Compiling_From_Source_Code

for building our own 64 bit version.

BTW, with VS2010 apparently not far away, good idea to get a copy of
that VS2008 express version now. Microsoft has a habit of removing
access to the old version pretty well as soon as new version
available. Because Python will still likely require the older version,
you will be screwed if haven't already got it down.

Graham

Canassa

unread,
Jan 27, 2010, 6:02:41 PM1/27/10
to modwsgi
I guess I will need to some help in order to compile it :)

I tried that procedure, but when I ran the compiler it complained that
a httpd.h file is missing. Is that from the Apache source code?

Thanks,
Cesar

On Jan 24, 9:16 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> 2010/1/24Canassa<cesar.cana...@gmail.com>:


>
>
>
>
>
> > Hi all,
>
> > I was trying to run an Apache 2.2 + mod_wsgi + Python 2.6(x64) under
> > Windows 7 64-bits.
>
> > I copied the mod_wsgi to the Apache's modules directory, changed the
> > httpd.conf and restarted the server, but it crashed with the following
> > error:
>
> > httpd: Syntax error on line 127 of C:/Program Files (x86)/Apache
> > Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program
> > Files (x86)/Apache Software Foundation/Apache2.2/modules/mod_wsgi.so
> > into server: The specified module could not be found.
>
> > This error message was misleading, so I lost some time messing around
> > with file permissions and paths. After some googling I found a topic
> > on this board saying that this error message can be related to running
> > the mod_wsgi with a incorrect Python version.
>
> > I ended up "fixing" the problem by uninstalling the Python 64-bits and
> > installing the 32-bits version. It seens to be working fine now.
>
> > Has anyone already faced this issue? I searched on the web for 64-bits
> > mod_wsgi but had no luck.
>
> I can only provide 32 bit binaries for Windows. The above seems about
> right for trying to use those binaries with 64 bit Windows and 64 bit
> Python installation.
>
> If you have access to 64 bit version of Microsoft VS2008 C/C++ compiler from:
>
>  http://www.microsoft.com/express/Windows/
>
> you can try and following instructions in:
>

>  http://code.google.com/p/modwsgi/wiki/InstallationOnWindows#Compiling...

Graham Dumpleton

unread,
Jan 27, 2010, 6:09:12 PM1/27/10
to mod...@googlegroups.com
2010/1/28 Canassa <cesar....@gmail.com>:

> I guess I will need to some help in order to compile it :)
>
> I tried that procedure, but when I ran the compiler it complained that
> a httpd.h file is missing. Is that from the Apache source code?

When you install Apache you need to select the option in the installer
to install header files. So, try reinstalling Apache and look for that
option.

Graham

> --
> You received this message because you are subscribed to the Google Groups "modwsgi" group.
> To post to this group, send email to mod...@googlegroups.com.
> To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>
>

Graham Dumpleton

unread,
Jan 27, 2010, 6:10:01 PM1/27/10
to mod...@googlegroups.com
2010/1/28 Graham Dumpleton <graham.d...@gmail.com>:

> 2010/1/28 Canassa <cesar....@gmail.com>:
>> I guess I will need to some help in order to compile it :)
>>
>> I tried that procedure, but when I ran the compiler it complained that
>> a httpd.h file is missing. Is that from the Apache source code?
>
> When you install Apache you need to select the option in the installer
> to install header files. So, try reinstalling Apache and look for that
> option.

Alternatively, you haven't modified the paths correctly in the
supplied makefiles if your install locations are different to standard
places.

Graham

Reply all
Reply to author
Forward
0 new messages