ΚΥ΅½<br><br><div><span class="gmail_quote">2008/1/13, <a href="mailto:twisted-python-request@twistedmatrix.com">twisted-python-request@twistedmatrix.com</a> &lt;<a href="mailto:twisted-python-request@twistedmatrix.com">twisted-python-request@twistedmatrix.com
</a>&gt;:</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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 &#39;help&#39; to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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 &quot;Re: Contents of Twisted-Python digest...&quot;
<br><br><br>Today&#39;s Topics:<br><br>&nbsp;&nbsp; 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 &lt;<a href="mailto:ottavio@campana.vi.it">ottavio@campana.vi.it</a>&gt;<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: &lt;<a href="mailto:20080112165225.GA13692@campana.vi.it">20080112165225.GA13692@campana.vi.it</a>&gt;<br>Content-Type: text/plain; charset=us-ascii<br><br>Hi, I&#39;m trying&nbsp;&nbsp;to add the possibility of executing&nbsp;&nbsp;some php pages from
<br>an application developed with twisted web.<br><br>I define the&nbsp;&nbsp;VWGPhpScript class as follows,&nbsp;&nbsp;adding the REDIRECT_STATUS<br>because the debian package complains about it.<br><br>class VWGPhpScript (twcgi.FilteredScript
):<br>&nbsp;&nbsp;filter = &#39;/usr/lib/cgi-bin/php5&#39;<br>&nbsp;&nbsp;def runProcess(self, env, request, qargs=[]):<br>&nbsp;&nbsp;&nbsp;&nbsp;p = twcgi.CGIProcessProtocol(request)<br>&nbsp;&nbsp;&nbsp;&nbsp;env[&#39;REDIRECT_STATUS&#39;] = &#39;200&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;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 [&#39;/tmp/index.php&#39;] in environment id -1217401212
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:Traceback (most recent call last):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/usr/lib/python2.4/site-packages/twisted/internet/process.py&quot;, line 377, in __init__<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command, args, environment)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;/usr/lib/python2.4/site-packages/twisted/internet/process.py&quot;, line 539, in _execChild
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;os.execvpe(command, args, environment)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;os.py&quot;, line 350, in execvpe<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_execvpe(file, args, env)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File &quot;os.py&quot;, line 367, in _execvpe<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;func(file, *argrest)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSError: [Errno 13] Permission denied<br><br>What&#39;s the meaning of permission denied? I tried running the application<br>as root, it didn&#39;t change... The php&nbsp;&nbsp;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>