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

nothsa

Well-Known Member
Nov 30, 2004
69
0
156
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
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
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
The handler selection may be "none" if the version of PHP is not available, not installed, of it it is otherwise not usable.

You need to run EasyApache (WHM->Software->Update Apache), and choose PHP5, and recompile.
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
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
If I choose none for php5 handler, what would happen?
If the handler is set to "none" that means there will be no specific handler used for the applicable version of PHP being affected.

How can I go back to choose php 5 handler?
Please refer to the earlier replies; the same information applies in detailing how to "go back" to choose a PHP 5 handler. :)
 

asiams

Well-Known Member
May 28, 2003
89
0
156
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?
 

asiams

Well-Known Member
May 28, 2003
89
0
156
Hokkaido, JAPAN
no handler selection

Here is the current setup:

[email protected] [/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.
 

zacharooni

Member
Feb 11, 2010
8
1
53
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
 
Last edited:

asiams

Well-Known Member
May 28, 2003
89
0
156
Hokkaido, JAPAN
Thank you

Thank you

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

Thanks again.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
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
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
 

Luntek

Registered
Jul 4, 2011
1
0
51
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?
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
41
348
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.