Thanks Graham for responding and asking the follow-up Q.  I am enrolled in 
a UCLA extended education class where we currently are covering cgi and 
mod_wsgi access for Python web programming.  I have attempted to install 
the mod_wsgiv3.5 binary on my Windows 7 XAMPP stack. I read your 
documentation about how all the versions need to be in sync and it appears 
that mod_wsgi is active when I start up XAMPP.  From my limited knowledge I 
do believe I have my Apache environment configured so that I am sucessfully 
loading my mod_wsgi.so binary module. Below are the mods I made to 
configure mod_wsgi:

In-line are:

File: httpd.conf

Added the following 3 Segments:

# >>> Added for Python mod_wsgi.so Binary -- November 6, 2014 <<<
# >>> Extracted the Binary mod_wsgi.so from .Zip file: 
mod_wsgi-3.5.ap24.win32-py2.7.zip <<<
LoadModule wsgi_module modules/mod_wsgi.so 

# Added .py for Python To AddHandler Below (Required for cgi Module)
AddHandler cgi-script .cgi .pl .py .asp 

# Added mod_wsgi.conf File -- November 8, 2014
<IfModule httpd-wsgi>
Include conf/extra/httpd-wsgi.conf
</IfModule>

http-mod_wsgi.conf file lines ... Created the following httpd-wsgi.conf 
file:

#Alias /wsgi-scripts/ "C:/xampp/htdocs/wsgi/scripts/"  # make sure all 
Alias come before WSGIScriptAlias
WSGIScriptReloading On
<Directory "C:/xampp/htdocs/wsgi/scripts">
  AddHandler wsgi-script .wsgi .py
  Options +ExecCGI 
  Order allow,deny
  Allow from all
</Directory>
<IfModule wsgi_module>
  WSGIScriptAlias /wsgi-scripts/ "C:/xampp/htdocs/wsgi/scripts/"
</IfModule>

My mod-wsgi info from a modified CGI version of an Apache Friends, 
pyinfo.py, CGI module.

*Pyinfo.py Output XAMPP v1.8.2 Environment:*
   
Python Version
 
2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
  
Python Subversion
 
CPython, , 
  
Python Prefix
 
C:\Python27
  
Python Path
 
['C:\\xampp\\htdocs\\UCLA\\LearnPython', 
'C:\\Python27\\lib\\site-packages\\bottle-0.11.6-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\jaydebeapi-0.1.4-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\virtualenv-1.11.6-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\roman-2.0.0-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\pyquery-1.2.9-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\pdfminer-20140328-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\lxml-3.4.0-py2.7-win32.egg', 
'C:\\Python27\\lib\\site-packages\\pesto-25-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\repoze.lru-0.6-py2.7.egg', 
'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 
'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 
'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 
'C:\\Python27\\lib\\site-packages', 
'C:\\Python27\\lib\\site-packages\\win32', 
'C:\\Python27\\lib\\site-packages\\win32\\lib', 
'C:\\Python27\\lib\\site-packages\\Pythonwin', 
'C:\\Python27\\lib\\site-packages\\wx-3.0-msw', 'C:/xampp/htdocs']
  
Python Executable
 
C:\Python27\python.exe
  
Build Date
 
Nov 10 2013 19:24:18
  
Compiler
 
MSC v.1500 32 bit (Intel)
  
Python API
 
1013


 *Python Internals*
   
Built-in Modules
 
__builtin__, __main__, _ast, _bisect, _codecs, _codecs_cn, _codecs_hk, 
_codecs_iso2022, _codecs_jp, _codecs_kr, _codecs_tw, _collections, _csv, 
_functools, _heapq, _hotshot, _io, _json, _locale, _lsprof, _md5, 
_multibytecodec, _random, _sha, _sha256, _sha512, _sre, _struct, 
_subprocess, _symtable, _warnings, _weakref, _winreg, array, audioop, 
binascii, cPickle, cStringIO, cmath, datetime, errno, exceptions, 
future_builtins, gc, imageop, imp, itertools, marshal, math, mmap, msvcrt, 
nt, operator, parser, signal, strop, sys, thread, time, xxsubtype, 
zipimport, zlib
  
