[Twisted-web] PHP support on Windows

Abdallah Deeb abdallah.deeb at gmail.com
Sat Nov 12 15:53:27 MST 2005

Hello everyone,

I'm trying to run some php code on twisted.web using some simple code.
it works on my gentoo system but fails on Windows XP. The problem only
appears when running PHP code, html is served with no problems.

The code is as follows: (taken from one of the samples)

import os
from twisted.internet import reactor
from twisted.application import internet, service
from twisted.web import static, server, twcgi, script

class PHPScript(twcgi.FilteredScript):
    filter = 'c:\\PHP\\php'

root = static.File(os.getcwd())
root.processors = {
            '.php': PHPScript,
            '.epy': script.PythonScript,
            '.rpy': script.ResourceScript,
application = service.Application('web')
site = server.Site(root)
reactor.listenTCP(1999, site)

and the error I get is ... (partially)
C:\Python24\lib\site-packages\twisted\internet\default.py, line 179 in
177    #    raise NotImplementedError, "process not available since
win32all is not installed"
178    else:
179      raise NotImplementedError, "process only available in this " \
180         "reactor on POSIX, use win32eventreactor on Windows"

I'm running php 4.3.7 with the latest release of twisted, python 2.4.1
and Windows XP Pro

Abdallah Deeb

More information about the Twisted-web mailing list