To shorten things, using mod_python.testhandler for some output with
the following apache directives:
----------------
<Location "/mysite">
SetHandler python-program
PythonPath "['/Working/django','/Working/modules','/Working/
projects','/Working/projects/mysite'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE rooftech.settings
PythonHandler mod_python.testhandler
#PythonHandler django.core.handlers.modpython
PythonDebug On
</Location>
-----------------
Gives me the following variable output to the browser:
----------------------
Apache version Apache/2.2.3 (Red Hat)
Apache threaded MPM No (single thread MPM)
Apache forked MPM Yes, maximum 256 processes
Apache server root /etc/httpd
Apache document root /var/www/html
Apache error log /etc/httpd/logs/error_log (view last 100 lines)
Python sys.version 2.4.3 (#1, Dec 11 2006, 11:38:52) [GCC 4.1.1
20061130 (Red Hat 4.1.1-43)]
Python sys.path =
/Working/django
/Working/modules
/Working/projects
/Working/projects/mysite
/usr/lib/python24.zip
/usr/lib/python2.4
/usr/lib/python2.4/plat-linux2
/usr/lib/python2.4/lib-tk
/usr/lib/python2.4/lib-dynload
/usr/lib/python2.4/site-packages
/usr/lib/python2.4/site-packages/Numeric
/usr/lib/python2.4/site-packages/gtk-2.0
-----------------------
So, this tells me that my variables are getting into the environment
under the PythonPath directive. But when I switch off of the
testhandler, back to django.core.handlers.modpython I get the
following error in the browser still:
-----------------------
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
287, in HandlerDispatch
log=debug)
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
461, in import_module
f, p, d = imp.find_module(parts[i], path)
ImportError: No module named django
-----------------------
My python sys.path variable has my directories that don't work on it
just like the default Python site-packages directory that does work.
I'm stumped.
Here are the permissions of those directories. Are there certain
permissions or ownership required?
------------------------
drwxr-xr-x 32 root root 4.0K Jan 14 14:24 /usr/lib/python2.4/site-
packages/
lrwxrwxrwx 1 root root 22 Jan 14 14:24 /usr/lib/python2.4/site-
packages/django -> /Working/django/django/
drwxr-xr-x 5 root root 4.0K Jan 11 15:03 /Working/
drwxr-xr-x 8 root root 4.0K Jan 14 11:27 /Working/django/
drwxr-xr-x 20 root root 4.0K Jan 14 15:17 /Working/django/django/
------------------------
I hope this simplifies it... Thank you so much for your attention.
Scott
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---