NYCPHP Meetup

NYPHP.org

[nycphp-talk] Apache 2.0 and PHP

Hans Zaunere hans at nyphp.org
Thu Nov 20 15:37:43 EST 2003



John Lacey wrote:

> 
> 
> Hans Zaunere wrote:
> 
>>
>>
>> Scott Mattocks wrote:
>> >> not to run it if you are using PHP but I can't remember why.  Are
>>
>>> there still issues mixing the two?  Should we reconsider our Apache 
>>> distribution and what advice do you guys have to make the transition 
>>> easier?
>>
>>
>>
>> Very little, if any, progress has been made on this front.  It's not 
>> PHP/Apache 2.0/ per se, but rather the libs that PHP uses.  For 
>> instance, let's say you compile PHP with GD support - is GD thread 
>> safe?  Then you compile GD with libjpeg - is libjpeg thread safe?  The 
>> number of combinations of libs that PHP can be used with is huge, and 
>> thus ensuring each is thread safe is very hard.  That said, the 
>> PHPZend/Apache 2.0/ interaction, at the SAPI and engine levels, could 
>> be improved, but there is little motivation because of the library 
>> issues.  It's a chicken-before-the-egg problem.
>>
>> You could use Apache 2 with the prefork MPM.  However, that's 
>> basically the same as Apache 1, but using a not-so-well-tested SAPI - 
>> so why switch?  :)
>>
>>
> Seems that some might use the thread-safety issue to knock PHP with FUD. 
>  Perhaps we need to nip that one in the bud by saying a few [mininally 
> techy] words about the effectiveness of running in Apache 2 prefork mode 
> in the AMP marketing doc?  I'll at least put in some info and then 
> others can improve. Anyone have any stories on this?

I used to run a production system with Apache 2, PHP 4 and MySQL/Oracle under RH 7.3 and used the threaded MPM.  It ran, for the most part, 100%, until it was decided we needed it to do other fancy things.  Initially, only the MySQL and OCI8 extensions were compiled in, which is why it had worked.  When we began to add other stuff (somehow mhash sticks out?) a lot of strange things happened.  So, we went to Apache 1 and haven't looked back since :)

Touching on this subject for the marketing document is a great idea, but something we'd have to treat with care.  Anything surrouding the topic of thread safety gets extremly technical, extremly quickly.  Suffice it to say, possibly, that "bigger version numbers aren't always better."  I think the CTO types, in dealing with Windows NT, 2000 and 2003, could understand that :)

H





More information about the talk mailing list