Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Find which users are using php4?

Discussion in 'General Discussion' started by MACscr, Sep 29, 2011.

  1. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    193
    Likes Received:
    1
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    I have a server that is about 3 years old now that was setup with php4 and php5 being options to users. I am planning on moving these accounts to a newer server running cloudlinux, but I dont want to setup php4 unless some users are still using it. Any ideas for finding out if any sites are using php4 still?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    When PHP 5 is set as the default handler for PHP, PHP 4 is enabled through the .htaccess file of the account. You could write up a bash command to search the .htaccess files on the system to see which ones are using PHP 4. An example of such a command would be:

    Code:
    # find /home*/*/ -mindepth 1 -iname "\.htaccess" -type f -exec grep -Hi "x-httpd-php4" '{}' \;
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice