SOLVED PHP Warning: PHP Startup: Unable to load dynamic library

Nile Youth

Member
Apr 2, 2015
24
7
53
Egypt
cPanel Access Level
Root Administrator
Twitter
Hello I have got a lot of this error on my server:

Code:
[13-Apr-2017 16:32:55 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/cpanel/3rdparty/php/PHP_VERSION/lib/extensions/no-debug-non-zts-YYYYMMDD/apcu.so' - /usr/local/cpanel/3rdparty/php/PHP_VERSION/lib/extensions/no-debug-non-zts-YYYYMMDD/apcu.so: cannot open shared object file: No such file or directory in Unknown on line 0
can you help how can I fix it ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

Could you verify where you are receiving that error message? Is this when you access a plugin via cPanel/WHM?

Thank you.
 

Mark Shaw

Member
Apr 13, 2017
10
1
3
PEI Canada
cPanel Access Level
DataCenter Provider
Hello,

This error occurs when there is a extension= or zend_extension that is trying to load "apcu.so"
however it cannot be loaded because it cannot be found. It's either in your php.ini file or in one of your custom defined configuration files or in the custom file that is generated for apcu.so which can be found here:

/etc/php/7.0/cli/conf.d/20-apcu.ini

Its very possible that you have accidentally disabled it in your PHP configuration or deleted it by mistake. Verify that it is in the correct place and if not replace it, or comment out the line.

I feel like you are most likely using PHP7.* which is causing the issue, here is the actual fix for this which you need to do at a sudo or root level:

sudo apt-get install php7.0-dev
pecl channel-update pecl.php.net
pecl install apcu

Thanks,
Mark S.
 

Nile Youth

Member
Apr 2, 2015
24
7
53
Egypt
cPanel Access Level
Root Administrator
Twitter
Thanks every one for help

Hello,

Could you verify where you are receiving that error message? Is this when you access a plugin via cPanel/WHM?

Thank you.
I got it in error_log file

Hello,

This error occurs when there is a extension= or zend_extension that is trying to load "apcu.so"
however it cannot be loaded because it cannot be found. It's either in your php.ini file or in one of your custom defined configuration files or in the custom file that is generated for apcu.so which can be found here:

/etc/php/7.0/cli/conf.d/20-apcu.ini

Its very possible that you have accidentally disabled it in your PHP configuration or deleted it by mistake. Verify that it is in the correct place and if not replace it, or comment out the line.

I feel like you are most likely using PHP7.* which is causing the issue, here is the actual fix for this which you need to do at a sudo or root level:

sudo apt-get install php7.0-dev
pecl channel-update pecl.php.net
pecl install apcu

Thanks,
Mark S.
I have put in my php.ini

only
[apcu]
apc.enabled = 1
apc.shm_size = 128M

and found in apcu.ini in
Code:
./opt/cpanel/ea-php56/root/etc/php.d/apcu.ini
Code:
[apcu]
extension=/opt/cpanel/ea-php56/root/usr/lib64/php/modules/apcu.so
apc.enabled = 1
apc.shm_size = 128M
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

I'm happy to see the issue is now addressed. Thank you for updating us with the outcome.

Thank you.