Masque

Member
Jul 30, 2005
7
0
151
Greets,

I've tried to find this answer here and elsewhere before bugging the folks here, to no avail.

I noticed cpanel allows you to check off multiple versions of PHP to be installed on a machine. Can someone enlighten me as to how this works, at least the following...

How do I set which is the "default" installation for apache?

How do I access which version to call in my programs?

What I'm trying to do is run production scripts from php 4.* and develop under php 5.*

Thanks for any help offered.

T.M.
 

shashank

Well-Known Member
PartnerNOC
Apr 12, 2003
159
1
168
cPanel Access Level
Root Administrator
This would require rather complex installations. Cpanel will always use the apache that is located at /usr/local/apache . You can have that as default. You will need to install another copy of apache on the server at a different path and compile php for it manually as well. Just keep in mind that either you can run the second copy of apache on a different port other than 80 and 443 or you can have it listen on particular virtual IPs at port 80. In the second case you will need to modify the default apache config at /usr/local/apache/conf/httpd.conf to NOT listen on the Ips configured on the second apache. If you need exact code, let me know.
 

Masque

Member
Jul 30, 2005
7
0
151
Shashank: Ah, thanks. I assumed because I saw checkboxes (rather than a dropdown list) in the cpanel config for apache that there was some way they'd found to let you have lots of different php versions running simultaneously.

I was just looking for what I thought was an easy solution. I can always develop php5 programs locally for the time being. We can only hope that most of the open source programs become php5 compatible sometime before php6 comes out ;)

Thanks for the help