The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Multiple versions of PHP?

Discussion in 'General Discussion' started by Masque, Aug 9, 2005.

  1. Masque

    Masque Member

    Joined:
    Jul 30, 2005
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  2. shashank

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  3. Masque

    Masque Member

    Joined:
    Jul 30, 2005
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  4. challii

    challii Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
Loading...

Share This Page