[Twisted-Python] Re: Twisted-Python Digest, Vol 46, Issue 10

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

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