Fwd: [SPAM] Re: [mod_python] Apache/2.0.63 poping download box

Graham Dumpleton graham.dumpleton at gmail.com
Sun Aug 24 02:19:37 EDT 2008


2008/8/24 hh at dsgx.org <hh at dsgx.org>:
> The directory you are doing things in, must be underneath a directory
> identified by <Directory> directive in main Apache configuration file.
> I want to know what that <Directory> directive container in main
> Apache configuration had in it. That will tell me whether any
> .htaccess file in the directory would even be read. Separately, I want
> to also know what was in the .htaccess file.
>
> --
> What i got is
> PythonPath "['/usr/local/lib/python2.5', '/home/augusto/www/trac']"

Which is nearly always wrong as you have completely blown away the
existing value of the Python module search path. You should be adding
to existing value, not replacing it. See:

  http://www.modpython.org/live/current/doc-html/dir-other-pp.html

In particular the example:

  PythonPath "sys.path+['/mydir']"

You also didn't need to be adding '/home/augusto/www/trac' to the
module search path anyway as mod_python wll look there for you anyway.

It is almost like you should not have set PythonPath at all. The
document I referred you to does not set PythonPath.

> in the global scope like they said to put for freebsd users
> on directory i have
> <Directory /home/augusto/www/trac>
>       AddHandler mod_python .py
>       PythonHandler mptest
>       PythonDebug On
>       AllowOverride FileInfo
>
> </Directory>
>
> --
> I dont have any .htaccess file in the directory from what i read u can
> either set on httpd.conf or there.

Yes you can, but using .htaccess generally shows better and easier
what people are doing wrong.

Maybe you undo all your changes, including PythonPath and that
Directory directive contents, except for FileInfo override and perhaps
start over and follow the instructions in document I directed you to
as written.

Graham

> The path to the file is
> -rwxr-xr-x  1 wwwrun  wwwrun  216 Aug 20 01:31
> /home/augusto/www/trac/mptest.py
> --
> error_log from apache
> [Sat Aug 23 12:27:42 2008] [notice] mod_python: Creating 8 session mutexes
> based on 150 max processes and 0 max threads.
> [Sat Aug 23 12:27:42 2008] [notice] mod_python: using mutex_directory /tmp
> [Sat Aug 23 12:27:42 2008] [notice] Apache/2.0.63 (Unix) mod_python/3.3.1
> Python/2.5.2 PHP/4.4.9 configured -- resuming normal operations
>
>
> Graham Dumpleton escreveu:
>>
>> 2008/8/22 hh at dsgx.org <hh at dsgx.org>:
>>
>>>
>>> ->
>>>
>>> When you followed instructions in document I referred to, what
>>> mod_python related configuration was in your main Apache configuration
>>> and what was in your .htaccess file?
>>>
>>> ---
>>>
>>> ImportError: No module named _apache
>>>
>>
>> Can't see how that was relevant to the particular question I had.
>>
>>
>>>
>>> it means that you have mod_python version 3.2. If you see the Python
>>> exception:
>>>
>>
>> If you are using mod_python 3.2, I would though strongly recommend
>> updating to 3.3.1.
>>
>>
>>>
>>> bout .htaccess file from what i readed was or <directory> entry or
>>> .htaccess
>>> file or gotta be both ?
>>>
>>
>> The directory you are doing things in, must be underneath a directory
>> identified by <Directory> directive in main Apache configuration file.
>> I want to know what that <Directory> directive container in main
>> Apache configuration had in it. That will tell me whether any
>> .htaccess file in the directory would even be read. Separately, I want
>> to also know what was in the .htaccess file.
>>
>> That directory must also somehow be mapped to for a URL. That means,
>> it must be under DocumentRoot, or referenced by an Alias directory.
>> Show the parts of your main Apache configuration that show how the
>> directory is even mapped to for a URL.
>>
>> Graham
>>
>>
>
>


More information about the Mod_python mailing list