Jump to content

[Solved] Help with mod_python.


anirudh

Recommended Posts

How do you impliment mod_python in Heliohost? In the snake charmer page it is said that mod_python module in installed. Is there something to be done to apache? My script shows an error 500 page :huh: . I have set my chmod permission to 755 and put hashbang statement in the first line. Someone please help me. Apologies for my bad english.

 

Page address : http://anirudh.ind.in/cgi-bin/test.py

 

Page source code :

 

#!/usr/bin/python
from mod_python import apache
def index(req):
        req.log_error('handler')
        req.content_type = 'text/html'
        req.send_http_header()
        req.write('Content-type: text/html\n')
        req.write('<html><head><title>test</title></head><body>')
        req.write('Hello World')
        req.write('</body></html>')
        return apache.OK

Link to comment
Share on other sites

Ohh silly me, I forgot to add handler. Now I have put the following code in the .htaccess

 

  AddHandler mod_python .py
  PythonHandler mod_python.publisher
  PythonDebug On

 

But still it is showing error 500 page. Is it because I dint reatart apache? If so how do i do it?

 

Link to comment
Share on other sites

We don't have mod_python. The loaders are specified here - neither of them are mod_python.

 

The mod_python references you're seeing in the Snake Charmer page are just default libraries that exist in Python for interfacing with mod_python.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...