Joseph Sliz
jsliz at fluentenergy.com
Tue Mar 18 12:21:05 EDT 2008
My environment is as follows: Windows XP Prof 2002 sp2 > Python 2.4.3 > Apache 2.2.8 > mod_python 3.3.1 I have added the following lines to the Apache httpd.conf file: LoadFile "C:/Python24/Python24.dll" LoadModule python_module modules/mod_python.so Servername is the following: ServerName localhost:80 Under the "DocumentRoot" section of the Apache httpd.conf file, I changed the following: <Directory/> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> TO: <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/"> AddHandler mod_python .py PythonHandler hello PythonDebug On Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> The rest of the Apache httpd.conf file is the same as was when Apache 2.2.8 was installed I have added the following python module to the Apache2.2/htdocs directory: >From mod_python import apache Def handler(req): req.content_type = 'text/plain' req.write("Hello World!") return apache.OK When I enter the request http://localhost/ into my browser(IE) I receive "It Works" from the index.html file contained in the Apache2.2/htdocs directory....This is good. When I enter the request http://localhost/hello.py into my browser(IE) I receive the following: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin at localhost 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. The message I get in the server error log is as follows: ImportError: No module named mod_python.apache [Tue Mar 18 12:11:04 2008] [error] make_obcallback: Python path being used "['C:\\\\Python24\\\\python24.zip', '.\\\\DLLs', '.\\\\lib', '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk', 'C:\\\\Program Files\\\\Apache Software Foundation\\\\Apache2.2\\\\bin']". [Tue Mar 18 12:11:04 2008] [error] get_interpreter: no interpreter callback found. [Tue Mar 18 12:11:04 2008] [error] [client 127.0.0.1] python_handler: Can't get/create interpreter Can someone please help me with this issue. I have no other version of python installed on my pc. I have installed and re-installed both Apache and Mod_python to no success. Can anyone please shed some light on what the problem is??? It shouldn't be this hard!!! Joseph Sliz, Jr. Data Analyst/Programmer jsliz at fluentenergy.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080318/cf98c4e6/attachment.html
|