[mod_python] Some problems with mod_python.publisher

Luis Sousa llsousa at ualg.pt
Mon Sep 8 11:48:53 EST 2003

Michel Thadeu wrote:

>Hi guys!
>I having trouble with mod_python.publisher, I using a apache 1.2.27 and
>the mod_python 2.7 (the standard version of debian testing).
>I have configured the apache like this:
>   <Directory /var/www/modpython>
>     AddHandler python-program .py
>     PythonHandler mod_python.publisher
>   </Directory>
>And have made a script named index.py with the next code:
>   from mod_python import apache
>   def executar(req):
>           req.content_type="text/html"
>           req.send_http_header()
>           req.write('<H1>Some test of executar!</H1>')
>           return apache.OK
The code here can be something like this:
s="<html><h1>hello world</h1></html>"
return s

When using mod_python.publisher you have to return a string
Luis Sousa

>But when I execute this script, using the next url...
>   http://localhost/modpython/index.py/executar
>The page is open, rendening html code, and all the things, but with a
>error message:
>   Some test of executar!
>   HTTP/1.1 200 OK Date: Tue, 17 Jun 2003 23:36:26 GMT Server: 
>   Apache/1.3.27 (Unix) Debian GNU/Linux mod_python/2.7.8 Python/2.2.2 
>   PHP/4.1.2 Connection: close Transfer-Encoding: chunked Content-Type:
>   text/html; charset=iso-8859-1
>   OK
>   The server encountered an internal error or misconfiguration and was
>   unable to complete your request.
>   Please contact the server administrator, webmaster at capsulecorp 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.
>But if I use PythonHanldler and name executar as handler, the error is
>not shown... I read the last lines of error.log of apache, but I don't
>found a critical error:
>   [Tue Jun 17 21:42:29 2003] [alert] apache: Could not determine the 
>   server's fully qualified domain name, using for ServerName
>   [Tue Jun 17 21:42:30 2003] [notice] Apache/1.3.27 (Unix) Debian 
>   GNU/Linux mod_python/2.7.8 Python/2.2.2 PHP/4.1.2 configured -- 
>   resuming normal operations
>   [Tue Jun 17 21:42:30 2003] [notice] suEXEC mechanism enabled 
>   (wrapper: /usr/lib/apache/suexec)
>   [Tue Jun 17 21:42:30 2003] [notice] Accept mutex: sysvsem (Default: 
>   sysvsem)
>This is the last errors since the last restart of apache...
>Well, I don't know what error I made, can someone help me?
>Michel Thadeu Sabchuk
>Curitiba - Paraná - Brazil
>Michel Thadeu Sabchuk
>Yahoo! Mail
>Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus, proteção contra spam.
>Mod_python mailing list
>Mod_python at modpython.org

Luis Sousa
Especialista de Informática
Gabinete de Gestão de Informação, ext: 7837
Campus de Gambelas
Universidade do Algarve, tel: 289800900

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3627 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mailman.modpython.org/pipermail/mod_python/attachments/20030908/1f41dfc5/smime-0003.bin

More information about the Mod_python mailing list