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 Handler: None and Default PHP Version (.php files) is empty - PHP 5.4.4

Discussion in 'General Discussion' started by Brunomiova, Jul 13, 2012.

  1. Brunomiova

    Brunomiova Registered

    Joined:
    Jul 13, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Arapiraca, Brazil
    cPanel Access Level:
    Root Administrator
  2. 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
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    Could you also try bumping it to unlimited then in WHM > Tweak Settings > Max cPanel Process Memory? If that still doesn't work, please check /usr/local/cpanel/logs/error_log when loading WHM > Apache Configuration > PHP and SuExec Configuration area. If you do not see errors, please try running the update in command line. First, check the current settings:

    Code:
    /usr/local/cpanel/bin/rebuild_phpconf --current
    After that, set it using this type of example:

    Code:
    /usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
    The above represents 5 as PHP 5 being default handler, none for PHP 4, suphp for PHP 5 hanlder, and 1 for suEXEC being enabled. If you want a different handler for PHP 5 than suphp, enter either dso or fcgi there instead.
     
  3. Brunomiova

    Brunomiova Registered

    Joined:
    Jul 13, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Arapiraca, Brazil
    cPanel Access Level:
    Root Administrator
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    Returning: "Invalid combination. PHP5 is not available. Please rebuild apache if you require this configuration."

    and after the upgrade:

    Code:
    [B]/usr/local/cpanel/bin/rebuild_phpconf --current[/B]
    
    Available handlers: suphp dso cgi none
    DEFAULT PHP: 5
    PHP4 SAPI: none
    PHP5 SAPI: none
    SUEXEC: enabled
    RUID2: not installed
     
  4. brasoveanul

    brasoveanul Member

    Joined:
    May 9, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    I have the same issue. :| Any suggestion would be appreciated.
     
  5. brasoveanul

    brasoveanul Member

    Joined:
    May 9, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    The error in the log refers to the directive magic_quotes_gpc, which is unsupported. What file should I edit? I use suphp.
     
  6. 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
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    Please post the full error from the log and which log you are seeing the error in specifically.
     
  7. brasoveanul

    brasoveanul Member

    Joined:
    May 9, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    The error log is located at /usr/local/cpanel/logs/error_log . The message is the following, and there are several identical messages in the log, one after the other:

    <b>Fatal error</b>: Directive 'magic_quotes_gpc' is no longer available in PHP in <b>Unknown</b> on line <b>0</b><br />
    at /usr/local/cpanel/Cpanel/PHPINI.pm line 73
    Cpanel::PHPINI::check_installed_php_binaries() called at /usr/local/cpanel/Cpanel/PHPConfig.pm line 489
    Cpanel::PHPConfig::_get_partial_advconfig_conf() called at /usr/local/cpanel/Cpanel/PHPConfig.pm line 169
    Cpanel::PHPConfig::configure_php(HASH(0xa44d6d0)) called at /usr/local/cpanel/Cpanel/PHPConfig.pm line 143
    Cpanel::PHPConfig::setup_default_phpconf(HASH(0xa3ec01c)) called at /var/cpanel/perl/easy/Cpanel/Easy/Utils/PHP.pm line 232
    Cpanel::Easy::Utils::PHP::setup_php_include(Cpanel::Easy::Apache=HASH(0x9809e2c)) called at /var/cpanel/perl/easy/Cpanel/Easy/Uti$
    Cpanel::Easy::Utils::HttpdConf::_generate_config(Cpanel::Easy::Apache=HASH(0x9809e2c)) called at /var/cpanel/perl/easy/Cpanel/Eas$
    Cpanel::Easy::Utils::HttpdConf::post_httpd_conf_handler(Cpanel::Easy::Apache=HASH(0x9809e2c)) called at /var/cpanel/perl/easy/Cpa$
    Cpanel::Easy::Apache::UI::HTML::cleanup(Cpanel::Easy::Apache::UI::HTML=HASH(0x9813814), Cpanel::Easy::Apache=HASH(0x9809e2c)) cal$
    Cpanel::Easy::cleanup(Cpanel::Easy::Apache=HASH(0x9809e2c)) called at /var/cpanel/perl/easy/Cpanel/Easy.pm line 1003
    Cpanel::Easy::install_profile(Cpanel::Easy::Apache=HASH(0x9809e2c), undef, undef) called at /var/cpanel/perl/easy/Cpanel/Easy/Apa$
    Cpanel::Easy::Apache::install_profile(Cpanel::Easy::Apache=HASH(0x9809e2c), undef) called at /var/cpanel/perl/easy/Cpanel/Easy/Ut$
    Cpanel::Easy::Utils::BackGround::__ANON__(Cpanel::Easy::Apache=HASH(0x9809e2c), undef, '/tmp/.cpanel_easy-.BftCymizO9TiUas5') cal$
    Acme::Spork::spork(CODE(0x9060628), Cpanel::Easy::Apache=HASH(0x9809e2c), undef, '/tmp/.cpanel_easy-.BftCymizO9TiUas5') called at$
    Cpanel::Easy::Utils::BackGround::run_install_in_bg(Cpanel::Easy::Apache=HASH(0x9809e2c), undef) called at /var/cpanel/perl/easy/C$
    Cpanel::Easy::Apache::UI::HTML::install_profile(Cpanel::Easy::Apache::UI::HTML=HASH(0x9813814), Cpanel::Easy::Apache=HASH(0x9809e$
    Cpanel::Easy::run(Cpanel::Easy::Apache=HASH(0x9809e2c)) called at /usr/local/cpanel/whostmgr/docroot/cgi/easyapache.pl line 81
    [2012-07-15 20:38:44 +0300] info [apache_conf_distiller] 'local' datastore in use (/var/cpanel/conf/apache/local)
    [2012-07-15 20:38:44 +0300] info [easyapache] 'local' datastore in use (/var/cpanel/conf/apache/local)
    [2012-07-15 20:38:55 +0300] warn [Cpanel::PHPINI] Unexpected output from /usr/bin/php -v : <br />
     
  8. 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
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    If you run "php -v" without the quotes in command line, does it show the same error or a different one?

    I'm right now trying to update my test machine to PHP 5.4 to see the results. That might take 30 minutes, so please stand by.
     
  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
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    All right, so magic_quotes_gpc didn't compile on my machine with PHP 5.4, but it might be because I didn't previously have it selected. Please submit a ticket. I've just heard that if you select an MPM other than Prefork with PHP 5.4 that you might also have issues. We have an internal case about the magic quotes issue already (case 60278), but the ticket I've seen on the issue tried copying the PHP handler portion from another server's /usr/local/apache/conf/php.conf and that's not the ideal way to handle this. We'd need to see if we can get the handler to populate by possibly recompiling EasyApache to specifically remove magic quotes by using a custom build.

    A ticket can be submitted in WHM > Support Center > Contact cPanel or using the link in my signature. Please post the ticket number here afterward. I'm going to try to get to the ticket myself, since I'd like to investigate what is happening here (if it doesn't end up being magic quotes).
     
  10. brasoveanul

    brasoveanul Member

    Joined:
    May 9, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    Hello, I submitted the ticket, the request ID is 2921678 .
     
  11. 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
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    Of note, we found in the ticket that suhosin was the issue. EasyApache no longer allows PHP 5.4 + Suhosin to be compiled together. We have an internal case for /scripts/phpextensionmgr to prevent installation of suhosin there (that is case 2921678).
     
  12. brasoveanul

    brasoveanul Member

    Joined:
    May 9, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    Doesn't this pose a security threat to the apache+php system, its compilation without suhosin?
     
  13. 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
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    How precisely can we add support for SuHosin with PHP 5.4 when SuHosin themselves do not yet support PHP 5.4?

    Whether it reduces security in any way, PHP 5.4 is labelled as experimental during EasyApache. These are the risks being taken by users when they select experimental options.

    Thanks!
     
  14. brasoveanul

    brasoveanul Member

    Joined:
    May 9, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    I understand and agree, but I was just asking, could this pose a security threat, so that it would be advisable to defer upgrading to php 5.4 at this time? Is suhosin important, security-wise and in the context of php 5.4? Maybe php 5.4 contains some built-in security features?
     
  15. 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
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    Unfortunately, I'm not aware of suhosin replacement options in PHP 5.4, although it's possible that these exist and I'm simply not finding any details. I believe the main reason it isn't yet compatible is that the developer of suhosin has been working on updating for PHP 5.4 for awhile and hasn't yet completed the process.
     
  16. sardelich

    sardelich Well-Known Member

    Joined:
    Apr 28, 2010
    Messages:
    72
    Likes Received:
    1
    Trophy Points:
    8
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    hm.I just did a fresh install of centos 6.3 x64 and latest release of cpanel.Tried compiling easyapache with php 5.4 and no luck,same errors as above,but now i still cant get it compiled wioth php 5.3.14.Now I'm trying with suhosin off,but still I want php 5.3.14 compiled,and after 3 attempts still no luck :/
     
  17. 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
    Re: PHP Handler: None and Default PHP Version (.php files) is empty - PHP 5

    Is the PHP handler dropdown empty as well? If so, try increasing WHM > Tweak Settings > Max cPanel Process Memory to 512 or unlimited to see the results. If the handler is empty under PHP 5.3, it is almost always due to that max memory setting.
     
  18. LAZer

    LAZer Well-Known Member

    Joined:
    Jan 18, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    at net :D
    i have upgraded my php from 5.3 to 5.4 for 2 or 3 times during previous monthes , but i always faced the same problem , there is no php handler for php 5.4 in whm , and memory is set to unlimited in tweak setting.
    today i finally could solve it . i must rebuild php.ini configuration with removing safe_mode codes from it , and also some eaccelerator config lines. then saved the php.ini via whm php configuration editor again . ( it updates this file : /usr/local/lib/php.ini )
    then i could manually update apache php handler :
    and now php -v works.



    these are eaccelerator configs that generated error :


    these are the errors when easy apache completed installation process :

    and now the working php :
    it is in suphp mode , but it doesnt have safe_mode , magic_quotes and suhossin .
     
    #18 LAZer, Aug 12, 2013
    Last edited: Aug 12, 2013
Loading...

Share This Page