Symptoms
When enabling open_basedir on a specific version of PHP and then navigating to WHM >> Module Installers >> Pecl, errors similar to the following are displayed for the same version of PHP that open_basedir is enabled on:
Path Warning: is_executable(): open_basedir restriction in effect.
File(/path/to/file) is not within the allowed path(s)
Module Include Path
Path Path not found.
Warning: popen() has been disabled for security reasons in PEAR/Builder.php on line 465
ERROR: failed to run `phpize'
Description
This occurs when using open_basedir and not including paths that are required by pecl in open_basedir or when disabling a PHP function that is required by pecl using the disable_functions option in your version of PHP.
Our support department has filed the following improvement case with our development team to review this further: CPANEL-26292
Workaround
Connect to your server via SSH or WHM >> terminal as root and temporarily set open_basedir and disable_functions to NULL in pecl by adding the following lines beneath the existing definitions in /opt/cpanel/ea-php##/root/usr/bin/pecl
(replace ## with your version of PHP. Example: /opt/cpanel/ea-php74/root/usr/bin/pecl
)
-d disable_functions=NULL \
-d open_basedir=NULL \
If you are not familiar with editing files on the command line, please see: