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.

How to install PHP4.4.2 + PHP 5.1.2?

Discussion in 'General Discussion' started by avio, Jan 30, 2006.

  1. avio

    avio Well-Known Member

    Joined:
    Oct 6, 2003
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    I know there is a how to for this... but how do I install PHP 5.1.2 without phpsuexec? Could someone please help with this! Thank you!

    I already have 4.4.2 installed... just need a how-to for php 5.1.2 :)

    Thanks a lot.
     
  2. avio

    avio Well-Known Member

    Joined:
    Oct 6, 2003
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    bump!!!!!!!!!!!! :D
     
  3. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Login to server as root and exectue the below commands :-

    /scripts/easyapache
    Select 7th option
    Select the Php version you need and do not select phpsuexec
    Select Exit
    Select Save

    Let the script execute and check the phpinfo whether everything is fine at http://serverip/phpinfo.php

    You can also install it from WHM if you wish to.
    Goto Software >> Apache update
    Select the Php version you want and do not select "Phpsuexec Support" option.
    Click Save.
     
  4. avio

    avio Well-Known Member

    Joined:
    Oct 6, 2003
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    I want both PHP 4.4.2 and PHP 5.1.2 installed, not 5.1.2 alone or 4.4.2 alone. I know how to recompile apache with php but you cannot install two php at the same time.
     
  5. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    What is the benefit of installing 2 versions? Come on.
     
  6. MeGaMASTER

    MeGaMASTER Well-Known Member

    Joined:
    May 24, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Almost all PHP4 scripts now work with PHP 5.1.2. Installing two PHP versions on the same servers require you to install both PHP as CGI. Better have only one version.
     
  7. xerophyte

    xerophyte Well-Known Member

    Joined:
    Mar 16, 2003
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    if you want to install both as mod_php*, you need to have 2 apache running, and redirect all the request for php5 to the second apache.

    It little messy to setup but its very possile
    in high level

    1) install another apache with the same configuration and different port in /usr/local/apache_php5
    2) compile the php for it
    3) place .htaccess in the domain /home/username/public_html to rewrite all the request to php5 to second apache.

    hope that helps
     
  8. avio

    avio Well-Known Member

    Joined:
    Oct 6, 2003
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    I want to run both 4.4.2 and 5.1.2... many scripts might be supported by 5.x but not all :p

    There is a how-to for php 5.0.x but none for 5.1.2 which is the latest.
     
  9. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    That how to will work.

    Regards,
    Alan
     
  10. simplestar

    simplestar Well-Known Member

    Joined:
    Nov 15, 2005
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    There are 3 ways to compile PHP with Apache.
    PHPSuExec, PHP as an Apache Module and PHP

    Go into WHM and under 'Recompile Apache' section, check off 'versioning' then choose PHP5 AND PHP 4 versions you want. Also check off anything else you want compiled. Go to the bottom and check off 'Skip Apache build if' and begin the compiling. Being that you already have PHP4 version installed, it will skip this build when it sees you've already got installed. The reason why you have to check of your desired features/modules each time you compile Apache is because, it will be deleted during that compile if you don't.
    After that, I recommend doing the 'software update' and 'server update' right after to ensure everything is insyn or patched if needed.
     
  11. avio

    avio Well-Known Member

    Joined:
    Oct 6, 2003
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    How about php5.1.2 as cgi and php4.4.2 as cli? Thats possible now without having to install 2 apache versions, correct?

    I am having some issues following the how-to already posted on these forums.


    What is suppose to be done about that error? I cannot even find libxml2 in rpm list of WHM.

    I download the rpm for libxml2-devel:

    root@beta01 [~/downloads]# rpm -Uvh libxml2-devel-2.6.23-1.1.i386.rpm
    error: Failed dependencies:
    libxml2 = 2.6.23 is needed by libxml2-devel-2.6.23-1.1

    root@beta01 [~/downloads]# rpm -Uvh libxml2-2.6.23-1.1.i386.rpm
    error: Failed dependencies:
    libc.so.6(GLIBC_2.3.4) is needed by libxml2-2.6.23-1.1
    libc.so.6(GLIBC_2.4) is needed by libxml2-2.6.23-1.1
    libxml2 = 2.5.10 is needed by (installed) libxml2-python-2.5.10-7
    libxml2 = 2.5.10 is needed by (installed) libxml2-devel-2.5.10-7

    root@beta01 [~/downloads]# rpm -Uvh glibc-2.3.90-36.i386.rpm
    error: Failed dependencies:
    glibc-common = 2.3.90-36 is needed by glibc-2.3.90-36
    nscd < 2.3.3-52 conflicts with glibc-2.3.90-36
    kernel < 2.6.9 conflicts with glibc-2.3.90-36
    glibc > 2.3.2 conflicts with glibc-common-2.3.2-95.37
    glibc = 2.3.2-95.37 is needed by (installed) glibc-utils-2.3.2-95.37
    glibc = 2.3.2 is needed by (installed) glibc-headers-2.3.2-95.37
    glibc = 2.3.2 is needed by (installed) glibc-devel-2.3.2-95.37
    Edit/Delete Message
     
  12. 24x7team

    24x7team Well-Known Member

    Joined:
    Jan 16, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    really tough to find
    I think this is too simple...


    Yo already have one PHP on the server.
    Then goto the php folder in /usr/local.

    Rename it to some name,

    Then upgrade apache again.. This time selecting php5.

    Thats all.

    Now you have two path with toow PHP.

    Mention in the apache conf file about the older PHP as new one should already be present.

    In the VirtualHost you have to metion for what module of PHP what should be run.

    Simple is it ?
     
  13. Ishware

    Ishware Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Panama City, FL
    cPanel Access Level:
    Root Administrator
    (edited for space)
    Okay... I'm thinking of trying this, but I want to make sure I understand *before* I go try this, rather than after. :-D

    1. in /usr/local, I don't have anything I see that is php-related. I do have /usr/local/php, which I assume is the php executable... Is your instruction to rename this, e.g. php -> php4 (assuming I have php4 installed currently, as I do)? (I realize the exact name wouldn't matter, but it is the most logical choice)

    (I know how to rebuild apache, so no problem there...)

    2. By "the apache conf file", do you mean httpd.conf? And what should be "mentioned"?

    I have the following php-relates lines that I'm aware of:

    LoadModule php4_module libexec/libphp4.so
    AddModule mod_php4.c

    How should I expect to modify those lines... Will I expect to see a libphp4.so and mod_php5.c that I should add additional lines for? (I've read elsewhere that one cannot run php4 and php5 mods simultaneously)

    I'll ask these questions first, because my additional questions don't matter until I find out more information...

    (In my case, I would make php4 the default, which means that I assume I'd want to follow the steps to rename php4, install php5 and rename it all to 5, then go "un-rename" all the php4 stuff back to "php"....)
     
  14. helmishariff

    helmishariff Member

    Joined:
    May 9, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    is this working?
     
  15. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
Loading...

Share This Page