FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


mod_python outside cgi-bin





SurBiff
Hi!
i've just started to learn mod_python and im having a small problem.
if i put all my *py scripts in "cgi-bin" directory and put:

Code:

SetHandler python-program
PythonHandler mod_python.publisher


into the .htaccess in cgi-bin, everything works fine,

and i've tried to put my scripts in the "root" directory but i get a "500" and a "404" error. i've tried with all the stuff thats on the mod_python homepage but it just doesnt work.
lets say also that i've played around alot with the .htaccess file.

Is it actually so that it doesnt work or am i stupid?

//that last statement is on the house Smile
deepak
I guess you'r not stupid, this problem occurs with everyone who just dive into mod_python. Truefuly, I never accepted mod_python as python cgi. The best is to run python as cgi rather than via mod_python. Try below one
Code:

SetHandler python-program
   PythonHandler common.dispatch.dispatcher
   PythonDebug On


Good luck
SurBiff
Thanks for the reply Smile
I dont know either python-cgi or mod_python , therefore i choosed the one that all talks about as a speed up and simple way of implementing python, i dont know if thats true or not, i just like the way its possible to some cool stuff with python Cool

I'l get back when i've had the chance to try out the code Smile
SurBiff
Now i didnt get the chance to try out the code you brought.

instead i solved it with a meta tag in the index.html file:

Code:
<meta HTTP-EQUIV="REFRESH" content="0"; url="URL/TO/INDEX.PY">


That does it Smile[/code]
Related topics
cgi script outsite cgi-bin
cgi-bin help
CGI-BIN
cgi-bin directory?
Setup cgi-bin in apache
Which scripting languages into CGI-Bin?
Python via CGI - A personal triumph
Python via CGI - A personal triumph
about cgi setup
frihost hositng...can run the .cgi ?
how to run the cgi at frihost???
CGI-bin script help
SEARCHING FOR MR. GOOD-WAR
Looking for easy FormMail Script
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.