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!

fast-cgi always default handler ?

Discussion in 'General Discussion' started by qwerty, Apr 17, 2011.

  1. qwerty

    qwerty Well-Known Member

    Joined:
    Jan 21, 2003
    Messages:
    214
    Likes Received:
    2
    Trophy Points:
    168
    Ok i just migrated all of our centos 5.6 servers from php 5.2.17 (suphp) to php 5.3.6

    After the update, /usr/bin/php -v shows:

    PHP 5.3.6 (cgi-fcgi) (built: Apr 18 2011 01:06:36)
    Copyright (c) 1997-2011 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

    Before this update it would show (cgi). I have 'suphp' selected as the default handler and everything appears to be working fine. I can see in /usr/local/apache/logs/suphp_log that any php script executed is logged here so i am assuming suphp is working as the default handler.

    So why does /usr/bin/php -v show "cgi-fcgi" as the default handler?? more to the point if I change the default handler via WHM -> Apache Configuration -> Configure PHP and Suexec to any value - it always shows "cgi-fcgi" when I run /usr/bin/php -v

    Any ideas what's going on here ?!?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    There are two copies of PHP on cPanel machines. One at /usr/local/bin/php and one at /usr/bin/php so that the multiple handlers available can be used. Since the php.ini is stored at /usr/local/lib/php.ini, the binary you are using would be at /usr/local/bin/php but you could simply execute "php -v" without the path to get the PHP version information from the existing installation. This is going to default to /usr/local/bin/php binary.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. qwerty

    qwerty Well-Known Member

    Joined:
    Jan 21, 2003
    Messages:
    214
    Likes Received:
    2
    Trophy Points:
    168
    I thought that was just the php that cpanel used internally ?

    I get "cli" in that case .. ie.

    /usr/local/bin/php -v
    PHP 5.3.6 (cli) (built: Apr 18 2011 07:15:07

    I am so confused
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,563
    Likes Received:
    42
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    su_php uses the CGI php binary to serve PHP applications.

    PHP makes this unnecessarily complicated by having a separate binary for CGI and CLI. The /usr/bin/php binary is always the one used for CGI. The /usr/local/bin/php is always the one used for CLI, on cPanel & WHM systems.

    The binary we ship with the product is in /usr/local/cpanel/3rdparty
     
    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