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.

PHP 4 Removal

Discussion in 'General Discussion' started by WireNine, Oct 24, 2008.

  1. WireNine

    WireNine Well-Known Member

    Joined:
    Aug 14, 2006
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Deselecting PHP 4 when recompiling Apache does not remove PHP 4 from the server.

    How can we completely remove all traces of php 4 from the server and disable it using EasyApache?
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    A manual way is to run a find command on php4, verify the files that it finds and then remove them. It will be something like:

    find /usr -name php4* (To get the list of files)

    find /usr -name php4* | xargs rm -rvf (To delete the php4 files/folders)

    As far as disabling it in EasyApache, I don't think its possible unless cPanel stops supporting PHP4.
     
  3. WireNine

    WireNine Well-Known Member

    Joined:
    Aug 14, 2006
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Isn't it possible for EasyApache to remove all the files from the server since it's not selected any longer? I don't mean remove support for it, but remove php4 files from the server.
     
  4. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    I remember I had this happen to me where PHP4 was installed and when attempting to fully uninstall it it was literally a mission. I think a ticket to cPanel and they will go in and remove it all for you.
     
  5. Brandonm

    Brandonm Active Member

    Joined:
    Aug 31, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Same problem, how do we uninstall php4?
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    There is no automated tool for removing the PHP 4 binaries etc. at this time. PHP 4 needs to be removed manually.
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    If you run EasyApache compile for PHP5 only (without PHP4), you shouldn't have PHP4 installed on your server.

    However, as far as removing an existing PHP4 installation, you will need to remove those files manually.

    First thing you need to do is go ahead and make sure that your system has PHP5 up and running correctly and then log into your SSH shell and delete
    the binaries for PHP4 from your server.

    Here is a simple script to help you with that:
    Code:
    #!/bin/bash
    IFS="$"
    
    PDSO="/usr/local/apache/modules/libphp4.so"
    CGIA="/usr/local/php4"
    CGIB="/usr/php4"
    
    for PHP in ${PDSO} ${CGIA} ${CGIB}; do 
      if [ -f ${PHP} ]; then
        echo "Found ${PHP} :  Deleting binary file ..."
        rm -f ${PHP}
      fi
    done
    
    if [ -d /usr/local/php4 ]; then
       echo "Removing PHP4 folder in /usr/local/php4 ..."
       rm -Rf /usr/local/php4/*
       rmdir /usr/local/php4
    fi
    
    echo "You should review the following files and remove PHP4 references ..."
    
    echo "/usr/local/apache/conf/httpd.conf"
    echo "/usr/local/apache/conf/php.conf"
    
    if [ -f /opt/suphp/etc/suphp.conf ]; then
       echo "/opt/suphp/etc/suphp.conf"
    fi
    
    # End of Script
    
     
  8. FeeL

    FeeL Well-Known Member

    Joined:
    Apr 17, 2004
    Messages:
    135
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Rio de janeiro
    cPanel Access Level:
    Reseller Owner
    Still no way of removing it, using cpanel itself?
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Correct, PHP 4 is not removed upon deselecting it from EasyApache. The same holds true for PostgreSQL, Tomcat and a slew of other components. If you select to have them not compile after initial installation, the components remain on the machine. This is likely due to the fact that you might later change your mind and want the contents as a backup.
     
Loading...

Share This Page