Date: Thu, 13 Sep 2001 06:37:22 -0500 (EST) From: "Philip M. Gollucci" <philip@p6m7g8.com> To: <freebsd-questions@FreeBSD.ORG> Subject: Test fails -- HELP !! Message-ID: <20010913063608.C68181-100000@p6m7g8.student.umd.edu>
next in thread | raw e-mail | index | archive | help
I'm pretty new to python, but have had lots of similiar experience with mod_perl/PERL and apache. I am a very good System Admin. I've install Python and mod_python via the documentation bundled with each. I tried the prog senario given here, http://drunken.student.umd.edu/manual-mod_python/inst-testing.html but I get a strange error message (SEE BELOW) Yes, I know there is a port in /usr/ports/www/mod_python, but its an old version and there are too many config changes because I am not using the apache port. Thanks for all you help in advance. uname -a FreeBSD drunken.student.umd.edu 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Sep 8 07:09:39 EST 2001 root@drunken.student.umd.edu:/usr/src/sys/compile/DRUNKEN i386 python -V Python 2.2a3 ./configure --prefix=/usr/home/src/python --without-threads mod_python compile: mod_python/2.7.6 ./configure --with-apxs=/usr/home/src/apache/apxs make dso su make install apachectl configtest: orginally, I got the warning: [Thu Sep 13 06:26:37 2001] [warn] Loaded DSO libexec/mod_python.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) but I added -DEAPI to CFLAGS in mod_python-2.7.6/src/Makefile reran make dso su make install and it dissappeared. ./httpd -X no warnings/errors apache banner: Apache/1.3.20 (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6b mod_python/2.7.6 Python/2.2a3 mod_perl/1.26 httpd -V Server version: Apache/1.3.20 (Unix) Server built: Sep 9 2001 05:14:30 Server's Module Magic Number: 19990320:10 Server compiled with.... -D EAPI -D EAPI_MM -D EAPI_MM_CORE_PATH="logs/httpd.mm" -D HAVE_MMAP -D USE_MMAP_SCOREBOARD -D USE_MMAP_FILES -D USE_FLOCK_SERIALIZED_ACCEPT -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D HTTPD_ROOT="/usr/home/src/apache" -D SUEXEC_BIN="/usr/home/src/apache/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard" -D DEFAULT_LOCKFILE="logs/httpd.lock" -D DEFAULT_XFERLOG="logs/access_log" -D DEFAULT_ERRORLOG="logs/error_log" -D TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" -D ACCESS_CONFIG_FILE="conf/access.conf" -D RESOURCE_CONFIG_FILE="conf/srm.conf" httpd.conf snippets: LoadModule python_module libexec/mod_python.so AddModule mod_python.c ### MOD PYTHOD ### Alias /python/ /usr/home/src/apache/python <Location /python> AddHandler python-program .py PythonHandler mptest PythonDebug On </Location> ### END MOD PYTHOD /usr/home/src/apache/python/mptest.py: from mod_python import apache def handler(req): req.send_http_header() req.write("Hello World!") return apache.OK Webpage Error message: Mod_python error: "PythonHandler mptest" Traceback (most recent call last): File "/usr/home/src/python/lib/python2.2/site-packages/mod_python/apache.py", line 181, in Dispatch module = import_module(module_name, _req) File "/usr/home/src/python/lib/python2.2/site-packages/mod_python/apache.py", line 335, in import_module f, p, d = imp.find_module(parts[i], path) ImportError: No module named mptest Apache Error Log Message: [Thu Sep 13 05:25:34 2001] [error] PythonHandler mptest: Traceback (most recent call last): [Thu Sep 13 05:25:35 2001] [error] PythonHandler mptest: File "/usr/home/src/python/lib/python2.2/site-packages/mod_python/apache.py", line 181, in Dispatch module = import_module(module_name, _req) [Thu Sep 13 05:25:35 2001] [error] PythonHandler mptest: File "/usr/home/src/python/lib/python2.2/site-packages/mod_python/apache.py", line 335, in import_module f, p, d = imp.find_module(parts[i], path) [Thu Sep 13 05:25:35 2001] [error] PythonHandler mptest: ImportError: No module named mptest Thanks again, Philip ------------------------------------------------------------------------------ Philip M. Gollucci (p6m7g8) philip@p6m7g8.com 301.314.3118 Science, Discovery, & the Universe (UMCP) Webmaster & Webship Teacher URL: http://www.sdu.umd.edu EJPress.com Database/PERL Programmer & System Admin URL : http://www.ejournalpress.com Resume : http://www.p6m7g8.com/resume-20010910_192426.txt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010913063608.C68181-100000>