I am trying to run a php script on a webserver written in twisted.For that i am using twcgi module.<br>Here is my code.<br>This is code for webServer.py -&gt;<br><br><blockquote><br>from twisted.internet import reactor<br>
from twisted.web import static,script,twcgi,server<br>from twisted.python.log import startLogging<br>import sys<br><br>class PHPScript(twcgi.FilteredScript):<br>    filter=&#39;/media/DATA/Documents/project-docs/twisted/twisted-programs/testPHP/twisted-php.py&#39;<br>
<br>root=static.File(&#39;html_files&#39;)<br>root.indexNames=[&#39;index.php&#39;]<br>root.processors={&#39;.php&#39;:twcgi.PHPScript}<br>site=server.Site(root)<br>reactor.listenTCP(8000,site)<br>startLogging(sys.stdout)<br>
reactor.run()<br></blockquote><br>And here is another file used in program twisted-php.py -&gt;<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
#!/usr/bin/env python<br>import os, sys, commands<br>print &quot;Content-type: text/html\n\n&quot;;<br>command = &#39;php &#39; + sys.argv.pop(1)<br>data = commands.getstatusoutput(command)<br>print data[1]<br></blockquote>
<br><br>Now my problem is if i try to acess some url like <a href="http://localhost:8000/list.php">http://localhost:8000/list.php</a> then everything works fine but if i enter url with parameters like <a href="http://localhost:8000/list.php?file=sample.txt">http://localhost:8000/list.php?file=sample.txt</a> then twisted is not passing parameters after &#39;?&#39; to twisted-php.py<br>
I verified this in twisted-php.py<br>Is there any way i can use such php scripts with parameters in twisted?<br>