PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gd.so' undefined symbol: gdImageWebpCtx in Unknown

We're running RHEL6 and just started getting this error when restarting php-fpm.

PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gd.so' - /usr/lib64/php/modules/gd.so: undefined symbol: gdImageWebpCtx in Unknown

I've tried restarting the server and running yum update but haven't gotten rid of the error. Any help would be appreciated.


Solution 1:

This means, that gdImageWebpCtx symbol cannot be found in shared libraries used by the module. gdImageWebpCtx is provided by gd/libgd (not php-gd).

readelf -s /usr/lib64/libgd.so.2

and

nm -D /usr/lib64/libgd.so.2

will list symbols and I'm very sure, that you won't find it there.

I had dozens of similar/compatibility problems with packages provided by Remi Collet (looks like he's very busy to maintain everything et cetera).

Remove all remi packages (rpm -qa|grep remi), delete remi-release package and install last available php/gg/etc packages from EPEL repository (you may need to downgrade them with rpm -Uvh package.rpm --oldversion). Then upgrade all packages (!).

If you want to have php 5.5, then I recommend you to download src.rpm's from remi's repo, install src.rpm and recompile with rpmbuild --target x86_64 -ba /root/rpmbuild/SPECS/php.spec . This way all binaries will be built according to your system.

That's the reason why I never use REMI's php rpms. Mysql ones are good.

Solution 2:

I've updated gd-last to latest version and it resolve my issue with remi packages.