Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_wsgi in VC9 cannot load svn in VC6 |
|
Author |
|
shaohao
Joined: 25 Jan 2007 Posts: 3
|
Posted: Wed 04 Apr '12 9:00 Post subject: mod_wsgi in VC9 cannot load svn in VC6 |
|
|
The new Apache compiled in VC10 is awesome. It can load all module compiled in VC6, VC9 or VC10.
Apache in VC10 can load mod_wsgi in VC9. But I found when mod_wsgi load a python script which load a svn.core module compiled in VC6, it will failed.
My httpd.conf
Code: |
Alias /myftp "E:/myftp"
<Directory "E:/myftp">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AuthType basic
AuthName "MYFTP"
AuthBasicProvider wsgi
WSGIAuthUserScript "E:/auth.wsgi"
Require valid-user
</Directory>
auth.wsgi:
=======
import svn.core
def check_password(env, usr, pwd):
return True
======
|
The python binding for subversion is downloaded from "sourceforge.net/projects/win32svn" which is compiled with VC6.
It will failed when I start the httpd.exe |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Wed 04 Apr '12 13:16 Post subject: |
|
|
What exact error you get ?
What says in a DOS box when you typr httpd.exe -t ?
Where did you downloaded mod_wsgi ?
Running as CGI all fine ?
Steffen |
|
Back to top |
|
shaohao
Joined: 25 Jan 2007 Posts: 3
|
Posted: Thu 05 Apr '12 14:38 Post subject: |
|
|
Steffen wrote: | What exact error you get ?
What says in a DOS box when you typr httpd.exe -t ?
Where did you downloaded mod_wsgi ?
Running as CGI all fine ?
Steffen |
I must use wsgi to distribute my web site.
I did not test it under CGI.
Below is my construct steps:
1. Download apache 2.22 win32 vc10 from apachelounge.com;
2. Download mod_wsgi (vc9 compiled) from mod_wsgi, select the precompiled "mod_wsgi-win32-ap22py27-3.3.so - Apache 2.2 / Python 2.7";
3. Download subversion win32 1.7.4 (vc6 compiled) from win32svn. Include the "svn-win32-1.7.4.zip" and "svn-win32-1.7.4_py27.zip". Unzip the python binding file "libsvn" and "svn" to C:\Python27\Lib\site-ackages;
4. Download python 2.7.2 from python.org;
5. Add apache2\bin and svn\bin to Path;
6. Add configs to httpd.conf to load mod_wsgi:
Code: |
LoadModule wsgi_module "C:/mod_wsgi-win32-ap22py27-3.3.so"
Alias /myftp "E:/myftp"
<Directory "E:/myftp">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AuthType basic
AuthName "MYFTP"
AuthBasicProvider wsgi
WSGIAuthUserScript "E:/auth.wsgi"
Require valid-user
</Directory>
|
The python file "E:/auth.wsgi" will be loaded by mod_wsgi for auth.
Code: |
import svn.core
def check_password(env, usr, pwd):
return True
|
I load the svn binding package from this auth.wsgi.
7. Start httpd.exe. Browse the http://localhost/myftp. Input any user name and password.
8. Open the Apache2\logs\error.log file for debug. It will tell you _core.pyd Dll load failed.
BTW. After compile the subversion with VC9, this issue have been fixed. It seems that Apache(VC10) can load VC6~VC10 modules. But, the dll loading chain is successfule ONLY IF the apache module and the dlls which are loaded by this apache module are compiled in the same VC version. |
|
Back to top |
|
|
|
|
|
|