mod_python testing failed with "make_obcallback(): could not import
mod_python.apache"
Suhaimi Jamalludin
suhaimi_sj at yahoo.com
Wed Aug 11 21:29:35 PDT 2004
Hi All,
Need your advice on mod_python.
I'm running FreeBSD5.2.1, apache 1.3.31 and
mod_python-2.7.10. I have done the configuration
seting on http.conf and restart my apache. Apache
runing fine, however during my mod_python testing I
got this error in my httpd-error.log.
Error Message:
make_obcallback(): could not import
mod_python.apache.
make_obcallback(): could not call init.
[Tue Aug 10 11:57:32 2004] [error] [client
10.1.4.118] python_handler:
make_obcallback returned no obCallBack!
Can somebody advice me please.
Appreciate your help.
regards,
suhaimi
My step-by-step for mod_python on FreeBSD5.2.1
-----------------------------------------------------
1) Installed python
# cd /usr/ports/lang/python
# make -DWITHOUT_THREADS install clean
2) Installed mod_python
# cd /usr/ports/www/mod_python
# make -DWANT_EAPI install clean
3) Modify apache configuration file
#vi /usr/local/etc/apache/http.conf
add below line at the end of the http.conf
----snip-----
<Directory /usr/local/www/cgi-bin/modpython>
AddHandler python-program .py
PythonHandler mptest
PythonDebug On
</Directory>
----snap-----
4) Create mptest.py
# vi /usr/local/www/cgi-bin/modpython/mptest.py
add below line in mptest.py
----snip-----
from mod_python import apache
def handler(req):
req.write("Hello World!")
return apache.OK
----snap-----
5) Restart Apache
# /usr/local/etc/rc.d/apache restart
6) Open Mozilla Web Browser type the mod_python test
file as below.
http://10.1.4.8/cgi-bin/modpython/mptest.py
Browser output:
Internal Server Error
The server encountered an internal error or
misconfiguration and was
unable to complete your request.
Please contact the server administrator,
root at local.domain and inform
them of the time the error occurred, and anything you
might have done
that may have caused the error.
More information about this error may be available in
the server error
log.
7) Check apache log file
# tail /var/log/httpd-error.log
[Tue Aug 10 11:57:24 2004] [notice] caught SIGTERM,
shutting down
[Tue Aug 10 11:57:28 2004] [notice] Apache configured
-- resumingnormal operations
[Tue Aug 10 11:57:28 2004] [notice] Accept mutex:
flock (Default: flock)
'import site' failed; use -v for traceback
make_obcallback(): could not import
mod_python.apache.
make_obcallback(): could not call init.
[Tue Aug 10 11:57:32 2004] [error] [client
10.1.4.118] python_handler: make_obcallback returned
no obCallBack!
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
More information about the freebsd-python
mailing list