Byte Order
 
little endian
  
Check Interval
 
100
  
File System Encoding
 
mbcs
  
Maximum Integer Size
 
2147483647 (0x7FFFFFFF)
  
Maximum Recursion Depth
 
1000
  
Maximum Traceback Limit
 
1000
  
Maximum Unicode Code Point
 
65535
  

 *OS Internals*
   
Current Working Directory
 
C:\xampp\htdocs\UCLA\LearnPython
  
Line Seperator
 
\r\n
  
Path Seperator
 
;
  

 *WSGI Environment*
   
COMSPEC
 
C:\Windows\system32\cmd.exe
  
CONTEXT_DOCUMENT_ROOT
 
C:/xampp/htdocs
  
CONTEXT_PREFIX
 

   DOCUMENT_ROOT
 
C:/xampp/htdocs
  
GATEWAY_INTERFACE
 
CGI/1.1
  
HTTP_ACCEPT
 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  
HTTP_ACCEPT_ENCODING
 
gzip, deflate
  
HTTP_ACCEPT_LANGUAGE
 
en-US,en;q=0.5
  
HTTP_CONNECTION
 
keep-alive
  
HTTP_HOST
 
localhost:8081
  
HTTP_USER_AGENT
 
Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0
  
MIBDIRS
 
C:/xampp/php/extras/mibs
  
MYSQL_HOME
 
\xampp\mysql\bin
  
OPENSSL_CONF
 
C:/xampp/apache/bin/openssl.cnf
  
PATH
 
C:\Program Files\Apache Software 
Foundation\apache-maven-3.2.2\bin;C:\Program 
Files\Java\jdk1.7.0_51\bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Program
 
Files\ActiveState Komodo Edit 8\;C:\Perl\site\bin;C:\Perl\bin;C:\Program 
Files\HP SimplePass 2011\x64;C:\Program Files\HP SimplePass 
2011\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program
 
Files\Intel\DMIX;C:\Program Files\Intel\Services\IPT\;C:\Program 
Files\ooRexx;C:\Program Files\rexx.org\Regina;C:\Program 
Files\GNU\GnuPG\pub;C:\Program Files\Microsoft SQL 
Server\110\DTS\Binn\;C:\Program Files\Microsoft SQL 
Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL 
Server\110\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft Visual 
Studio 10.0\Common7\IDE\PrivateAssemblies\;c:\Program Files\Microsoft SQL 
Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL 
Server\100\DTS\Binn\;C:\Program Files\ibm\gsk8\lib;C:\Program 
Files\nodejs\;C:\Program Files\Oracle\Berkeley DB 12cR1 
6.0.30\bin;C:\Program Files\Clean 
Project\;C:\PROGRA~1\IBM\IBMDAT~1\BIN;C:\Program 
Files\jEdit;C:\%RUBY_HOME\bin;C:\Program 
Files\scala\bin;C:\Python27;C:\Python27\Scripts\;C:\Program 
Files\Git\cmd;C:\Program Files\SQLite3;C:\Program Files\SQLite2;C:\Program 
Files\Microsoft Visual Studio 10.0\VC;C:\Program 
Files\QuickTime\QTSystem\;C:\Ruby193\bin;C:\Tcl\bin;C:\Program Files\Apache 
Software Foundation\apache-maven-3.2.2\bin;C:\Program 
Files\Java\jdk1.7.0_51\bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Program
 
Files\ActiveState Komodo Edit 8\;C:\Perl\site\bin;C:\Perl\bin;C:\Program 
Files\HP SimplePass 2011\x64;C:\Program Files\HP SimplePass 
2011\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program
 
Files\Intel\DMIX;C:\Program Files\Intel\Services\IPT\;C:\Program 
Files\ooRexx;C:\Program Files\rexx.org\Regina;C:\Program 
Files\GNU\GnuPG\pub;C:\Program Files\Microsoft SQL 
Server\110\DTS\Binn\;C:\Program Files\Microsoft SQL 
Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL 
Server\110\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft Visual 
Studio 10.0\Common7\IDE\PrivateAssemblies\;c:\Program Files\Microsoft SQL 
Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL 
Server\100\DTS\Binn\;C:\Program Files\ibm\gsk8\lib;C:\Program 
Files\nodejs\;C:\Program Files\Oracle\Berkeley DB 12cR1 
6.0.30\bin;C:\Program Files\Clean 
Project\;C:\PROGRA~1\IBM\IBMDAT~1\BIN;C:\Program 
Files\jEdit;C:\%RUBY_HOME\bin;C:\Program 
Files\scala\bin;C:\Python27;C:\Python27\Scripts\;C:\Program 
Files\Git\cmd;C:\Program Files\SQLite3;C:\Program Files\SQLite2;C:\Program 
Files\Microsoft Visual Studio 10.0\VC;C:\Program 
Files\QuickTime\QTSystem\;C:\Users\Magoo\AppData\Roaming\npm;C:\Program 
Files\MongoDB 2.6 Standard\bin;C:\Storage\bat;C:\Program 
Files\Java\jdk1.7.0_51\db\bin;C:\Progra~1\scala\bin;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\bin;C:\Program 
Files\PostgreSQL\8.4\bin
  
PATHEXT
 
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.REX;.RB;.RBW
  
PHPRC
 
\xampp\php
  
PHP_PEAR_SYSCONF_DIR
 
\xampp\php
  
QUERY_STRING
 

   REMOTE_ADDR
 
::1
  
REMOTE_PORT
 
51764
  
REQUEST_METHOD
 
GET
  
REQUEST_SCHEME
 
http
  
REQUEST_URI
 
/UCLA/LearnPython/pyinfo.py
  
SCRIPT_FILENAME
 
C:/xampp/htdocs/UCLA/LearnPython/pyinfo.py
  
SCRIPT_NAME
 
/UCLA/LearnPython/pyinfo.py
  
SERVER_ADDR
 
::1
  
SERVER_ADMIN
 
postmaster@localhost
  
SERVER_NAME
 
localhost
  
SERVER_PORT
 
8081
  
SERVER_PROTOCOL
 
HTTP/1.1
  
SERVER_SIGNATURE
 
<address>Apache/2.4.7 (Win32) OpenSSL/0.9.8y mod_wsgi/3.5 Python/2.7.6 
PHP/5.4.25 Server at localhost Port 8081</address> 
  
SERVER_SOFTWARE
 
Apache/2.4.7 (Win32) OpenSSL/0.9.8y mod_wsgi/3.5 Python/2.7.6 PHP/5.4.25
  
SYSTEMROOT
 
C:\Windows
  
TMP
 
\xampp\tmp
  
WINDIR
 
C:\Windows
  
When I test my Hello World .wsgi program, Firefox simply returns the source 
code of my .wsgi file rather than the expected 'Hello Python World".  My 
understanding with mod_wsgi is that the shebang is not required.  I am a 
bit foggy as to how to setup the path so I following the instructions for 
installing mod_wsgi on XAMPP at the following web URL: 
https://community.apachefriends.org/f/viewtopic.php?t=42975
Sample helloworld.wsgi in same directory as pyinfo.py program:

def application(environ, start_response):
  status = '200 OK'
  output = 'Hello Python World!'
  response_headers = [('Content-type', 'text/plain'), ('Content-Length', 
str(len(output)))]
  start_response(status, response_headers)
  return [output]

Test URL: http://localhost:8081/UCLA/LearnPython/helloworld.wsgi

Also tried the same program with a helloworld.py but received the 500 HTML 
error

Apache Error Log:

[Sun Nov 09 09:00:01.395777 2014] [cgi:error] [pid 7978] [client ::1:42475] 
End of script output before headers: helloworld.py

