[mod_python] mod_python on FreeBSD 6.1 gives Syntax error - mod_python.so: unsupported file layout

Anthony Raj anthony_raj at persistent.co.in
Sat Jun 30 12:12:48 EDT 2007

Hi Folks,

Have come to the community with a new issue with regard to installing mod_python on FreeBSD.

Eariler had installed apache/mod_python on
Suse 10 / 64 Arch.
- Apache 2.2.4
- mod_python 3.3.1
- apr 1.2.8
- apr-util 1.2.8

problems -
The issue with mod_python being installed in to locations.
Managed to get it working on this setup sucessfully.

Now I've installed the same configuration on
Free BSD 6.1 32 Arch.
FreeBSD perputo3.inetu.net 6.1-RELEASE-p3 FreeBSD 6.1-RELEASE-p3 #107: Mon Nov  6 20:31:10 EST 2006     root at turnip.inetu.org:/usr/obj/usr/src/sys/INU6  i386

Installation was completed successfully for all the above modules.

But after adding the required configuration line -
LoadModule python_module modules/mod_python.so

And restarting apache , it throws the following error
/usr/local/apache-ast>./bin/apachectl start
httpd: Syntax error on line 54 of /usr/local/apache-ast/conf/httpd.conf: Cannot load /usr/local/apache-ast/modules/mod_python.so into server: /usr/local/apache-ast/modules/mod_python.so: unsupported file layout


The required mod_python.so appears to be installed in
/usr/local/apache-ast/modules directory.

/usr/local/apache-ast>ls -l modules/
total 1738
-rw-r--r--  1 root  wheel     8951 Jun 29 10:19 httpd.exp
-rwxr-xr-x  1 root  wheel  1739997 Jun 29 10:50 mod_python.so


Have also added the following lines in the config file -
<Directory "/usr/local/apache-ast/htdocs">
      AddHandler mod_python .py
      PythonHandler mod_python.publisher
      PythonDebug On


Any one knows if there is any bug with mod_python installation on FreeBSD 6.1. Please let me know in case you there is anything that is missing in the install steps.

Or is there any port of mod_python for Free BSD that needs to be used here.

Please let me know your advice on the same.


This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.

More information about the Mod_python mailing list