[mod_python] [SPAM] Hello

Graham Dumpleton graham.dumpleton at gmail.com
Tue Mar 27 16:56:34 EST 2007


You probably haven't configured Apache correctly and it is trying to
run your script as a CGI script and not a mod_python application.

Try procedure and checks detailed in:

  http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking

Check your Apache error logs to ensure that mod_python is loading correctly.

Good idea to upgrade to mod_python 3.3.1 one as it is much more stable
and works better than the old version you have.

Graham

On 28/03/07, Idoia Villacián Zárate <fidita48 at hotmail.com> wrote:
>
>
> Hello:
>
> I have a one problem,when I compiled this program in Python
>
> from mod_python import apache
> def handler(req):
>         req.content_type = 'text/plain'
>         req.write("Hello World!")
>         return apache.OK
>
> It leaves following error to me:
>
> Traceback (most recent call last):
>   File "C:\Archivos de programa\Apache
> Group\Apache2\htdocs\mywebdir\mptest.py", line 1, in
> <module>
>     from mod_python import apache
>   File
> "C:\Python25\Lib\site-packages\mod_python\apache.py", line
> 30, in <module>
>     import _apache
> ImportError: No module named _apache
>
> I saw an other pages the error can be by the version,but my versions are
> compatible,I have mod_python 3.1,apache 2.0.59 and python2.5. If somebody
> can help me, thanks
> ________________________________
> Recibe ofertas de empleo adaptadas a tu perfil. Introduce tu CV en MSN
> Empleo.
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>



More information about the Mod_python mailing list