Error in PECL for PHP 7.0 under CentOS 7
Hello guys, I noticed this issue in two servers already:
I use to enable PECL APCu on servers with PHP 7.0/7.1. This worked perfect on all my CentOS 6.9 servers.
But when it comes to install APCu for PHP 7.0 on CentOS 7.3, I got this shown in screen:
(notice: this does not happen on PECL for PHP 7.1, even if both have the same active modules, so it must be a bug)
Any ideas on why this may be happenning? Thanks in advance!
Path Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: installable in Role.php on line 139 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: phpfile in Role.php on line 204 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Notice: Undefined index: config_vars in Role.php on line 46 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php70/root/usr/share/pear/PEAR/Command.php on line 249 XML Extension not foundAny ideas on why this may be happenning? Thanks in advance!
-
Hi, The error you gave has something in the last that states : XML Extension not found. Can you confirm this module is installed on the PHP 7 of your installation? Have you tried something like below on your server? # pecl install apcu-(Version) 0 -
Yep, XML is installed already. Have you tried something like below on your server? # pecl install apcu-(Version)
I wouldn't try that, as cPanel is now able to install PECL items for specific, available PHP versions installed. I'm not sure if this is something you can install globally without doing a mess.0 -
Hello, Can you reproduce the issue when installing that PECL module via the command line for PHP 7.0? EX: /opt/cpanel/ea-php70/root/usr/bin/pecl install apcu
Also, please post the output from the following command:rpm -qa|grep php-xml
Thank you.0 -
Hello, Can you reproduce the issue when installing that PECL module via the command line for PHP 7.0? EX:
/opt/cpanel/ea-php70/root/usr/bin/pecl install apcu
Hello Michael, the problem is when you try to install acpu using the WHM UI. I tried from the command line for PHP 7.1 and worked like a breeze:/opt/cpanel/ea-php71/root/usr/bin/pecl install apcu
This worked ok on CentOS 6.9! And the one below worked ok on CentOS 7.3!/opt/cpanel/ea-php70/root/usr/bin/pecl install apcu
Also, please post the output from the following command:
rpm -qa|grep php-xml
This is the output on CentOS 7.3:rpm -qa|grep php-xml ea-php55-php-xmlrpc-5.5.38-22.22.5.cpanel.x86_64 ea-php71-php-xml-7.1.7-1.1.6.cpanel.x86_64 ea-php56-php-xml-5.6.31-1.1.6.cpanel.x86_64 ea-php56-php-xmlrpc-5.6.31-1.1.6.cpanel.x86_64 ea-php55-php-xml-5.5.38-22.22.5.cpanel.x86_64 ea-php70-php-xml-7.0.21-1.1.6.cpanel.x86_64 ea-php54-php-xml-5.4.45-38.38.5.cpanel.x86_64 ea-php71-php-xmlrpc-7.1.7-1.1.6.cpanel.x86_64 ea-php54-php-xmlrpc-5.4.45-38.38.5.cpanel.x86_64 ea-php70-php-xmlrpc-7.0.21-1.1.6.cpanel.x86_64
and this one is the output in my CentOS 6.9:rpm -qa|grep php-xml ea-php70-php-xml-7.0.21-1.1.6.cpanel.x86_64 ea-php55-php-xmlrpc-5.5.38-22.22.5.cpanel.x86_64 ea-php71-php-xml-7.1.7-1.1.6.cpanel.x86_64 ea-php54-php-xml-5.4.45-38.38.5.cpanel.x86_64 ea-php55-php-xml-5.5.38-22.22.5.cpanel.x86_64 ea-php70-php-xmlrpc-7.0.21-1.1.6.cpanel.x86_64 ea-php56-php-xml-5.6.31-1.1.6.cpanel.x86_64 ea-php54-php-xmlrpc-5.4.45-38.38.5.cpanel.x86_64 ea-php71-php-xmlrpc-7.1.7-1.1.6.cpanel.x86_64 ea-php56-php-xmlrpc-5.6.31-1.1.6.cpanel.x86_64
Do you see anything odd?0 -
Hello, The output you provided looks normal, and I'm unable to reproduce this issue on a test system. Could you open a support ticket using the link in my signature so we can take a closer look? Thank you. 0 -
Hello, i ran into the same issue and found a solution.. Backround: i have 3 versions of php installed: 5.6, 7.0 and 7.1 in WHM->Module Installers->PHP PECL the installer worked fine for 7.0 (didn't check 5.6), but not 7.1; it would display an entire page filled with error messages like this: Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /opt/cpanel/ea-php71/root/usr/share/pear/PEAR/Command.php on line 249 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice: Undefined index: honorsbaseinstall in Role.php on line 173 Notice:.....
and at the very end was this mention: XML Extension not found
so i found this solution on serverfault Basically, the installer is using the -n option, which disregards any custom .ini files and, as such, ignores the xml extension, which it needs in order to function properly except, instead of simply executing nano `which pear` to remove the -n option, you have to modify a version appropriate file. in the case of php 7.1, it is as follows:nano /opt/cpanel/ea-php71/root/usr/bin/pecl
Interestingly, the contents of /opt/cpanel/ea-php71/root/usr/bin/pecl and /opt/cpanel/ea-php70/root/usr/bin/pecl are quite different.. here is /opt/cpanel/ea-php71/root/usr/bin/pecl -- note the -n option at the beginning of the last line#!/bin/sh # first find which PHP binary to use if test "x$PHP_PEAR_PHP_BIN" != "x"; then PHP="$PHP_PEAR_PHP_BIN" else if test "/opt/cpanel/ea-php71/root/usr/bin/php" = '@'php_bin'@'; then PHP=php else PHP="/opt/cpanel/ea-php71/root/usr/bin/php" fi fi # then look for the right pear include dir if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then INCDIR=$PHP_PEAR_INSTALL_DIR INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR" else if test "/opt/cpanel/ea-php71/root/usr/share/pear" = '@'php_dir'@'; then INCDIR=`dirname $0` INCARG="" else INCDIR="/opt/cpanel/ea-php71/root/usr/share/pear" INCARG="-d include_path=/opt/cpanel/ea-php71/root/usr/share/pear" fi fi exec $PHP -C -n -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"
and here is /opt/cpanel/ea-php70/root/usr/bin/pecl#!/bin/sh exec /opt/cpanel/ea-php70/root/usr/bin/php -C \ -d include_path=/opt/cpanel/ea-php70/root/usr/share/pear \ -d date.timezone=UTC \ -d output_buffering=1 \ -d variables_order=EGPCS \ -d safe_mode=0 \ -d register_argc_argv="On" \ /opt/cpanel/ea-php70/root/usr/share/pear/peclcmd.php "$@"
EDIT: the php56 file looks much like the php70 file, and is confirmed working on my system. Finally, i'll note that php71 is my default php version -- not sure whether that makes a difference here. Clearly, though, when i installed php71 through EasyApache 4, the default Pecl script was used, rather than the custom one used by php56 and php70....0 -
the installer worked fine for 7.0 (didn't check 5.6), but not 7.1;
Can you verify which version of cPanel is installed on this system? Also, are you using the latest available packages offered in the EA4 yum repo (E.g. running "yum update" shows no available updates)? Thank you.0 -
@cPanelMichael: WHM is v66.0.19, and 'yum update' results in 'No packages marked for update'... Also, i just migrated my server from EA3 to EA4 and, once that was done, from php54 + php55 + php56 to php56 + php70 + php71 last week; i made php71 the default and enabled php-fpm Note: the above solution worked perfectly 0 -
Hello, It's possible you are noticing this issue due to a change in how php.ini files are managed. This is discussed in more detail on the following threads: SOLVED - cPanel 66 Update MultiPHP INI Editor Changes php.ini changes in cPanel 66 Thank you. 0
Please sign in to leave a comment.
Comments
9 comments