Joshua Ginsberg
listspam at flowtheory.net
Wed Jul 13 14:26:22 EDT 2005
The absolute first thing you need to do is add PythonDebug to your .htaccess file so you won't have to pester him for the error log output. -jag -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.jpg Type: image/jpeg Size: 1984 bytes Desc: not available Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050713/d0129993/unknown.jpg -------------- next part -------------- Joshua Ginsberg -- joshg at brainstorminternet.net Brainstorm Internet Network Operations 970-247-1442 x131 On Jul 13, 2005, at 12:11 PM, Alexandre F. Santos wrote: > > Hello, > > I would like to use mod_python but I'm having problems getting it to > work. I > know you hate to answear newbie questions, but please note: > > - I managed to convince an admin to install mod_python on his server, > and so > far he has been cooperative. But still, I don't have previleged access > to > the server, and must ask his help to get mod_python to work. > > - I have read a bit of documentation on mod_python, and also the nice > http://www.dscpl.com.au/articles/modpython-001.html tutorial. But I > had no > luck so far. > > Here are the specs I could gather about the server: > > Python 2.3.5 > mod_python 3.1.3 > Apache server handler API 2.0 (20020903) > > Mod_python shows up in the apache configuration (as seen by > phpinfo()). I > asked the admin to do the test recommended in the tutorial to identify > mod_python and send me the output: > ------------------- > # python > Python 2.3.5 (#2, May 4 2005, 08:51:39) > [GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import mod_python.psp > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/lib/python2.3/site-packages/mod_python/psp.py", line 20, > in ? > import apache, Session, util, _psp > File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line > 28, in > ? > import _apache > ImportError: No module named _apache >>>> > ------------------- > > So mod_python 3.1.3 seems indeed to be installed and working. > > I created a home/xp/ folder where I put a hello.txt file and verifyed > that I > could access it via the web. > > I then created there an .htaccess file: > AddHandler python-program .py > PythonHandler mptest > PythonDebug On > > and a mptest.py file: >> from mod_python import apache > > def handler(req): > req.content_type = 'text/plain' > req.send_http_header() > req.write('mptest.py\n') > return apache.OK > > Going for the /xp/mptest.py file with my browser yielded the following: > ------------------------- > Internal Server Error > > The server encountered an internal error or misconfiguration and was > unable > to complete your request. > > Please contact the server administrator, [no address given] and inform > them > of the time the error occurred, and anything you might have done that > may > have caused the error. > > More information about this error may be available in the server error > log. > ------------------------- > > Now of course I don't have access to the server error log, but before I > contact the admin, could you give me some indications about what could > be > wrong and what would be the best approach to address this issue? > > Thanks, > > Alex > > -- > GMX DSL = Maximale Leistung zum minimalen Preis! > 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: > http://www.gmx.net/de/go/dsl > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|