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.

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:
    191
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    35,630
    Likes Received:
    1,136
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page