From owner-freebsd-python@FreeBSD.ORG Thu Aug 12 04:29:35 2004 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F67616A4CE for ; Thu, 12 Aug 2004 04:29:35 +0000 (GMT) Received: from web53402.mail.yahoo.com (web53402.mail.yahoo.com [206.190.37.49]) by mx1.FreeBSD.org (Postfix) with SMTP id 1553E43D2D for ; Thu, 12 Aug 2004 04:29:35 +0000 (GMT) (envelope-from suhaimi_sj@yahoo.com) Message-ID: <20040812042934.95532.qmail@web53402.mail.yahoo.com> Received: from [192.228.129.114] by web53402.mail.yahoo.com via HTTP; Wed, 11 Aug 2004 21:29:34 PDT Date: Wed, 11 Aug 2004 21:29:34 -0700 (PDT) From: Suhaimi Jamalludin To: freebsd-python@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: mod_python testing failed with "make_obcallback(): could not import mod_python.apache" X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2004 04:29:35 -0000 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----- AddHandler python-program .py PythonHandler mptest PythonDebug On ----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@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