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.

Can't choose PHP 5 Handler. Only "none" appears.

Discussion in 'General Discussion' started by nothsa, Feb 11, 2010.

  1. nothsa

    nothsa Well-Known Member

    Joined:
    Nov 30, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    I searched the forums, but I surprisingly couldn't find this question asked before.

    I'm wanting to convert from PHP4 to PHP5 on my server, so I went to "WHM > Apache Configuration > PHP and SuExec Configuration". My problem is that "PHP 5 Handler" setting only has "none" in the drop-down and "Default PHP Version (.php files)" only has "4" in the drop-down.

    Does anyone know why this might be happening? How do I switch to PHP5?

    Version: cPanel 11.25.0-R43286 - WHM 11.25.0 - X 3.9
    OS: CENTOS 4.8 i686
     
  2. zacharooni

    zacharooni Member

    Joined:
    Feb 11, 2010
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    DataCenter Provider
    You need to run EasyApache (WHM->Software->Update Apache), and choose PHP5, and recompile.
     
    cPanelDon likes this.
  3. nothsa

    nothsa Well-Known Member

    Joined:
    Nov 30, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Perfect! Thanks =)
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    The handler selection may be "none" if the version of PHP is not available, not installed, of it it is otherwise not usable.

    Installing or recompiling via EasyApache as described by zacharooni should alleviate the issue and allow for configuration of the desired PHP handler(s).

    For additional reference regarding EasyApache please see the following areas of documentation:
    EasyApache (Apache Update)
    Apache & cPanel/WHM
    Apache PHP Request Handling
     
  5. asiams

    asiams Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Hokkaido, JAPAN
    PHP 5 Handler

    If I choose none for php5 handler, what would happen?

    How can I go back to choose php 5 handler?

    Thanks.
     
  6. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    If the handler is set to "none" that means there will be no specific handler used for the applicable version of PHP being affected.

    Please refer to the earlier replies; the same information applies in detailing how to "go back" to choose a PHP 5 handler. :)
     
  7. asiams

    asiams Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Hokkaido, JAPAN
    Still php 5 hander not showing

    Hello,

    I have gone to apache rebuild with php5, but still there is no default php without handler none.

    What could be the problem?
     
  8. asiams

    asiams Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Hokkaido, JAPAN
    no handler selection

    Here is the current setup:

    root@server24 [/home/kcweb/www]# /usr/local/cpanel/bin/rebuild_phpconf --current
    Available handlers: suphp dso cgi none
    DEFAULT PHP: 5
    PHP4 SAPI: none
    PHP5 SAPI: none
    SUEXEC: enabled

    Is there any way to manually select php5 handler?

    Thanks.
     
  9. zacharooni

    zacharooni Member

    Joined:
    Feb 11, 2010
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    DataCenter Provider
    Hello,

    You will need to execute this command:

    /usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
    For default php5 with suPHP handler

    /usr/local/cpanel/bin/rebuild_phpconf 5 none dso 1
    For default php5 with DSO (mod_php) handler
     
    #9 zacharooni, Feb 12, 2010
    Last edited: Feb 12, 2010
  10. asiams

    asiams Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Hokkaido, JAPAN
    Thank you

    Thank you

    This was done by recompiling from other computer. Somehow, the last saved profile was missing php5.

    Thanks again.
     
  11. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    The above solution is correct to manually set the PHP handler via CLI/SSH access. Please also refer to the accompanying documentation for the referenced commands: Configuring PHP and suEXEC from the Command Line
     
  12. Luntek

    Luntek Registered

    Joined:
    Jul 4, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    For me, in turn, with apache 2.2.19, php 4.4.9 and php 5.2.17 does not work in php4 php5 handlers suPHP and PHP I have none. How do I fix this?

    Let me add that: /usr/local/cpanel/bin/ suPHP none rebuild_phpconf 5 1 does not work because I get the error:
    PHP5 is not available. Please rebuild apache if you require this configuration.
    root @ grinch [~] # /usr/local/cpanel/bin/ suPHP none rebuild_phpconf 4 1
    warn [Cpanel:: PHPINI] Unexpected output from / usr / bin / php-v: [Wed Jul 04 10:36:32 p.m. 2011] [warn-phpd] The ionCube PHP Loader is disabled Because of startup problems. (pid 30554)

    I tried to install ioncube also shows a report that is okay, but unfortunately on php5 handler does not work.

    Someone help?
     
    #12 Luntek, Jul 4, 2011
    Last edited: Jul 4, 2011
  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
    Hello,

    You should instead try to uninstall IonCube Loader:

    Code:
    /scripts/phpextensionmgr uninstall IonCubeLoader
    If you are still unable to select a PHP handler at that point, try to move the existing php.ini file and recreate a default one:

    Code:
    mv /usr/local/lib/php.ini /usr/local/lib/php.ini.bak110705
    /scripts/phpini
    You can then do a diff on the two php.ini files to see what might not have been properly placed into the prior php.ini to cause the issue:

    Code:
    cd /usr/local/lib
    diff php.ini php.ini.bak110705
    Of note, the most frequent reason I've actually seen for the PHP handler showing as none and not being selectable is due to a corrupted php.ini where it either has lines that will not parse or load, causing PHP itself to not function even for selecting a handler.

    Oftentimes, you can see what set line of the php.ini might be the issue if you run this command to check the PHP version:

    Code:
    php -v
    If there are issues in the php.ini file, it may well indicate the line number.
     
Loading...

Share This Page