SOLVED Unable to set PHP 7.4 Handler

Operating System & Version
centOS 7.8
cPanel & WHM Version
was 88.0.14, now 90.0.5

MWalton

Member
May 12, 2020
6
2
3
United Kingdom
cPanel Access Level
Root Administrator
Hello,

I am unable to set any PHP Handler for PHP 7.4 (ea-php74), when I attempted to, I am presented with the following error
Code:
API failure: (XID p3u2nt) Provide the “type” parameter for the “Cpanel::WebServer::Supported::apache::make_handler” function.
I attempted to use the following code from The rebuild_phpconf Script - Version 74 Documentation - cPanel Documentation
Code:
/usr/local/cpanel/bin/rebuild_phpconf --ea-php74=cgi
and recieved the following error
Code:
(XID 2znnrp) Provide the “type” parameter for the “Cpanel::WebServer::Supported::apache::make_handler” function. at /usr/local/cpanel/bin/rebuild_phpconf line 168.
.
I have tried suPHP, LSAPI and CGI, no difference; I have reinstalled the PHP version via EasyApache and terminal and forced updated the system, no change.
PHP 7.2 and 7.3 both work fine, however, 7.4 does not work.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,255
313
Houston
Hello,

Do you have the ea-php74 package as well as one of the suPHP, LSAPI or CGI packages installed on the server? What is the output of the following?

Code:
/usr/local/cpanel/bin/rebuild_phpconf --current
From my tests:


Code:
 /usr/local/cpanel/bin/rebuild_phpconf --ea-php74=cgi

then

Code:
# /usr/local/cpanel/bin/rebuild_phpconf --current
DEFAULT PHP: ea-php74
ea-php56 SAPI: lsapi
ea-php70 SAPI: lsapi
ea-php71 SAPI: lsapi
ea-php72 SAPI: lsapi
ea-php73 SAPI: lsapi
ea-php74 SAPI: cgi
 

MWalton

Member
May 12, 2020
6
2
3
United Kingdom
cPanel Access Level
Root Administrator
Hello,

Do you have the ea-php74 package as well as one of the suPHP, LSAPI or CGI packages installed on the server? What is the output of the following?

Code:
/usr/local/cpanel/bin/rebuild_phpconf --current
From my tests:


Code:
 /usr/local/cpanel/bin/rebuild_phpconf --ea-php74=cgi

then

Code:
# /usr/local/cpanel/bin/rebuild_phpconf --current
DEFAULT PHP: ea-php74
ea-php56 SAPI: lsapi
ea-php70 SAPI: lsapi
ea-php71 SAPI: lsapi
ea-php72 SAPI: lsapi
ea-php73 SAPI: lsapi
ea-php74 SAPI: cgi
I tried your command as requested and this was the outcome:

Code:
[[email protected] ~]# /usr/local/cpanel/bin/rebuild_phpconf --current
DEFAULT PHP: ea-php73
ea-php72 SAPI: lsapi
ea-php73 SAPI: lsapi
Cpanel::Exception::MissingParameter/(XID ewsazp) Provide the “type” parameter for the “Cpanel::WebServer::Supported::apache::make_handler” function.
 at /usr/local/cpanel/Cpanel/WebServer/Supported/apache.pm line 223.
        Cpanel::WebServer::Supported::apache::make_handler(Cpanel::WebServer::Supported::apache=HASH(0x1818078), "lang", Cpanel::ProgLang::Supported::php=HASH(0x15539a8), "package","ea-php74", "type", undef) called at /usr/local/cpanel/bin/rebuild_phpconf line 194
        bin::rebuild_phpconf::ea4::do_current(HASH(0x14c25c0), Cpanel::ProgLang::Supported::php=HASH(0x15539a8), Cpanel::WebServer::Supported::apache=HASH(0x1818078)) called at /usr/local/cpanel/bin/rebuild_phpconf line 226
        bin::rebuild_phpconf::ea4::run(ARRAY(0xf7dd60)) called at /usr/local/cpanel/bin/rebuild_phpconf line 246
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,255
313
Houston
Interesting, thanks for running that. Will you try reinstalling php 7.4 with the following:

Code:
yum -y reinstall ea-php74
And let me know if the issue persists as well as what the output is for reinstalling.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,255
313
Houston
Ok, it's possible we missed a step (meaning I missed a step)

Do you see the following line in /etc/yum.conf
Code:
plugins=1
If not can you please add it then reinstall the php 7.4 package again and let me know if the issue persists?