Re: migrating to PHP 5 + Apache 2 from PHP 4.3.8 + Apache 1.3.33.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Symbulos Partners <partners@xxxxxxxxxxxx>:
> Rasmus Lerdorf wrote:
> > 
> > As far as threading goes, it is simply not a good idea for a large
> > complex system. 
>
>
> I do not understand why, probably because I am not well prepared. Can you
> explain me? As far as I know, threading should be a noticeable improvement
> in case of large systems. Is there something in the implementation of PHP 5
> which does not allow for safe threading? If so, what it is?

My understanding is that not all of the libraries to which PHP links
have been tested with threads -- it's not a PHP issue, per se, but one
of PHP extensions. If you know for a fact that the libraries with which
you plan to compile PHP *are* threadsafe -- e.g., MySQL --  you're
probably okay; if not, better to stick with Apache2's prefork model or
stay with Apache1.

> > I am a big believer in keeping the base infrastructure as simple as
> > possible.  You are going to layer a lot of complexity on top of Apache
> > and PHP in the form of your web applications.  You want to make sure
> > that your building blocks are rock solid so if you see a problem you can
> > be confident that it is something you did wrong.  If your base is shaky
> > everything you build on top of it is going to be that much more unstable.
>
> I totally agree. Our problem is that we want to use the new php 5 object
> model, and at the same time would like to move to Apache 2 for several
> different reasons.
>
> There are 4 alternative solutions
>
> 0)php 5 + Apache 2
> 1)php 5 + Apache 2 pre-fork (not totally satisfactory, but better than have
> a  system that is unstable)
> 2)php 5 + Apache 1.3.33 (which is not totally satisfactory, less than 0,1 in
> any case, but better than have a system that is unstable)
> 3)php 4 + Apache 2 (which is not totally satisfactory, less than 0,1,2 in
> any case, better than have a system that is unstable)
>
> which one does satisfy your condition of rock solid foundation? Or shall we
> stick with php 4 + Apache 1.3.33, which is VERY unsatisfactory because we
> cannot use the new object model?

I *have* seen errors with PHP4 and Apache2, and I doubt these would be
any different with PHP5. However, where I work, we're developing on an
Apache2 prefork with PHP5, and performance is solid.

I did recently see a benchmark of PHP with Apache1 vs PHP with Apache2,
however, and it showed that the former outperformed the latter by 27 -
31%:

http://ilia.ws/archives/32-Apache-1-vs-Apache-2-Performance.html

If performance is less critical than features, then Apache2 will work
fine. 

I guess the big question is: are the features for which you want Apache2
available with the prefork model or not? If not, there's no benefit to
going to Apache2 -- and it might make more sense to run multiple
servers -- some with Apache1 and PHP5 and others running Apache2 and
whatever other modules you need.

-- 
Matthew Weier O'Phinney           | mailto:matthew@xxxxxxxxxx
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux