Re: Using mod_wsgi with WAMP (Apache 2.4.2 – Mysql 5.5.24 – PHP 5.4.3)

1,410 views
Skip to first unread message

Noorul Islam Kamal Malmiyoda

unread,
Oct 19, 2012, 9:42:24 PM10/19/12
to mod...@googlegroups.com
On Thursday, October 18, 2012 7:18:55 PM UTC+5:30, Stefano Schiavi wrote:
Hello,
I am unsure how to get mod_wsgi to work with WAMP (Apache 2.4.2 – Mysql 5.5.24 – PHP 5.4.3)
I received some suggestion to look into compiling from source.
But I don't yet fully understand what this means.

Could someone help clarifying what I need to do or point to another solution?
Thank you so much

Why do you want to use mod_wsgi for when you are using PHP? And share your configuration and error message.

Thanks and Regards
Noorul
 

Graham Dumpleton

unread,
Oct 19, 2012, 10:40:54 PM10/19/12
to mod...@googlegroups.com
On 19 October 2012 00:48, Stefano Schiavi <ste...@bvprojects.org> wrote:
> Hello,
> I am unsure how to get mod_wsgi to work with WAMP (Apache 2.4.2 – Mysql
> 5.5.24 – PHP 5.4.3)
> I received some suggestion to look into compiling from source.
> But I don't yet fully understand what this means.
>
> Could someone help clarifying what I need to do or point to another
> solution?

There are no precompiled binaries for mod_wsgi Apache 2.4 on Windows.
I am not in a position to be able to create them for various reasons.

Is there a specific reason you must use Apache 2.4?

If you don't have the knowledge to be able to understand how to
compile source code yourself, the simpler thing to do would be to use
Apache 2.2, for which binaries are available from a number of places
such as:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Graham

Stefano Schiavi

unread,
Oct 22, 2012, 12:25:51 PM10/22/12
to mod...@googlegroups.com
Thank you for your reply,
I am not sure what you mean with "Why do you want to use mod_wsgi for when you are using PHP?"
is there another way to get python to work on WAMP?

Thank you!

Stefano Schiavi

unread,
Oct 22, 2012, 5:12:01 PM10/22/12
to mod...@googlegroups.com
Thank you so much for your help

I am having some issues.
I did the following:

Insalled:

Wamp (Apache 2.2.22 – Mysql 5.5.24 – PHP 5.4.3 XDebug  2.1.2  XDC 1.5  PhpMyadmin 3.4.10.1  SQLBuddy 1.3.3  webGrind 1.0)
python 2.7 win x64
mod_wsgi-3.4.win-amd64-py2.7.zip

followed the instructions at
http://martinprzybyla.com/2011/02/01/how-to-get-python-working-with-apache-and-wampserver-win-7/

when I load the script at localhost/test.py
the browser renders the text rather than executing the script.

Do you have any suggestion on how to troubleshot this?
Thank you again!

Graham Dumpleton

unread,
Oct 22, 2012, 8:05:12 PM10/22/12
to mod...@googlegroups.com
On 23 October 2012 08:12, Stefano Schiavi <ste...@bvprojects.org> wrote:
> Thank you so much for your help
>
> I am having some issues.
> I did the following:
>
> Insalled:
>
> Wamp (Apache 2.2.22 – Mysql 5.5.24 – PHP 5.4.3 XDebug 2.1.2 XDC 1.5
> PhpMyadmin 3.4.10.1 SQLBuddy 1.3.3 webGrind 1.0)
> python 2.7 win x64
> mod_wsgi-3.4.win-amd64-py2.7.zip

Oh, they are supplying newer binaries at:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

now. That is good to know.

> followed the instructions at
> http://martinprzybyla.com/2011/02/01/how-to-get-python-working-with-apache-and-wampserver-win-7/
>
> when I load the script at localhost/test.py

Post what configuration you use in Apache. That example doesn't have
the URL as being http://localhost/test.py but
http://localhost/python/test.py so you cannot have done what they.

We therefore need to see what you did do.

BTW, you are perhaps better using WSGIScriptAlias as detailed in:

http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide

It is simpler.

Graham

