[mod_python] XML - RPC help

Trevor West trevorw at qalabs.com
Sat Sep 17 13:51:09 EDT 2005


Hi, thanks for the response

I have tried

#!/usr/bin/python and #!python
and got in the error logs
[Sat Sep 17 10:28:53 2005] [error] [client 172.16.38.221] (2)No such 
file or directory: exec of 
'/usr/local/apache2/cgi-bin/example4_server.py' failed


Tried
#!/usr/bin/env python
and got
[Sat Sep 17 10:27:25 2005] [error] [client 172.16.38.221] /usr/bin/env: 
python\r: Permission denied
I checked and env is read and executable for everyone.

I think you are right the first line is the problem, but now I'm stuck 
as to what it should be.

Cheers

Trevor



Nicolas Lehuen wrote:

> Hi,
>
> Apparently you need to put a proper script header (on the first line 
> of your script) with the path to the Python interpreter for the CGI to 
> work, something along the lines of :
>
> #!/path/to/python/executable
>
> Or :
>
>|#!/usr/bin/env python|
>
>
> Now, to write CGIs, you don't need mod_python at all, actually in your 
> setup mod_python is not used  !
>
> Regards,
> Nicolas
>
> 2005/9/16, Trevor West <trevorw at qalabs.com <mailto:trevorw at qalabs.com>>:
>
>     Hello everyone:
>
>     Machine:  x86 Fedora Core 2
>                     Apache 2.0
>                     Mod_python 3.1
>                     Python 2.3
>
>
>
>     Here's my problem, I'm starting on a new project and for this one I'm
>     supposed to use a CGI based XML-RPC server to accept
>     communications from
>     a java applet. I understand how XML-RPC works and have many fine
>     examples working, what I can't seem to get working is the CGI
>     part. For
>     whatever reason the CGI's won't work on the Fedora Core 2 linux
>     server.
>
>     I'm currently just trying the example given here:
>     http://docs.python.org/lib/node556.html
>     <http://docs.python.org/lib/node556.html> and it works on my
>     Windows box
>     but not on the linux box.
>
>     The error I get in my Apache log is:
>     [Fri Sep 16 14:19:56 2005] [error] [client 172.16.38.221
>     <http://172.16.38.221>] (2)No such
>     file or directory: exec of
>     '/usr/local/apache2/cgi-bin/example4_server.py' failed
>     [Fri Sep 16 14:19:56 2005] [error] [client 172.16.38.221
>     <http://172.16.38.221>] Premature end
>     of script headers: example4_server.py
>
>     Now does anyone know why this is happening? Do I need special
>     lines in
>     my httpd.conf file for the CGI's? Here's my current cgi-bin setup:
>
>     <Directory "/usr/local/apache2/cgi-bin">
>         AllowOverride None
>         Options None
>         Order allow,deny
>         Allow from all
>     </Directory>
>
>     I do have the line to load the mod_python and I use the publisher
>     in my
>     main htdocs.
>
>     So any ideas?
>
>     Cheers
>
>     Trevor
>
>
>
>
>     _______________________________________________
>     Mod_python mailing list
>     Mod_python at modpython.org <mailto:Mod_python at modpython.org>
>     http://mailman.modpython.org/mailman/listinfo/mod_python
>     <http://mailman.modpython.org/mailman/listinfo/mod_python>
>
>


More information about the Mod_python mailing list