Control Web Panel
WebPanel => How to => Topic started by: DragoCom on July 21, 2025, 07:55:27 PM
-
Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20220829/imagick.so (/usr/local/lib/php/extensions/no-debug-non-zts-20220829/imagick.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20220829/imagick.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20220829/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20220829/mongodb.so (/usr/local/lib/php/extensions/no-debug-non-zts-20220829/mongodb.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20220829/mongodb.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20220829/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
-
What version of PHP? Do you need Imagick and MongoDB? If not, recompile PHP without them. Otherwise:
https://starburst.help/control-web-panel-cwp/control-web-panel-cwp-admin-tutorials/install-php-8-2-0-in-cwp/
https://starburst.help/control-web-panel-cwp/control-web-panel-cwp-admin-tutorials/fix-php-sodium-error-running-with-cwp-on-almalinux-9/
(I think you can ignore the note about pinging PECL -- their infrastructure only supports TCP 80 and 443; they always drop ICMP packets)
Or the direct answer to your original question, in the relevant php.ini:
log_errors = off
display_errors = off
error_reporting = E_ALL & ~E_DEPRECATED
-
The previous advice is more of a band-aid than a real solution. I had the same error in the past, but only with ImageMagick. What solved it for me was recompiling all PHP versions, that fixed the issue. I also updated everything to the latest version.
In the CWP panel, go to PHP Selector, PHP-FPM Selector, and even PHP Version Switcher, then rebuild each PHP version you have installed. You can also update everything to the latest versions. Do it one by one and check if the error is resolved after each step.
Before doing that, connect via SSH and run the PHP version directly in the console to see if the error appears, it usually does. Then update and try again.
You can use a command like:
/opt/alt/php83/usr/bin/php --version
-
I guess I should've put a smiley so the humor would be more obvious -- not actual advice, but how to literally perform what the OP asked (symptomatic vs. causative treatment).