> the browser renders the text rather than executing the script.
>
> Do you have any suggestion on how to troubleshot this?
> Thank you again!
>
>
>
> On Saturday, October 20, 2012 4:40:56 AM UTC+2, Graham Dumpleton wrote:
>>
>> On 19 October 2012 00:48, Stefano Schiavi <ste...@bvprojects.org> wrote:
>> > Hello,
>> > I am unsure how to get mod_wsgi to work with WAMP (Apache 2.4.2 – Mysql
>> > 5.5.24 – PHP 5.4.3)
>> > I received some suggestion to look into compiling from source.
>> > But I don't yet fully understand what this means.
>> >
>> > Could someone help clarifying what I need to do or point to another
>> > solution?
>>
>> There are no precompiled binaries for mod_wsgi Apache 2.4 on Windows.
>> I am not in a position to be able to create them for various reasons.
>>
>> Is there a specific reason you must use Apache 2.4?
>>
>> If you don't have the knowledge to be able to understand how to
>> compile source code yourself, the simpler thing to do would be to use
>> Apache 2.2, for which binaries are available from a number of places
>> such as:
>>
>> http://www.lfd.uci.edu/~gohlke/pythonlibs/
>>
>> Graham
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/ZiUviRRg6AwJ.
>
> 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.

Stefano Schiavi

unread,
Oct 25, 2012, 5:06:22 PM10/25/12
to mod...@googlegroups.com
Thank you Graham,

I actually did try both
http://localhost/test.py
and
http://localhost/python/test.py

I re-checked all the steps mentioned and I followed everything perfectly.

I attach the cont file if you have time to have a look at it.
I really appreciate your help!
httpd.7z

Graham Dumpleton

unread,
Oct 28, 2012, 6:44:13 PM10/28/12
to mod...@googlegroups.com
You have some dodgy characters in your httpd.conf file:

<Directory <93>C:/wamp/www/python<94>>

Looks like you have used the wrong type of quotes or something around
the path for that Directory configuration.

Graham
> https://groups.google.com/d/msg/modwsgi/-/bU-MzX7gRMIJ.

Stefano Schiavi

unread,
Oct 31, 2012, 8:17:09 PM10/31/12
to mod...@googlegroups.com
Thank you very much for spotting that Graham,

I just noticed that the quotes were not the right ones.
I copied them from the tutorial.

I have now changed them to regular quotes.
I will test soon and report back.

Thank you!
Stefano


On 28/10/2012 22:44, Graham Dumpleton wrote:
You have some dodgy characters in your httpd.conf file:

<Directory <93>C:/wamp/www/python<94>>

Looks like you have used the wrong type of quotes or something around
the path for that Directory configuration.

Graham

On 26 October 2012 08:06, Stefano Schiavi <ste...@bvprojects.org> wrote:
Thank you Graham,

I actually did try both
http://localhost/test.py
and
http://localhost/python/test.py

I re-checked all the steps mentioned and I followed everything perfectly.

I attach the cont file if you have time to have a look at it.
I really appreciate your help!



On Tuesday, October 23, 2012 1:05:14 AM UTC+1, Graham Dumpleton wrote:
On 23 October 2012 08:12, Stefano Schiavi <ste...@bvprojects.org> wrote:
Thank you so much for your help

I am having some issues.
I did the following:

Insalled:

Wamp (Apache 2.2.22 � Mysql 5.5.24 � PHP 5.4.3 XDebug  2.1.2  XDC 1.5
PhpMyadmin 3.4.10.1  SQLBuddy 1.3.3  webGrind 1.0)
python 2.7 win x64
mod_wsgi-3.4.win-amd64-py2.7.zip
Oh, they are supplying newer binaries at:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

now. That is good to know.

followed the instructions at

http://martinprzybyla.com/2011/02/01/how-to-get-python-working-with-apache-and-wampserver-win-7/

when I load the script at localhost/test.py
Post what configuration you use in Apache. That example doesn't have
the URL as being http://localhost/test.py but
http://localhost/python/test.py so you cannot have done what they.

We therefore need to see what you did do.

BTW, you are perhaps better using WSGIScriptAlias as detailed in:

http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide

It is simpler.

Graham

the browser renders the text rather than executing the script.

Do you have any suggestion on how to troubleshot this?
Thank you again!



On Saturday, October 20, 2012 4:40:56 AM UTC+2, Graham Dumpleton wrote:
On 19 October 2012 00:48, Stefano Schiavi <ste...@bvprojects.org>
wrote:
Hello,
I am unsure how to get mod_wsgi to work with WAMP (Apache 2.4.2 �
Mysql
5.5.24 � PHP 5.4.3)
I received some suggestion to look into compiling from source.
But I don't yet fully understand what this means.

Could someone help clarifying what I need to do or point to another
solution?
Reply all
Reply to author
Forward
0 new messages