Solved PHP Startup: Unable to load dynamic library 'curl.so' and 'gd.so'

Hi,

I'm running FreeBSD 11.2-RELEASE, with a jail for a wordpress site.
Recently, maybe after last upgrade, get these warnings:

Code:
Performing sanity check on php-fpm configuration:
[11-Mar-2019 23:23:51] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20170718/curl.so (Shared object "libnghttp2.so.14" not found, required by "libcurl.so.4"), /usr/local/lib/php/20170718/curl.so.so (Cannot open "/usr/local/lib/php/20170718/curl.so.so")) in Unknown on line 0
[11-Mar-2019 23:23:51] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20170718/gd.so (Shared object "libfontconfig.so.1" not found, required by "libgd.so.6"), /usr/local/lib/php/20170718/gd.so.so (Cannot open "/usr/local/lib/php/20170718/gd.so.so")) in Unknown on line 0
[11-Mar-2019 23:23:51] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Stopping php_fpm.
Performing sanity check on php-fpm configuration:
[11-Mar-2019 23:23:51] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20170718/curl.so (Shared object "libnghttp2.so.14" not found, required by "libcurl.so.4"), /usr/local/lib/php/20170718/curl.so.so (Cannot open "/usr/local/lib/php/20170718/curl.so.so")) in Unknown on line 0
[11-Mar-2019 23:23:51] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20170718/gd.so (Shared object "libfontconfig.so.1" not found, required by "libgd.so.6"), /usr/local/lib/php/20170718/gd.so.so (Cannot open "/usr/local/lib/php/20170718/gd.so.so")) in Unknown on line 0
[11-Mar-2019 23:23:51] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Starting php_fpm.
[11-Mar-2019 23:23:51] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20170718/curl.so (Shared object "libnghttp2.so.14" not found, required by "libcurl.so.4"), /usr/local/lib/php/20170718/curl.so.so (Cannot open "/usr/local/lib/php/20170718/curl.so.so")) in Unknown on line 0
[11-Mar-2019 23:23:51] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20170718/gd.so (Shared object "libfontconfig.so.1" not found, required by "libgd.so.6"), /usr/local/lib/php/20170718/gd.so.so (Cannot open "/usr/local/lib/php/20170718/gd.so.so")) in Unknown on line 0

It complains about not finding libfontconfig.so.1, but:
Code:
>find /usr/ -name 'libfontconfig*'                                                                                                                                                                                                                                   
/usr/local/lib/libfontconfig.so                                                                                                                                                                                                                                                 
/usr/local/lib/libfontconfig.so.1                                                                                                                                                                                                                                               
/usr/local/lib/libfontconfig.a                                                                                                                                                                                                                                                  
/usr/local/lib/libfontconfig.so.1.10.1


Code:
>ls -l /usr/local/lib/php/20170718/curl.so                                                                                                                                                                                                                          
-rw-r--r--  1 root  wheel  85856 Feb 10 01:17 /usr/local/lib/php/20170718/curl.so                                                                                                                                                                                               
webserver / >ls -l /usr/local/lib/php/20170718/gd.so                                                                                                                                                                                                                            
-rw-r--r--  1 root  wheel  106072 Feb 10 01:17 /usr/local/lib/php/20170718/gd.so

>find /usr -name libnghttp2.so.14                                                                                                                                                                                                                                   
/usr/local/lib/libnghttp2.so.14

What should I do?
 
Is this under your jail directory or under your host?

/usr/local/lib/php...
/path/to/jail/usr/local/lib/php/.....
 
Didn't get any suggestions and also couldn't find anything on the web.
Removed all the php72-* files and substituted them for the equivalent php73-* ones.
The problem seems to have vanished.
 
Back
Top