Symptoms
After installing a PHP module via EasyApache 4 that is provided by the PHP-ELS repository (alt-php), the installed PHP module is not loaded by the website.
Cause
ELS-PHP installs module configurations to /opt/alt/phpXX/etc/php.d.all/, however, it is currently configured to load modules from /opt/alt/phpXX/link/conf/. As a result, additional modules that are installed are never loaded by PHP during runtime.
CloudLinux currently has case ALTPHP-2352 open to resolve this issue.
Resolution
- Access the command-line via SSH or using the Terminal in WHM.
Run the following command to link create a symlinks for all install
alt-phpversions so that the modules are correctly loaded:/usr/local/cpanel/bin/rebuild_phpconf --current | perl -lane 'print $F[0] if $F[0] =~ m|alt|' | while read altphp ; do ver=$(echo "${altphp}" | cut -d - -f2) loaded_path="/opt/alt/${ver}/etc/php.d" all_path="/opt/alt/${ver}/etc/php.d.all" echo "Checking ini directory for ${altphp}" if [ -L "${loaded_path}" ]; then echo "${altphp} php.d directory is a symlink, no further action needed" else mv -v "${loaded_path}" "${loaded_path}.cpbak" && ln -sv "${all_path}" "${loaded_path}" fi doneNote: If a new PHP version is installed on the sever, the above command will need to be repeated.
Comments
0 comments
Article is closed for comments.