Re: [development] PHP version stats
On 3/24/07, Jeff Griffiths <anisotropic@gmail.com> wrote:
On 3/24/07, Khalid Baheyeldin <kb@2bits.com> wrote:
Agreed. I hope the landscape changes in favor of PHP5, but I am not holding my breath.
I think, er, actually I *know* that this issue has less to do with Linux distros and more to do with shared hosts. I chose dreamhost because not only do they have a choice of php versions, they even let you build your own if you want to.
Yes, Dreamhost allows compiling your own version, however for any site with non-trivial amount of traffic it is useless. The reason is that they allow you to compile your own as a CGI, which is very very inefficient (Linux forks a new process in realtime for every incoming request). Here is an old article on this http://baheyeldin.com/click/389/5 So, it is really not an option. -- 2bits.com http://2bits.com Drupal development, customization and consulting.
Although I'm not aware of the details, I understand that FastCGI is much faster than CGI (it does not spawn a new process for every incoming request), and DreamHost does support FastCGI. I've actually compiled PHP5, with eAccelerator and a bunch of other things and am running it as FastCGI, so I'm very sure it *does* work. Unfortunately, their MySQL servers are so darn slow that it just doesn't work nicely... But that's another issue. Wim Leers On Mar 24, 2007, at 23:09 , Khalid Baheyeldin wrote:
On 3/24/07, Jeff Griffiths <anisotropic@gmail.com> wrote: On 3/24/07, Khalid Baheyeldin <kb@2bits.com> wrote:
Agreed. I hope the landscape changes in favor of PHP5, but I am not holding my breath.
I think, er, actually I *know* that this issue has less to do with Linux distros and more to do with shared hosts. I chose dreamhost because not only do they have a choice of php versions, they even let you build your own if you want to.
Yes, Dreamhost allows compiling your own version, however for any site with non-trivial amount of traffic it is useless. The reason is that they allow you to compile your own as a CGI, which is very very inefficient (Linux forks a new process in realtime for every incoming request).
Here is an old article on this http://baheyeldin.com/click/389/5
So, it is really not an option. -- 2bits.com http://2bits.com Drupal development, customization and consulting.
I have discussed PHP5 support with my hosting company and they are not interested (because existing PHP4 code does not execute the same under PHP5). I notice that some hosting companies ask you specify PHP 4 or 5 at the time you sign up, presumably because customers are put on different hosts, see http://www.wesh.co.uk/. This seems ridiculous to me. I think that the hosting companies would be comfortable if they could install PHP4 and PHP5 as separate modules under apache (often 1.x) i.e. no use of CGI or FastCGI. The specific version invoked from a PHP code embedded into a web page would need to be configurable by virtual host in .htaccess or somewhere else - assuming this was possible. I think the PHP folk do need provide an upgrade path for shared hosts if they want us to abandon PHP4 (and its horrible Object support). John
On 3/24/07, *Jeff Griffiths* <anisotropic@gmail.com <mailto:anisotropic@gmail.com>> wrote:
On 3/24/07, Khalid Baheyeldin <kb@2bits.com <mailto:kb@2bits.com>> wrote:
> Agreed. I hope the landscape changes in favor of PHP5, but I am not > holding my breath.
I think, er, actually I *know* that this issue has less to do with Linux distros and more to do with shared hosts. I chose dreamhost because not only do they have a choice of php versions, they even let you build your own if you want to.
On Site5 hosting, where I host the majority of my sites, they have a really neat setup: Both Php4 AND Php5 are installed. By default Php4 will be invoked. However, by adding the following line to the appropriate domain or subdomain document root .htaccess file specifies Php5 for that site, without further ado: AddHandler application/x-httpd-php5 .php Pretty smart, wish others would adopt it. saludos, Victor Kane http://awebfactory.com.ar On 3/25/07, John Ackers <john.ackers@mail.com> wrote:
I have discussed PHP5 support with my hosting company and they are not interested (because existing PHP4 code does not execute the same under PHP5).
I notice that some hosting companies ask you specify PHP 4 or 5 at the time you sign up, presumably because customers are put on different hosts, see http://www.wesh.co.uk/. This seems ridiculous to me.
I think that the hosting companies would be comfortable if they could install PHP4 and PHP5 as separate modules under apache (often 1.x) i.e. no use of CGI or FastCGI. The specific version invoked from a PHP code embedded into a web page would need to be configurable by virtual host in .htaccess or somewhere else - assuming this was possible.
I think the PHP folk do need provide an upgrade path for shared hosts if they want us to abandon PHP4 (and its horrible Object support).
John
On 3/24/07, Jeff Griffiths <anisotropic@gmail.com> wrote:
On 3/24/07, Khalid Baheyeldin <kb@2bits.com> wrote:
Agreed. I hope the landscape changes in favor of PHP5, but I am not holding my breath.
I think, er, actually I *know* that this issue has less to do with Linux distros and more to do with shared hosts. I chose dreamhost because not only do they have a choice of php versions, they even let you build your own if you want to.
On Mar 25, 2007, at 7:07 AM, Victor Kane wrote:
On Site5 hosting, where I host the majority of my sites, they have a really neat setup: Both Php4 AND Php5 are installed. By default Php4 will be invoked. However, by adding the following line to the appropriate domain or subdomain document root .htaccess file specifies Php5 for that site, without further ado: AddHandler application/x-httpd-php5 .php
Pretty smart, wish others would adopt it.
This is how I do it on my dev boxes. It's actually not the hosting company, it's quite a common technique. If you want to do it, I would suggest checking out this article here: http://www.gentoo.org/proj/en/php/php4-php5-configuration.xml Check it out... but bear in mind that this setup probably shouldn't be run in a production environment unless you're really careful. It's easy to break. -- Jonathan Lambert Principal | FireBright, Inc. Email: j@firebright.com -------------------------------------------------- "Luck is the residue of design." - Branch Rickey - former owner, Brooklyn Dodgers
I suggest following the timing of a conservative Open Source distribution. Debian Stable is true to its name. It is very stable. I expect Debian Stable will support PHP 5 upon its next major release. The current Debian Stable is the sarge release. It was released in June 2005. The previous Debian Stable was the woody release. It was released in July 2002. Support for it was dropped in June 2006 (one year after the release of sarge). If timing stays the same then expect a new Stable release (etch) in June 2008 with support dropping for sarge in June 2009. However, no release plans have been published by Debian at this time and exact dates will surely vary. But these dates may provide some guidance. -- Larry Cannell larry@cannell.org
On 3/25/07, Larry Cannell <larry@cannell.org> wrote:
I suggest following the timing of a conservative Open Source distribution. Debian Stable is true to its name. It is very stable. I expect Debian Stable will support PHP 5 upon its next major release.
The current Debian Stable is the sarge release. It was released in June 2005.
The previous Debian Stable was the woody release. It was released in July 2002. Support for it was dropped in June 2006 (one year after the release of sarge).
If timing stays the same then expect a new Stable release (etch) in June 2008 with support dropping for sarge in June 2009.
However, no release plans have been published by Debian at this time and exact dates will surely vary. But these dates may provide some guidance.
I hear what you are saying. However, Debian is less widely in hosting environments as opposed to Red Hat and its derivatives (CentOS, Fedora). Also, Debian is notoriously slow in releasing stable releases, and this is why other derivative distros exist, most notably, Ubuntu. Due to the above, using them as a guideline is questionable. -- 2bits.com http://2bits.com Drupal development, customization and consulting.
Based on my limited research Debian runs on a significant portion of Internet web servers (more than Fedora and CentOS combined).
From Strong growth for Debian<http://news.netcraft.com/archives/2005/12/05/strong_growth_for_debian.html>(Netcraft, December 2005): "Debian is currently the fastest growing Linux distribution for web servers, with more than 1.2 million active sites in December. Debian 3.1 was declared stable in July and it appears that both the anticipation of this release becoming stable, and the release itself, have generated new interest in Debian, after some years where it had lagged behind its more active rivals. This growth is particularly noticeable at some of the larger central European hosting locations, including Komplex, Lycos Europe, Proxad and Deutsche Telecom."
In this survey Debian had 25% share. Fedora: 16%, CentOS: 1%. However, this survey is a little over a year old. I am certainly interested in seeing research that shows Debian is not this dominate. Larry On 3/25/07, Khalid Baheyeldin <kb@2bits.com> wrote:
However, Debian is less widely in hosting environments as opposed to Red Hat and its derivatives (CentOS, Fedora).
-- Larry Cannell larry@cannell.org
The only mainstream ISP I know that runs Debian is Dreamhost. The dedicated servers I've seen recently are mostly Fedora or CentOS, for example Godaddy dedicated runs Fedora Core 4. Aplus dedicated are Fedora Core 4 by default. One reason is that the hosting control panels historically did not support Debia, and were biased towards RedHat/Fedora/CentOS. I am talking about things like Plesk, cPanel and WHM. While Plesk say they support Debian, cPanel does not: http://www.cpanel.net/products/cPanelandWHM/linux/sys_requirements.htm Web hosts want a self serve environment to minimize cost, and the control panels go a long way towards that. Dreamhost have a home grown panel, so that may be why they can afford to do Debian. On 3/25/07, Larry Cannell <larry@cannell.org> wrote:
Based on my limited research Debian runs on a significant portion of Internet web servers (more than Fedora and CentOS combined).
From Strong growth for Debian<http://news.netcraft.com/archives/2005/12/05/strong_growth_for_debian.html>(Netcraft, December 2005): "Debian is currently the fastest growing Linux distribution for web servers, with more than 1.2 million active sites in December. Debian 3.1was declared stable in July and it appears that both the anticipation of this release becoming stable, and the release itself, have generated new interest in Debian, after some years where it had lagged behind its more active rivals. This growth is particularly noticeable at some of the larger central European hosting locations, including Komplex, Lycos Europe, Proxad and Deutsche Telecom."
In this survey Debian had 25% share. Fedora: 16%, CentOS: 1%.
However, this survey is a little over a year old. I am certainly interested in seeing research that shows Debian is not this dominate.
Larry
On 3/25/07, Khalid Baheyeldin <kb@2bits.com> wrote:
However, Debian is less widely in hosting environments as opposed to Red Hat and its derivatives (CentOS, Fedora).
-- Larry Cannell larry@cannell.org
-- 2bits.com http://2bits.com Drupal development, customization and consulting.
Quoting John Ackers <john.ackers@mail.com>:
I have discussed PHP5 support with my hosting company and they are not interested (because existing PHP4 code does not execute the same under PHP5).
I notice that some hosting companies ask you specify PHP 4 or 5 at the time you sign up, presumably because customers are put on different hosts, see http://www.wesh.co.uk/. This seems ridiculous to me.
I think that the hosting companies would be comfortable if they could install PHP4 and PHP5 as separate modules under apache (often 1.x) i.e. no use of CGI or FastCGI. The specific version invoked from a PHP code embedded into a web page would need to be configurable by virtual host in .htaccess or somewhere else - assuming this was possible.
I think the PHP folk do need provide an upgrade path for shared hosts if they want us to abandon PHP4 (and its horrible Object support).
It sounds to me that PHP5 needs patched to execute PHP4 on command. Then you can control which PHP API version to follow from within the code. NOT. It is a chicken and egg thing, AKA Catch 22. The source code providers are lagging because the WEB providers are lagging. The WEB providers are lagging because the source code providers are lagging. Would it not be possible to execute a second instance of apache giving a configuration file other than the default one that pointed its virtual services to php5? I think I'll go try this now. Earnie
On 26.03.2007, at 17:21, Earnie Boyd wrote:
Would it not be possible to execute a second instance of apache giving a configuration file other than the default one that pointed its virtual services to php5? I think I'll go try this now.
Run that Apache on Port 81. Konstantin Käfer – http://kkaefer.com/
Or use the .htaccess addhandler method in the subdomain or site subdirectory to specify handler for php: AddHandler application/x-httpd-php5 .php someone posted a reference on how to set this up. On 3/26/07, Konstantin Käfer <kkaefer@gmail.com> wrote:
On 26.03.2007, at 17:21, Earnie Boyd wrote:
Would it not be possible to execute a second instance of apache giving a configuration file other than the default one that pointed its virtual services to php5? I think I'll go try this now.
Run that Apache on Port 81.
Konstantin Käfer – http://kkaefer.com/
On Mar 26, 2007, at 8:21 AM, Earnie Boyd wrote:
Quoting John Ackers <john.ackers@mail.com>:
I have discussed PHP5 support with my hosting company and they are not interested (because existing PHP4 code does not execute the same under PHP5). <snip>
It sounds to me that PHP5 needs patched to execute PHP4 on command. Then you can control which PHP API version to follow from within the code. NOT.
It won't work quite like that...
<snip>
Would it not be possible to execute a second instance of apache giving a configuration file other than the default one that pointed its virtual services to php5? I think I'll go try this now.
There are basically three ways to do this: Compile and install cgi versions of php, and change the configs / paths to them in your apache instance to point to the version you want active. This will make it possible to run them both on the same box but not at the same time. Or... You can patch the system and run them in parallel. This requires file extensions, and I wouldn't want to have to maintain it. Just *seems* brittle. Here is the patch: http://www.webhostingtalk.com/ showthread.php?t=485646 Run them on two instances. You can actually run php4 and php5 in parallel at the same time. Just proxy your second instance through the second server, and put a request handler (mod_rewrite) for something like .php5. You'll have to rename your files for that to work as well. This setup is easier to maintain, but a pain to set up. More info: http://www.sitepoint.com/blogs/2004/03/24/running-php4-and-php5-in- parallel/ http://lists.freebsd.org/pipermail/freebsd-questions/2005-October/ 100384.html -- Jonathan Lambert Principal | FireBright, Inc. Email: j@firebright.com -------------------------------------------------- "A witty saying proves nothing." - Voltaire (1694-1778)
participants (8)
-
Earnie Boyd -
John Ackers -
Jonathan Lambert -
Khalid Baheyeldin -
Konstantin Käfer -
Larry Cannell -
Victor Kane -
Wim Leers