Have attempted a similar configuration on my CentOS Linux 6.5 box with 
similar results.  In the linux environment I followed the Apache Friends 
link above and built my Python and mod_wsgi internally from the source tar 
gunzip files.

Best Regards;

Anthony Dycks


On Saturday, November 8, 2014 7:32:37 PM UTC-8, Graham Dumpleton wrote:
>
> The way of installing mod_wsgi using a setup.py file using 'python' 
> directly, or 'pip', will not be back ported to mod_wsgi 3.X as there is no 
> point when there is a newer version of mod_wsgi available. This style of 
> installation will likely not make its way to Windows either, or not soon. 
> Even if it does, mod_wsgi-express would not be available on Windows.
>
> If your concern is the lack of mod_wsgi version 4.X for Windows then I 
> wouldn't be overly concerned as you aren't missing out on much by only 
> having mod_wsgi 3.5 binaries being available for Windows at this point 
> because the majority of changes in 4.X relate to mod_wsgi daemon mode and 
> mod_wsgi-express and so aren't relevant to Windows.
>
> As to what is stopping there being binaries available for Windows for 
> mod_wsgi 4.X, it is purely the lack of updated makefiles for the Windows 
> platforms. I don't run a Windows machine any more and can't verify any 
> changes I might make to the makefiles. The mod_wsgi code itself still 
> should support Windows, although with no ability to compile it on Windows 
> myself, there is a greater chance I could be breaking things for Windows as 
> I refactor the code and improve it. That is not intentional though.
>
> The current makefiles for the Windows platform are currently in:
>
> * https://github.com/GrahamDumpleton/mod_wsgi/tree/develop/win32
>
> The following needs to happen for these to be brought up to date.
>
> * Compensate for the fact that the makefiles are now in a sub directory 
> and not the parent directory of the source code. Any path names to source 
> code files need to be changed.
> * Compensate for the fact that the source code files themselves are now 
> located in the src/server subdirectory and instead of there being only one 
> source code file, there are now many. All these source code files have to 
> be enumerated in the makefiles and any extra build targets created 
> appropriately.
> * Versions of the makefiles added for Python 3.3 and 3.4 (that for Python 
> 3.1 can be removed). The paths for the required Microsoft C compiler for 
> those Python versions need to be set appropriately.
> * Versions of the makefiles added for Apache 2.4.
>
> As I don't have Windows, what would be great is someone who could come up 
> with the changes. Even better, provide a Python script which can be used to 
> automatically generate the makefiles. This would be preferred as I am 
> continually splitting out the code into more files to make it easier to 
> work on. It would be good if I had a way of regenerating the makefiles 
> based on what is found in the src/server directory, rather than me having 
> to update them by hand.
>
> So what is the underlying reason as to why you asked your original 
> question.
>
> Graham
>
> On 09/11/2014, at 7:31 AM, Anthony Dycks <[email protected] <javascript:>> 
> wrote:
>
> Some additional Version background on my system environment:
>
>
>    - Platform: Windows 7 Pro 32-bit
>    - Python Installation: 
>       - Version 2.7.6 32 Bit 
>       - (Default Install for Multiple User; User installed had Admin 
>       privileges)
>    - LAMP Stack: XAMPP v1.8.2 32-bit
>    - Apache Server: v2.4.7
>    - mod_wsgi Install: Binary: mod_wsgi‑3.5.ap24.win32‑py2.7.zip
>
>
>
> On Saturday, November 8, 2014 10:10:24 AM UTC-8, Anthony Dycks wrote:
>>
>> From reading the Python PyPi Index descriptionon for mod_wsgi v4.3, I 
>> understand that mod_wsgi v4.3 can be installed within the Python 
>> Interpreter.  Can the latest release of mod_wsgi v3.5 be installed within 
>> the Python Interpreter as well?
>>
>> If I install mod_wsgi within the Python Interpreter do I need to remove 
>> the mod_wsgi3.5.so - private <http://mod_wsgi3.5.so/> module reference 
>> from the Apache httpd.conf file to prevent versioning and environment 
>> issues?
>>
>> Thanks!
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to