Guidelines of Installation Python
tested on mod_python 2.7.11 and Python 2.3.5 on Debian Sarge with Apache 1.3
*USE AT YOUR OWN RISK*
- download mod_python 2.7.11 and Python 2.3.5
- configure and compile Python:
./configure --enable-shared --without-threads && make && make install
- configure mod_python:
./configure --with-apxs=/usr/sbin/apxs \
--with-apache=/usr/local/directadmin/customapache/apache_1.3.XX --with-python=*path of Python 2.3.5*
where XX is you subversion
generally during configuration and compilation you receive multiple errors had to recognized wrong paths for binary and libs. You patch this, creating symbolic links to you bin directory of Python and copying libpython2.3.a to /usr/lib
- if configuration is passed modify file src/Makefile in mod_python directory:
find the "LIBS" string and it assures to you that it is setin this way:
LIBS=-lm -lutil -lpthread *path of Python 2.3.5*/libpython2.3.a
- make && make install
- Configure Apache 1.3
verify in httpd.conf this strings:
---cut---
<IfDefine HAVE_PYTHON>
LoadModule python_module modules/mod_python.so
</IfDefine>
---cut---
<IfDefine HAVE_PYTHON>
AddModule mod_python.c
</IfDefine>
- add after <Directory "/var/www/html">...</Directory>
<IfModule mod_python.c>
AddHandler python-program .py
PythonHandler index
PythonDebug On
</IfModule>
- change DocumentRoot to "/home" to apply effect automatically to all directory of users
- add in all virtualhost into tags <Directory "/path/of/public_html">...</Directory>
AddHandler python-program .py
PythonHandler index
PythonDebug On
- restart apache 1.3
error that i have find during the installation:
-- sem_wait(): this error appears when you compile Python with threads (recompile Python with --without-threads in ./configure)
-- openpty: this error appears when you don't add -lutil in row "LIBS" into src/Makefile after configuration of mod_python
if you see this line:
Loaded DSO modules/mod_python.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with --DEAPI)
python is installed. This warning is a bug documented of python. Don't use python with SSL connection!
I hope of to have been of aid.
If someone test to install python with these guidelines it is invited to complete these suggestions.
Sorry for my english
tested on mod_python 2.7.11 and Python 2.3.5 on Debian Sarge with Apache 1.3
*USE AT YOUR OWN RISK*
- download mod_python 2.7.11 and Python 2.3.5
- configure and compile Python:
./configure --enable-shared --without-threads && make && make install
- configure mod_python:
./configure --with-apxs=/usr/sbin/apxs \
--with-apache=/usr/local/directadmin/customapache/apache_1.3.XX --with-python=*path of Python 2.3.5*
where XX is you subversion
generally during configuration and compilation you receive multiple errors had to recognized wrong paths for binary and libs. You patch this, creating symbolic links to you bin directory of Python and copying libpython2.3.a to /usr/lib
- if configuration is passed modify file src/Makefile in mod_python directory:
find the "LIBS" string and it assures to you that it is setin this way:
LIBS=-lm -lutil -lpthread *path of Python 2.3.5*/libpython2.3.a
- make && make install
- Configure Apache 1.3
verify in httpd.conf this strings:
---cut---
<IfDefine HAVE_PYTHON>
LoadModule python_module modules/mod_python.so
</IfDefine>
---cut---
<IfDefine HAVE_PYTHON>
AddModule mod_python.c
</IfDefine>
- add after <Directory "/var/www/html">...</Directory>
<IfModule mod_python.c>
AddHandler python-program .py
PythonHandler index
PythonDebug On
</IfModule>
- change DocumentRoot to "/home" to apply effect automatically to all directory of users
- add in all virtualhost into tags <Directory "/path/of/public_html">...</Directory>
AddHandler python-program .py
PythonHandler index
PythonDebug On
- restart apache 1.3
error that i have find during the installation:
-- sem_wait(): this error appears when you compile Python with threads (recompile Python with --without-threads in ./configure)
-- openpty: this error appears when you don't add -lutil in row "LIBS" into src/Makefile after configuration of mod_python
if you see this line:
Loaded DSO modules/mod_python.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with --DEAPI)
python is installed. This warning is a bug documented of python. Don't use python with SSL connection!
I hope of to have been of aid.
If someone test to install python with these guidelines it is invited to complete these suggestions.
Sorry for my english

Last edited: