Gregory Trubetskoy
grisha at modpython.org
Wed Jun 21 18:00:25 EST 2000
How about when you rename test.py to mptest.py and change the PythonHandler directive accordingly? Grisha On Wed, 21 Jun 2000, Miguel Marques wrote: > On Tue, 20 Jun 2000 22:00:16 -0400 (EDT), Gregory Trubetskoy <grisha at modpython.org> wrote: > > > > On Tue, 20 Jun 2000, Gregory Trubetskoy wrote: > > > > > I am almost certain that this is caused by > > > > > > 1. a syntax error in test.py > > > 2. a permissions problem > > > > OR > > > > 3. If the PythonHandler directive is in httpd.conf outside any <Directory> > > tags, or if PythonHandler is inside a <Directory> different from that in > > which test.py is, then /usr/local/lib/python1.5/test/ gets imported > > instead, which, of course, doesn't have a function called "handler". > > > > HTH > > > > Grisha > > > Well, I have the same problem. I've tried everything I can think of. > This also happened with mod_python/2.2. > My setup is > SunOS 5.7 Apache/1.3.12 (Unix) ApacheJServ/1.1 mod_perl/1.24 mod_python/2.4 Python/1.5.2 > > 1. I can run test.py with python as apache (my server run under username apache) > 2. I think 1. rules it out and I've checked the permissions of the all > the python files. > 3. my directive is > > <Directory "/usr/local/apache/htdocs/test"> > AddHandler python-program .py > PythonHandler test > PythonDebug on > </Directory> > and test.py is in /usr/local/apache/htdocs/test > > I always get: > > ERROR mod_python: "PythonHandler test" > > Traceback (innermost last): > > File "/usr/local/lib/python1.5/site-packages/mod_python/apache.py", line 96, in Dispatch > object = self.resolve_object(module, object_str) > > File "/usr/local/lib/python1.5/site-packages/mod_python/apache.py", line 42, in resolve_object > obj = getattr(obj, obj_str) > > AttributeError: handler > > being somewhat new to python I'm unsure on how to proceed to figure > this out. > Any suggestions? > TIA... > > Miguel > > C. Miguel Marques, York University, Computing & Communications Services > e-mail: miguel at yorku.ca, voice: (416)736-2100x22684, fax: (416)736-5830 > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://www.modpython.org/mailman/listinfo/mod_python >
|