[Twisted-Python] PHP Support

Moshe Zadka m at moshez.org
Fri Apr 18 14:07:33 EDT 2003

In PHP 4.3, /usr/bin/php4 is not CGI compatible. Twisted assumes it is.
Currently, the current version in Debian is 4.2, which is why is was not
a problem for most of the core Twisted developers. Others, more "edgy",
operating systems like Gentoo have already begun to feel the repercussions.
I talked to Adam Conrad (infinity on Freenode), who is the Debian PHP
maintainer, about this issu, and relayed his thoughts to glyph.
We actually do need to solve this problem.

Following are the detailed conversation transcripts, mildly edited by
me for formatting.

[re 4.3, on #debian-devel]
<_moshez> but my understanding is that now the default binary thinks it is not a CGI
<_moshez> so doesn't give CGI headers by default
<_moshez> and you need to build with magic flags to force the binary to give CGI headers.
<_moshez> now, when Twisted runs /usr/bin/php <php script>, *it really wants those headers*
<infinity> Twisted should be running /usr/lib/cgi-bin/php4
<_moshez> infinity: does /u/l/c-b/p4-cgi exist in all 4 versions?
<infinity> "All 4"?
<_moshez> infinity: yes. 4.2.xs
<infinity> Oh.  Yes.
<infinity> It exists all the way back to potato's 4.0.3
<infinity> _moshez : Various dists may package it differently, so if this an upstream thing, I'm not sure how best to deal with it.  But in Debian, it always has been, and always will be in /usr/lib/cgi-bin/
<_moshez> infinity: I'll see what my upstream thinks, and if necessary I'll change it in my scripts
<_moshez> infinity: the important thing for me is to be woody-compatible
<infinity> _moshez : In fact, with 4.3, /usr/bin/php{,4} will be even less
+CGI-compatible than it is now, so make sure to use the CGI one. :)
<_moshez> infinity: I know that :)
<_moshez> infinity: this is why I wanted this cleared before 4.3 :)
<infinity> _moshez : Well, if this is for an httpd, a suggests might be nice,
<_moshez> infinity: I may use Suggests: in twisted-web, then.

[on #twisted]
<_moshez> glyph: <infinity> Twisted should be running /usr/lib/cgi-bin/php4
<_moshez> glyph: this is only guaranteed to be the location for Debian, though
<_moshez> glyph: I can deal with it in my scripts, or we can change it upstream
+then.  (I wish Enhances worked, I'd use it all over)
* _moshez notes nobody commented yet on his ITP
<glyph> _moshez: If you need to change it, upstream should have a way to configure it.  I imagine this is sufficiently variable that it should be an argument to mktap web
<_moshez> glyph: *you're* upstream
<_moshez> glyph: whatever you decide is fine by me...
<glyph> _moshez: I'm not going to fix PHP scripting right now, I do have more valuable things to be doing with my time :)
<glyph> _moshez: but that's what I recommend the solution to be.
<_moshez> glyph: if radix decides it's not worth his time, he should decide to either "leave as is" or "change to Debian default"
<_moshez> glyph: either of those would satisfy me
<glyph> _moshez: okay
<glyph> _moshez: could you write about this to the list, actually?
<glyph> _moshez: I think that we should have the issue talked about there, good raw material for a FAQ

Moshe Zadka -- http://moshez.org/
Buffy: I don't like you hanging out with someone that... short.
Riley: Yeah, a lot of young people nowadays are experimenting with shortness.
Agile Programming Language -- http://www.python.org/

More information about the Twisted-Python mailing list