<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi! First mail, and first look at this interesting framework that is twisted.<br>I'm on a Linux Debian. Kindly&nbsp; need help to solve this issue, I've looked at documentation but I miss something.<br>Need to get up a simple web server that will serve html and php pages. The html works but php show a window where you can choose if save or open the file.<br>This is what I've got:<br><br>#!/usr/bin/env python<br>import CGIHTTPServer<br><br>def main():<br>&nbsp;&nbsp;&nbsp; server_address = ('', 9090)<br>&nbsp;&nbsp;&nbsp; handler = CGIHTTPServer.CGIHTTPRequestHandler<br>&nbsp;&nbsp;&nbsp; handler.cgi_directories = ['./cgi']<br>&nbsp;&nbsp;&nbsp; server = CGIHTTPServer.BaseHTTPServer.HTTPServer(server_address, handler)<br>&nbsp;&nbsp;&nbsp; try:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server.serve_forever()<br>&nbsp;&nbsp;&nbsp; except KeyboardInterrupt:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server.socket.close()<br>if __name__ == '__main__':<br>&nbsp;&nbsp; main()<br><br><br>I've looked at documentation but can't understand this point:<br><br><pre><span class="kn">from</span> <span class="nn">twisted.web</span> <span class="kn">import</span> <span class="n">static</span><span class="p">,</span> <span class="n">twcgi</span>

<span class="k">class</span> <span class="nc">PerlScript</span><span class="p">(</span><span class="n">twcgi</span><span class="o">.</span><span class="n">FilteredScript</span><span class="p">):</span>
    <span class="nb">filter</span> <span class="o">=</span> <span class="s">'/usr/bin/php'</span> <span class="c"># </span> &gt;&gt;&gt;&gt; I must point it to the path of php? or php5?

<span class="n">resource</span> <span class="o">=</span> <span class="n">static</span><span class="o">.</span><span class="n">File</span><span class="p">(</span><span class="s">"./cgi"</span><span class="p">)</span> <span class="c"># Points to the perl website</span>
<span class="n">resource</span><span class="o">.</span><span class="n">processors</span> <span class="o">=</span> <span class="p">{</span><span class="s">".php"</span><span class="p">:</span> <span class="n">PerlScript</span><span class="p">}</span> <span class="c"># Files that end with .pl will be</span>
                                          <span class="c"># processed by PerlScript</span>
<span class="n">resource</span><span class="o">.</span><span class="n">indexNames</span> <span class="o">=</span> <span class="p">[</span><span class="s">'index.php'</span><span class="p">]</span></pre>Every help would be really appreciated. Thanks in advance, BR.<br>                                               </div></body>
</html>