Thanks for your early reply.

So you mean I should compile mod_wsgi with Older version of Microsoft
C/C++ Compiler i.e 2003 ? I will try that and will get back to you.

Thanks,
Jigar.

On Nov 22, 5:03 am, Graham Dumpleton <[email protected]>
wrote:
> Why do you need to use Python 2.5?
>
> For Python 2.5 I recollect you will need 'Visual Studio .NET 2003' as
> that is what PSF binary distribution of Python 2.5 is built with.
>
> You can't just use the latest Microsoft C/C++ compiler.
>
> Graham
>
> On 21 November 2011 19:19, Jigar <[email protected]> wrote:
>
>
>
>
>
>
>
> > I am running AMPPS Stack.
> > AMPPS has Apache 2.2.21, Python 2.5.4.
> > I want to install mod_wsgi instead of mod_python(which they are
> > providing). Before starting with mod_wsgi i disabled mod_python so
> > they don't conflict.
>
> > I compiled mod_wsgi on XP Machine with Microsoft Visual Studio 9.0 &
> > Microsoft SDK v6.0A. Following is my make file which i modified.
>
> > CPPFLAGS = \
> >  /DWIN32 \
> >  /DNDEBUG \
> >  /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include" \
> >  /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include" \
> >  /I"E:\Program Files\AMPPS\apache\include" \
> >  /I"E:\Program Files\AMPPS\python\include"
>
> > CFLAGS = \
> >  /MD \
> >  /GF \
> >  /Gy \
> >  /O2 \
> >  /Wall \
> >  /Zc:wchar_t \
> >  /Zc:forScope
>
> > LDFLAGS = \
> >  /link \
> >  "/LIBPATH:C:\Program Files\Microsoft Visual Studio 9.0\VC\lib" \
> >  "/LIBPATH:C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib" \
> >  "/LIBPATH:E:\Program Files\AMPPs\apache\lib" \
> >  "/LIBPATH:E:\Program Files\AMPPS\python\libs" \
> >  /OPT:REF \
> >  /OPT:ICF=2 \
> >  /RELEASE \
> >  /SUBSYSTEM:WINDOWS
>
> > LDLIBS = \
> >  python25.lib \
> >  libhttpd.lib \
> >  libapr-1.lib \
> >  libaprutil-1.lib
>
> > mod_wsgi.so : mod_wsgi.c
> >        cl $(CPPFLAGS) $(CFLAGS) $? /LD $(LDFLAGS) $(LDLIBS) /OUT:$@
> >        mt -manifest [email protected] -outputresource:$@;2
>
> > clean :
> >        del *.obj *.so *.so.manifest *.lib *.exp
>
> > I was able to compile mod_wsgi for Python 2.5.4. It is now loaded into
> > apache modules. I confirmed it by command.
>
> > httpd.exe -M
> > .
> > .
> > wsgi_module(shared)
> > php5_module(shared)
>
> > But I am unable to run a test file(hello.wsgi), it is located in
> > folder E:\Program Files\AMPPS\wsgi : so the path of file becomes E:
> > \Program Files\AMPPS\wsgi\hello.wsgi
>
> > My hello.wsgi file contains:
>
> > def application(environ, start_response):
> >    status = '200 OK'
> >    output = 'Hello World!'
>
> >    response_headers = [('Content-type', 'text/plain'),
> >                        ('Content-Length', str(len(output)))]
> >    start_response(status, response_headers)
>
> >    return [output]
>
> > And my Apache Error Log is :
>
> > [Mon Nov 21 12:59:36 2011] [warn] mod_wsgi: Compiled for Python/2.5.
> > [Mon Nov 21 12:59:36 2011] [warn] mod_wsgi: Runtime using Python/
> > 2.5.4.
> > [Mon Nov 21 12:59:37 2011] [notice] Apache/2.2.21 (Win32) mod_wsgi/3.3
> > Python/2.5.4 PHP/5.3.8 configured -- resuming normal operations
> > [Mon Nov 21 12:59:37 2011] [notice] Server built: Sep  9 2011 10:26:10
> > [Mon Nov 21 12:59:37 2011] [notice] Parent: Created child process 4236
> > [Mon Nov 21 12:59:37 2011] [warn] mod_wsgi: Compiled for Python/2.5.
> > [Mon Nov 21 12:59:37 2011] [warn] mod_wsgi: Runtime using Python/
> > 2.5.4.
> > [Mon Nov 21 12:59:37 2011] [notice] Child 4236: Child process is
> > running
> > [Mon Nov 21 12:59:37 2011] [notice] Child 4236: Acquired the start
> > mutex.
> > [Mon Nov 21 12:59:37 2011] [notice] Child 4236: Starting 64 worker
> > threads.
> > [Mon Nov 21 12:59:37 2011] [notice] Child 4236: Starting thread to
> > listen on port 80.
>
> > My vhost file contains:
>
> > <VirtualHost 127.0.0.1:80>
> >        <Directory "e:/program files/ampps/wsgi">
> >                Options FollowSymLinks Indexes
> >                AllowOverride All
> >                Order deny,allow
> >                allow from All
> >        </Directory>
> >        ServerName 127.0.0.1
> >        ServerAlias 127.0.0.1
> >        WSGIScriptAlias /wsgi "e:/program files/ampps/wsgi/hello.wsgi"
> >        DocumentRoot "e:/program files/ampps/wsgi"
> >        ErrorLog "E:/Program Files/AMPPS/apache/logs/127.0.0.1.err"
> >        CustomLog "E:/Program Files/AMPPS/apache/logs/127.0.0.1.log" combined
> > </VirtualHost>
>
> > My Apache is giving some windows error like, i could find these
> > details on event log of windows:
>
> > Faulting application name: httpd.exe, version: 2.2.21.0, time stamp:
> > 0x4e6a3015
> > Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp:
> > 0x4ce7ba58
> > Exception code: 0xc0000005
> > Fault offset: 0x00038da9
> > Faulting process id: 0xc4c
> > Faulting application start time: 0x01cca6c0f9ccd446
> > Faulting application path: C:\apache\bin\httpd.exe
> > Faulting module path: C:\Windows\SysWOW64\ntdll.dll
> > Report Id: 3ba0b9e0-12b4-11e1-b285-005056c00008
>
> > Expected Result is to see "Hello World on my screen". Please let me
> > know where am i wrong.
>
> > Thanks.
>
> > --
> > 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 
> > athttp://groups.google.com/group/modwsgi?hl=en.

-- 
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.

Reply via email to