View Full Version : PHP 4 versus PHP 5 in a Hosting Environment?
MTSpace at WHT 03-24-2005, 09:22 PM Hi there,
I personally run PHP 5 on all my personal servers and VPSs since I use MySQLi and the new OOP features, etc. But I'm curious, how big are the compatibility issues? How soon should web hosts start using PHP 5 on their servers?
Thanks
eservicesu 03-25-2005, 12:39 AM Im thinking about setting it up on a test box shortly, but not many hosts offer it because its new, and new stuff doesnt generally work right off the bat. I could be wrong though, because ive never used php5 yet.
- Eddy
IWorx-Tim 03-25-2005, 12:59 AM There are still a LOT of scripts out there that do not work on 5, and you could anger or loose clients unless you run 4
Pheaton 03-25-2005, 01:36 AM The way to introduce it into your system would be to purchase a new server and install php5 on it. You would retain php4 on your older servers, and put clients that want (or new clients) on your php5 server. Eventually you would migrate your existing servers to php5 as well.
boonchuan 03-25-2005, 02:36 AM I upgrade my existing servers to PHP 4.3.10, for the new servers I use PHP 5. Notice that if you do the upgrade of PHP5 in existing servers, there would be quite a number of scripts having problems and a lot of complains. Upgrading to 4.3.10 is almost transparent.
MTSpace at WHT 03-25-2005, 08:33 AM Hi,
This would be on a bare server, nothing on it yet. Maybe we should give PHP 5 a shot?
Thanks
Valve Ben 03-25-2005, 09:48 AM I'd say go for it, we offer a 'new technology' server for our clients should they ask for it. We still provision new clients to our stable servers running 4.3.10 on apache 1.3.33 and a 2.6 kernel.
The new tech box runs latest (stable or not) releases of php (currently 5.0.3), mysql (5.0.2-alpha) and apache (2.1.3-beta).
Dan L 03-25-2005, 01:35 PM You can have PHP5 installed as CGI and using the .php5 extension. It runs fine alongside PHP4.
HostRefugee-Vince 03-26-2005, 04:07 PM We are running PHP4 and PHP5 side by side.
We give our clients several options:
1. Everything runs with PHP4
2. Everything runs on PHP5.
3. Ability to run some scripts with PHP4, and some with PHP5.
Right now if they want everything to run on PHP5 we have to manually set that up. I am in the process of writing a script that will automatically convert everything to PHP5, or back down to PHP4. Due to the limited time I have, the script is something that is at least a few weeks away.
Vince Wiley
SCRochester 03-28-2005, 12:41 AM We use a concurrent PHP 5 / PHP 4 system. We feel that the advantages of PHP 5 over PHP 4 are numerous and select this by default for every user. Only 1 user has asked to switch so far, everyone else has no issues with the scripts.
We run a seperate instance of Apache on port 8080 on localhost. The main Apache is compiled with mod_proxy. If a host needs it's scripts to be run under PHP 4, the main apache proxies the request to port 8080 where the other apache instance has PHP 4 compiled. This solution has worked very well for us.
HostRefugee-Vince 03-28-2005, 02:25 AM Well I have it setup exactly opposite of gentooRIT.
PHP4 is the default, and PHP5 is on the second instance of Apache on port 8080 on local host.
Both of our ways are good though! It gives users a choice, and the ability to use the newest PHP5.
Vince Wiley
SCRochester 03-28-2005, 02:57 AM Originally posted by AuthorityHost
Well I have it setup exactly opposite of gentooRIT.
PHP4 is the default, and PHP5 is on the second instance of Apache on port 8080 on local host.
Both of our ways are good though! It gives users a choice, and the ability to use the newest PHP5.
Vince Wiley
How do you move customers over from one solution to another? Do you update the VirtualHosts by hand? I am currently working on a solution that will allow the custom to choose which version (and in turn the program will update httpd.conf) of PHP they would like to use.
HostRefugee-Vince 03-28-2005, 03:29 AM Exactly what I want to do as well.
I want to create a script that I can add in there cPanel. This script would allow them to upgrade to PHP 5 or downgrade to PHP 4. It would also show them a list of domains and show which version they are on. The encrypted cPanel files that create regular domains are not much of a help, because I can not read them :(.
Currently, heres what we have to do to enable PHP5.
Create sub-domain that points to localhost (ex... proxy.theredomain.com)
Edit Apache w/PHP 4 (default apache) and add proxypass lines to the VirtualHost.
Edit the Apache w/PHP 5 and add the VirtualHost for proxy.theredomain.com.
Restart both Apaches.
Kind of lenghty..
Here is a tip for you though, if you haven't already figured it out. In your second apache..set the servername as www.theredomain.com, and set the serveralias as proxy.theredomain.com. That fixes a few PHP variables related to the host.
If I ever get around to making that script, I will PM you. If you get around to making your script, I hope you will do the same.
Vince Wiley
|