Attachments (1)

Change History (24)

/usr/bin/php4 in debian unstable is the 'cli' version, a misguided product of a
push to see php in areas such as the command line.
the location of the cgi binary is in /usr/lib/cgi-bin/php4 - and in order for
the CGI version to function correctly, the env variable 'REDIRECT_STATUS' must
be '200'.
This patch probably isn't *optimal*, and will likely break other deployments
where /usr/bin/php4 is the cgi version and the other path doesn't actually
exist, but it demonstrates exactly what is required at a code level for this to
function on debian unstable.

I suppose it would be good to have support for PHP4 CGIs on Debian. Did anyone contact Debian to discuss this issue? Also, couldn't we check for the existence of various executables instead of just assuming /usr/bin/php4 exists and is usable?

In any case, this isn't high priority, and the change needs test coverage.

Summary
changed from [PATCH] twcgi is non-functional with debian unstable's php4-cgi to deprecate PHP3Script and PHPScript in twisted.web.twcgi, replace them with documentation for FilteredScript

PHP3Script and PHPScript are nothing except platform-specific configuration. If we can't get this right, we shouldn't have it. We can have documentation which explains how to trivially create one of these which is correct for a particular location of the php cgi interpreter.

There's one pyflakes warning for the module, an unused local in CGIScript.render. Can you fix that?

I think a brief section in the prose documentation for CGIScript and FilteredScript would be a good addition as well. I want to suggest adding it to using-twistedweb.xhtml, but it also occurs to me that it could be a section in the new sixty seconds documentation except that that branch hasn't been merged yet. Blocking this ticket on the sixty seconds ticket sounds lame. I do want to push us towards writing more prose documentation, though. Maybe I should do a sixty seconds post on twcgi and we can add it to the sixty seconds branch (or to another ticket after the sixty seconds branch is merged). (Sorry for the rambling non-committal review point.)

test_tap.py has its copyright date bumped, but no other changes. This should be reverted.

test_PHP3ScriptIsDeprecated and test_PHPScriptIsDeprecated use getattr. Instead, they can just do twcgi.PHP3Script and twcgi.PHPScript.

10.0 has sailed. Update the deprecation version numbers to 10.1.

As long as you're reformatting the CGIScript class docstring, can you switch it away from the I ... style? Something like L{CGIScript} is a resource which runs child processes according to the CGI specification. would be nice.