Solved PHP Extensions - PHP Startup: Unable to load dynamic library

Oclair

New Member

Reaction score: 2
Messages: 19

Hi there,

Over time I changed something to apache/php and caused some weird issue. It was not apparent this was happening until web apps started to report suggested plugins were not available...

11.0-RELEASE-p6 FreeBSD 11.0-RELEASE-p6 #0 r310492
Apache 2.4.25 via ports
PHP 5.6.29 via ports php56 & php56-extensions

I noticed that some of my php extensions are not loading even though they are listed as built via php -i

If anyone knows their way around this please let me know if there is any quick fixes.

Thanks in advance,
Oclair

php -i over here http://paste.purplehat.org/view/37490172





/var/log/php_errors.log repeatedly reports the following errors
Code:
[26-Dec-2016 20:05:00 Europe/Vienna] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/exif.so' - Cannot open "/usr/local/lib/php/20131226/exif.so" in Unknown on line 0
[26-Dec-2016 20:05:00 Europe/Vienna] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/geoip.so' - Cannot open "/usr/local/lib/php/20131226/geoip.so" in Unknown on line 0
[26-Dec-2016 20:05:00 Europe/Vienna] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/horde_lz4.so' - Cannot open "/usr/local/lib/php/20131226/horde_lz4.so" in Unknown on line 0
[26-Dec-2016 20:05:00 Europe/Vienna] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/lzf.so' - Cannot open "/usr/local/lib/php/20131226/lzf.so" in Unknown on line 0
[26-Dec-2016 20:05:00 Europe/Vienna] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/soap.so' - Cannot open "/usr/local/lib/php/20131226/soap.so" in Unknown on line 0
[26-Dec-2016 20:05:00 Europe/Vienna] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/sockets.so' - Cannot open "/usr/local/lib/php/20131226/sockets.so" in Unknown on line 0
[26-Dec-2016 20:05:00 Europe/Vienna] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/memcache.so' - Cannot open "/usr/local/lib/php/20131226/memcache.so" in Unknown on line 0
Content of
# ll /usr/local/lib/php/20131226/
Code:
total 7480

-r--r--r--  1 root  wheel    37952 Oct 22 16:26 bcmath.so

-r--r--r--  1 root  wheel    22208 Oct 22 16:27 bz2.so

-r--r--r--  1 root  wheel    33328 Oct 22 16:27 calendar.so

-r--r--r--  1 root  wheel    13632 Oct 22 16:27 ctype.so

-r--r--r--  1 root  wheel    82968 Oct 22 16:27 curl.so

-r--r--r--  1 root  wheel   186136 Oct 22 16:28 dom.so

-r--r--r--  1 root  wheel  2906352 Dec 22 07:32 fileinfo.so

-r--r--r--  1 root  wheel    46208 Oct 22 16:28 filter.so

-r--r--r--  1 root  wheel    58176 Oct 22 16:29 ftp.so

-r--r--r--  1 root  wheel   422832 Oct 22 16:29 gd.so

-r--r--r--  1 root  wheel    12920 Oct 22 16:29 gettext.so

-r--r--r--  1 root  wheel   177296 Oct 22 16:30 hash.so

-r--r--r--  1 root  wheel    42424 Oct 22 16:30 iconv.so

-r--r--r--  1 root  wheel   100200 Oct 22 16:30 imap.so

-r--r--r--  1 root  wheel   381440 Nov 21 12:08 intl.so

-r--r--r--  1 root  wheel    42272 Oct 22 16:30 json.so

-r--r--r--  1 root  wheel    60288 Oct 22 16:31 ldap.so

-r--r--r--  1 root  wheel  1041440 Oct 22 16:31 mbstring.so

-r--r--r--  1 root  wheel    45696 Oct 22 16:31 mcrypt.so

-r--r--r--  1 root  wheel    49616 Oct 22 16:31 mysql.so

-r--r--r--  1 root  wheel   137512 Oct 22 16:32 mysqli.so

-r--r--r--  1 root  wheel   147832 Oct 22 16:32 opcache.so

-r--r--r--  1 root  wheel   142272 Oct 22 16:32 openssl.so

-r--r--r--  1 root  wheel   140920 Oct 27 15:43 pdf.so

-r--r--r--  1 root  wheel   102152 Oct 22 16:32 pdo.so

-r--r--r--  1 root  wheel    25216 Oct 22 16:32 pdo_mysql.so

-r--r--r--  1 root  wheel    25288 Oct 22 16:33 pdo_sqlite.so

-r--r--r--  1 root  wheel   265536 Oct 22 16:33 phar.so

-r--r--r--  1 root  wheel    29200 Oct 22 16:33 posix.so

-r--r--r--  1 root  wheel    22312 Oct 22 16:33 pspell.so

