|
Your comment on
|
||
![]() |
||
FarbflashMultimedia Production |
|
||
|
home :: Dokumente :: MacOSX :: Leopard :: ApacheModules :: python_module.html Montag, 21 April 2008mod_python on leopardmod_python on Leopard Compiling mod_python on Leopard is not as simple as it would appear. The default install only builds a i386 version that fails when restarting Apache with the error: httpd: Syntax error on line ** of /Users/*******/Downloads/mod_python-3.3.1/test/conf/test.conf: Cannot load /usr/libexec/apache2/mod_python.so into server: dlopen(/usr/libexec/apache2/mod_python.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_python.so: mach-o, but wrong architecture my own rundown is: downloaded mod_python: wget http://www.apache.org/dist/httpd/modpython/mod_python-3.3.1.tgz unstuff: tar -xzf mod_python-3.3.1.tgz cd mod_python-3.3.1 configure with apxs (actually I think a simple ./configure would also do) ./configure --with-apxs=/usr/sbin/apxs now patch src/MakeFile:
and now: make && sudo make install now edit your apache config file (sudo nano /etc/apache2/httpd.conf) in order to load mod_python add (or uncomment) the following line: LoadModule python_module libexec/apache2/mod_python.so In order to test whether mod_python works add the following to your apache config: <Location /mpinfo> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler mod_python.testhandler </Location> restart the apache webserver (sudo apachectl graceful) and point your browser to localhost/mpinfo That should give you a page with the mod_python configuration info You can check the architecture of your mod_python module in the terminal with: file /usr/libexec/apache2/mod_python.so It should return the following result: /usr/libexec/apache2/mod_python.so: Mach-O universal binary with 3 architectures /usr/libexec/apache2/mod_python.so (for architecture x86_64): Mach-O 64-bit bundle x86_64 /usr/libexec/apache2/mod_python.so (for architecture ppc7400): Mach-O bundle ppc /usr/libexec/apache2/mod_python.so (for architecture i386): Mach-O bundle i386 Comments: Thursday, 29.November 2007 22:47:11 Nicolas wrote: Add comment | /Dokumente/MacOSX/Leopard/ApacheModules | permanent link |
Farbflash trac projects
Search
Tag cloud
apache,
apache
Category
RSS Feed
Links
Contact
Disclaimer
Donate
If one of the open source examples on this page helped you to get a
paid job delivered, you might want to contribute and support my work
by donating via PayPal...
Private
|
||