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 configuration in WHM and php cgi

Discussion in 'General Discussion' started by ilearn_webtech, Oct 7, 2008.

  1. ilearn_webtech

    Joined:
    Oct 8, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    With the present version of easyapache if two verions of php are configured to run on the server then one of them is made to run as CGI where the CGI binary is found in the folder
    /usr/local/cpanel/cgi-sys/ and picking it is done through a Action directive in php.conf

    Now my question is where is this CGI binary brought into cgi-sys folder from ? If we manually compile php then both a CGI binary and cli binary are installed and we can copy the CGI binary to cgi-bin/cgi-sys if we want to. But how does cPanel get to do
    this ? I don't see any CGI binary installed in the folders where php is installed.
     
  2. ilearn_webtech

    Joined:
    Oct 8, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I am trying to find how it happens, but I am unable to. Can the cPanel guys shed some light on this please ??
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Here's the listing of where the binaries are installed, from a recent build using EasyApache and installing both major versions of PHP:

    Code:
    root@mundane [~]# ls -l /usr/bin/php*
    -rwxr-xr-x  1 root root 13699280 Oct  6 13:04 /usr/bin/php*
    lrwxrwxrwx  1 root root       23 Oct  6 13:07 /usr/bin/php4 -> /usr/local/php4/bin/php*
    -rwxr-xr-x  1 root root  5083566 Aug 14  2007 /usr/bin/php-4*
    lrwxrwxrwx  1 root root       17 Oct  6 13:07 /usr/bin/php4-cgi -> /usr/php4/bin/php*
    lrwxrwxrwx  1 root root       23 Oct  6 13:07 /usr/bin/php4-cli -> /usr/local/php4/bin/php*
    lrwxrwxrwx  1 root root       18 Oct  6 13:07 /usr/bin/php5 -> /usr/local/bin/php*
    lrwxrwxrwx  1 root root       12 Oct  6 13:07 /usr/bin/php5-cgi -> /usr/bin/php*
    lrwxrwxrwx  1 root root       18 Oct  6 13:07 /usr/bin/php5-cli -> /usr/local/bin/php*
    lrwxrwxrwx  1 root root       12 Oct  6 13:07 /usr/bin/php-cgi -> /usr/bin/php*
    lrwxrwxrwx  1 root root       18 Oct  6 13:07 /usr/bin/php-cli -> /usr/local/bin/php*
    -rwxr-xr-x  1 root root     2836 Oct  6 13:04 /usr/bin/php-config*
    -rwxr-xr-x  1 root root     4172 Oct  6 13:04 /usr/bin/phpize*
    
     
Loading...

Share This Page