Bart
scarfboy at gmail.com
Thu Aug 21 06:08:55 EDT 2008
Check the contents of what it downloads. It might be some other mod_python error (see also your apache error logs, it may tell you more), or might be the python source which would probably mean that the AddHandler/SetHandler does not affect the specific path for some reason. Regards, --Bart On Thu, Aug 21, 2008 at 10:39 AM, Simon Bierbaum <bierbaum at vierfalt.com> wrote: > What's in the file it lets you download? Download box sounds to me like a > MIME type problem, i.e. your browser does not know how to display what it's > being served by apache. req.content_type = 'text/plain' is correct, though. > Maybe there's another directive in your httpd.conf which conflicts with > this? Can you look at the HTTP response in Firefox with the Tamper Data > add-on? > > Simon > > Am 21.08.2008 um 08:28 schrieb hh at dsgx.org: > >> now after setting pythonpath like u guys need on freebsd im getting a >> download box when i try to execute the python script >> and i also added this to the directory >> AllowOverride FileInfo >> >> but still poping any idea ? thanks >> >> --- >> hh at dsgx.org escreveu: >>> >>> Still the same >>> check the outcome >>> http://www.dsgx.org/trac/mptest.py >>> i solved the issue of the threading with including lib into apache now >>> only problem is making the program run the .py >>> btw im running freebsd 6.2 >>> >>> >>> Simon Bierbaum escreveu: >>>>>>> >>>>>>> PythonHandler mptest >>>>>>> [...] >>>>>>> /home/augusto/www/trac/test.py >>>> >>>> >>>> Shouldn't the file be named mptest.py? >>>> >>>> Am 20.08.2008 um 23:52 schrieb hh at dsgx.org: >>>> >>>>> Ya i went there but still same problem from what i think is loading >>>>> issue of mod_python.so so insted of using it . it just dumps the text into >>>>> the screen >>>>> :( >>>>> >>>>> Graham Dumpleton escreveu: >>>>>> >>>>>> Try starting over, including removing: >>>>>> >>>>>> AddHandler python-program .py >>>>>> >>>>>> at global scope in configuration and follow instructions and debugging >>>>>> tips in: >>>>>> >>>>>> >>>>>> http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking >>>>>> >>>>>> Graham >>>>>> >>>>>> 2008/8/21 hh at dsgx.org <hh at dsgx.org>: >>>>>> >>>>>>> I installed mod_python using freebsd 6.x thru ports >>>>>>> /usr/ports/www/mod_python3 >>>>>>> mod_python module was installed in >>>>>>> -- >>>>>>> -rwxr-xr-x 1 root wheel 121971 Aug 20 02:18 >>>>>>> /usr/local/libexec/apache2/mod_python.so >>>>>>> -- >>>>>>> Added the line into my httpd.conf >>>>>>> LoadModule python_module /usr/local/libexec/apache2/mod_python.so >>>>>>> PythonOption mod_python.mutex_directory "/tmp" >>>>>>> AddIcon /icons/p.gif .pl .py >>>>>>> AddHandler python-program .py >>>>>>> >>>>>>> and tried to do that hello world test >>>>>>> ---- >>>>>>> settup a directory entry like on tutorial >>>>>>> -- >>>>>>> <Directory /home/augusto/www/trac> >>>>>>> AddHandler mod_python .py >>>>>>> PythonHandler mptest >>>>>>> PythonDebug On >>>>>>> </Directory> >>>>>>> ---- >>>>>>> -rwxr-xr-x 1 wwwrun wwwrun 216 Aug 20 01:31 >>>>>>> /home/augusto/www/trac/test.py >>>>>>> -- >>>>>>> inside -> >>>>>>> from mod_python import apache >>>>>>> >>>>>>> def handler(req): >>>>>>> req.content_type = 'text/plain' >>>>>>> req.write("Hello World!") >>>>>>> return apache.OK >>>>>>> ---- >>>>>>> >>>>>>> the error_log from my apache to make sure that the mod_python module >>>>>>> was >>>>>>> loaded >>>>>>> -> >>>>>>> Wed Aug 20 13:15:25 2008] [notice] Apache/2.0.63 (Unix) >>>>>>> mod_python/3.3.1 >>>>>>> Python/2.5.2 PHP/4.4.9 configured -- resuming normal operations >>>>>>> --- >>>>>>> >>>>>>> >>>>>>> Everything seems to be normal but insted of reading the file it just >>>>>>> dumps >>>>>>> the text to my browser any ideias ??? Thanks alot. >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Mod_python mailing list >>>>>>> Mod_python at modpython.org >>>>>>> http://mailman.modpython.org/mailman/listinfo/mod_python >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Mod_python mailing list >>>>> Mod_python at modpython.org >>>>> http://mailman.modpython.org/mailman/listinfo/mod_python >>>> >>>> _______________________________________________ >>>> Mod_python mailing list >>>> Mod_python at modpython.org >>>> http://mailman.modpython.org/mailman/listinfo/mod_python >>>> >>> >>> >> >> _______________________________________________ >> Mod_python mailing list >> Mod_python at modpython.org >> http://mailman.modpython.org/mailman/listinfo/mod_python > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|