-r--r--r--  1 root  wheel    28272 Sep 28 23:36 scrypt.so

-r--r--r--  1 root  wheel    80880 Oct 22 16:34 session.so

-r--r--r--  1 root  wheel    54904 Oct 22 16:34 simplexml.so

-r--r--r--  1 root  wheel    46384 Oct 22 16:35 sqlite3.so

-r--r--r--  1 root  wheel    47576 Oct 22 16:35 tidy.so

-r--r--r--  1 root  wheel    18488 Oct 22 16:35 tokenizer.so

-r--r--r--  1 root  wheel    36968 Oct 22 16:35 wddx.so

-r--r--r--  1 root  wheel    53760 Oct 22 16:35 xml.so

-r--r--r--  1 root  wheel    34592 Oct 22 16:36 xmlreader.so

-r--r--r--  1 root  wheel    95672 Oct 22 16:36 xmlrpc.so

-r--r--r--  1 root  wheel    49240 Oct 22 16:36 xmlwriter.so

-r--r--r--  1 root  wheel    54536 Oct 22 16:36 zip.so

-r--r--r--  1 root  wheel    36472 Oct 22 16:37 zlib.so

httpd.conf loads the following DSO
Code:
LoadModule authn_file_module libexec/apache24/mod_authn_file.so

#LoadModule authn_dbm_module libexec/apache24/mod_authn_dbm.so

#LoadModule authn_anon_module libexec/apache24/mod_authn_anon.so

#LoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so

#LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so

LoadModule authn_core_module libexec/apache24/mod_authn_core.so

LoadModule authz_host_module libexec/apache24/mod_authz_host.so

LoadModule authz_groupfile_module libexec/apache24/mod_authz_groupfile.so

LoadModule authz_user_module libexec/apache24/mod_authz_user.so

#LoadModule authz_dbm_module libexec/apache24/mod_authz_dbm.so

#LoadModule authz_owner_module libexec/apache24/mod_authz_owner.so

#LoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so

LoadModule authz_core_module libexec/apache24/mod_authz_core.so

#LoadModule authnz_fcgi_module libexec/apache24/mod_authnz_fcgi.so

LoadModule access_compat_module libexec/apache24/mod_access_compat.so

LoadModule auth_basic_module libexec/apache24/mod_auth_basic.so

#LoadModule auth_form_module libexec/apache24/mod_auth_form.so

#LoadModule auth_digest_module libexec/apache24/mod_auth_digest.so

#LoadModule allowmethods_module libexec/apache24/mod_allowmethods.so

#LoadModule file_cache_module libexec/apache24/mod_file_cache.so

#LoadModule cache_module libexec/apache24/mod_cache.so

#LoadModule cache_disk_module libexec/apache24/mod_cache_disk.so

#LoadModule cache_socache_module libexec/apache24/mod_cache_socache.so

LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so

#LoadModule socache_dbm_module libexec/apache24/mod_socache_dbm.so

LoadModule socache_memcache_module libexec/apache24/mod_socache_memcache.so

#LoadModule watchdog_module libexec/apache24/mod_watchdog.so

#LoadModule macro_module libexec/apache24/mod_macro.so

#LoadModule dbd_module libexec/apache24/mod_dbd.so

#LoadModule dumpio_module libexec/apache24/mod_dumpio.so

#LoadModule buffer_module libexec/apache24/mod_buffer.so

#LoadModule data_module libexec/apache24/mod_data.so

#LoadModule ratelimit_module libexec/apache24/mod_ratelimit.so

LoadModule reqtimeout_module libexec/apache24/mod_reqtimeout.so

LoadModule ext_filter_module libexec/apache24/mod_ext_filter.so

#LoadModule request_module libexec/apache24/mod_request.so

#LoadModule include_module libexec/apache24/mod_include.so

LoadModule filter_module libexec/apache24/mod_filter.so

#LoadModule reflector_module libexec/apache24/mod_reflector.so

#LoadModule substitute_module libexec/apache24/mod_substitute.so

#LoadModule sed_module libexec/apache24/mod_sed.so

#LoadModule charset_lite_module libexec/apache24/mod_charset_lite.so

LoadModule deflate_module libexec/apache24/mod_deflate.so

LoadModule mime_module libexec/apache24/mod_mime.so

LoadModule log_config_module libexec/apache24/mod_log_config.so

#LoadModule log_debug_module libexec/apache24/mod_log_debug.so

#LoadModule log_forensic_module libexec/apache24/mod_log_forensic.so

#LoadModule logio_module libexec/apache24/mod_logio.so

LoadModule env_module libexec/apache24/mod_env.so

LoadModule mime_magic_module libexec/apache24/mod_mime_magic.so

#LoadModule cern_meta_module libexec/apache24/mod_cern_meta.so

