ΚΥ΅½<br><br><div><span class="gmail_quote">2008/1/13, <a href="mailto:twisted-python-request@twistedmatrix.com">twisted-python-request@twistedmatrix.com</a> <<a href="mailto:twisted-python-request@twistedmatrix.com">twisted-python-request@twistedmatrix.com
</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send Twisted-Python mailing list submissions to<br> <a href="mailto:twisted-python@twistedmatrix.com">
twisted-python@twistedmatrix.com</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br> <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
</a><br>or, via email, send a message with subject or body 'help' to<br> <a href="mailto:twisted-python-request@twistedmatrix.com">twisted-python-request@twistedmatrix.com</a><br><br>You can reach the person managing the list at
<br> <a href="mailto:twisted-python-owner@twistedmatrix.com">twisted-python-owner@twistedmatrix.com</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Twisted-Python digest..."
<br><br><br>Today's Topics:<br><br> 1. problem with twcgi.PHPScript (Ottavio Campana)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sat, 12 Jan 2008 17:52:25 +0100
<br>From: Ottavio Campana <<a href="mailto:ottavio@campana.vi.it">ottavio@campana.vi.it</a>><br>Subject: [Twisted-Python] problem with twcgi.PHPScript<br>To: <a href="mailto:twisted-python@twistedmatrix.com">twisted-python@twistedmatrix.com
</a><br>Message-ID: <<a href="mailto:20080112165225.GA13692@campana.vi.it">20080112165225.GA13692@campana.vi.it</a>><br>Content-Type: text/plain; charset=us-ascii<br><br>Hi, I'm trying to add the possibility of executing some php pages from
<br>an application developed with twisted web.<br><br>I define the VWGPhpScript class as follows, adding the REDIRECT_STATUS<br>because the debian package complains about it.<br><br>class VWGPhpScript (twcgi.FilteredScript
):<br> filter = '/usr/lib/cgi-bin/php5'<br> def runProcess(self, env, request, qargs=[]):<br> p = twcgi.CGIProcessProtocol(request)<br> env['REDIRECT_STATUS'] = '200'<br> reactor.spawnProcess
(p, self.filename, [self.filename]+qargs, env, os.path.dirname(self.filename))<br><br>This is the error I get:<br><br>2008/01/12 17:34 CET [-] CGI /directory/index.php exited with exit code 1<br>2008/01/12 17:34 CET [-] Errors from CGI /directory/index.php: Upon execvpe /tmp/index.php ['/tmp/index.php'] in environment id -1217401212
<br> :Traceback (most recent call last):<br> File "/usr/lib/python2.4/site-packages/twisted/internet/process.py", line 377, in __init__<br> command, args, environment)<br> File "/usr/lib/python2.4/site-packages/twisted/internet/process.py", line 539, in _execChild
<br> os.execvpe(command, args, environment)<br> File "os.py", line 350, in execvpe<br> _execvpe(file, args, env)<br> File "os.py", line 367, in _execvpe<br> func(file, *argrest)
<br> OSError: [Errno 13] Permission denied<br><br>What's the meaning of permission denied? I tried running the application<br>as root, it didn't change... The php file is in /tmp and this directory<br>in attached as a child called directory of the root.
<br><br><br><br>------------------------------<br><br>_______________________________________________<br>Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a>
<br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br><br><br>End of Twisted-Python Digest, Vol 46, Issue 10<br>**********************************************
<br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://sst.oicp.net/">http://sst.oicp.net/</a>