LoadModule expires_module libexec/apache24/mod_expires.so

LoadModule headers_module libexec/apache24/mod_headers.so

#LoadModule usertrack_module libexec/apache24/mod_usertrack.so

#LoadModule unique_id_module libexec/apache24/mod_unique_id.so

LoadModule setenvif_module libexec/apache24/mod_setenvif.so

LoadModule version_module libexec/apache24/mod_version.so

#LoadModule remoteip_module libexec/apache24/mod_remoteip.so

LoadModule proxy_module libexec/apache24/mod_proxy.so

#LoadModule proxy_connect_module libexec/apache24/mod_proxy_connect.so

#LoadModule proxy_ftp_module libexec/apache24/mod_proxy_ftp.so

#LoadModule proxy_http_module libexec/apache24/mod_proxy_http.so

#LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so

#LoadModule proxy_scgi_module libexec/apache24/mod_proxy_scgi.so

#LoadModule proxy_fdpass_module libexec/apache24/mod_proxy_fdpass.so

#LoadModule proxy_wstunnel_module libexec/apache24/mod_proxy_wstunnel.so

#LoadModule proxy_ajp_module libexec/apache24/mod_proxy_ajp.so

#LoadModule proxy_balancer_module libexec/apache24/mod_proxy_balancer.so

#LoadModule proxy_express_module libexec/apache24/mod_proxy_express.so

#LoadModule session_module libexec/apache24/mod_session.so

#LoadModule session_cookie_module libexec/apache24/mod_session_cookie.so

#LoadModule session_crypto_module libexec/apache24/mod_session_crypto.so

#LoadModule session_dbd_module libexec/apache24/mod_session_dbd.so

#LoadModule slotmem_shm_module libexec/apache24/mod_slotmem_shm.so

#LoadModule slotmem_plain_module libexec/apache24/mod_slotmem_plain.so

LoadModule ssl_module libexec/apache24/mod_ssl.so

#LoadModule dialup_module libexec/apache24/mod_dialup.so

#LoadModule lbmethod_byrequests_module libexec/apache24/mod_lbmethod_byrequests.so

#LoadModule lbmethod_bytraffic_module libexec/apache24/mod_lbmethod_bytraffic.so

#LoadModule lbmethod_bybusyness_module libexec/apache24/mod_lbmethod_bybusyness.so

#LoadModule lbmethod_heartbeat_module libexec/apache24/mod_lbmethod_heartbeat.so

#LoadModule mpm_event_module libexec/apache24/mod_mpm_event.so

LoadModule mpm_prefork_module libexec/apache24/mod_mpm_prefork.so

#LoadModule mpm_worker_module libexec/apache24/mod_mpm_worker.so

LoadModule unixd_module libexec/apache24/mod_unixd.so

#LoadModule heartbeat_module libexec/apache24/mod_heartbeat.so

#LoadModule heartmonitor_module libexec/apache24/mod_heartmonitor.so

#LoadModule dav_module libexec/apache24/mod_dav.so

LoadModule status_module libexec/apache24/mod_status.so

LoadModule autoindex_module libexec/apache24/mod_autoindex.so

#LoadModule asis_module libexec/apache24/mod_asis.so

#LoadModule info_module libexec/apache24/mod_info.so

<IfModule !mpm_prefork_module>

        LoadModule cgid_module libexec/apache24/mod_cgid.so

</IfModule>

<IfModule mpm_prefork_module>

        LoadModule cgi_module libexec/apache24/mod_cgi.so

</IfModule>

#LoadModule dav_fs_module libexec/apache24/mod_dav_fs.so

#LoadModule dav_lock_module libexec/apache24/mod_dav_lock.so

LoadModule vhost_alias_module libexec/apache24/mod_vhost_alias.so

#LoadModule negotiation_module libexec/apache24/mod_negotiation.so

LoadModule dir_module libexec/apache24/mod_dir.so

#LoadModule imagemap_module libexec/apache24/mod_imagemap.so

#LoadModule actions_module libexec/apache24/mod_actions.so

#LoadModule speling_module libexec/apache24/mod_speling.so

#LoadModule userdir_module libexec/apache24/mod_userdir.so

LoadModule alias_module libexec/apache24/mod_alias.so

LoadModule rewrite_module libexec/apache24/mod_rewrite.so



#PHP5

#Comment out for php-fpm http://daemon-notes.com/articles/web/apache/php-fpm

#LoadModule evasive20_module   libexec/apache24/mod_evasive20.so

LoadModule php5_module        libexec/apache24/libphp5.so



# Third party modules

IncludeOptional etc/apache24/modules.d/[0-9][0-9][0-9]_*.conf
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 943
Messages: 2,140

You should manually reinstall every problematic php56-extension each time when you are updating php56.

See PR 205013 - a similar issue for further details.
 
Top