The Curious Website Designer

PHP Startup: Unable to load dynamic library

Posted by The Curious Website Designer | Posted on Fri 9 Feb 2018

PHP Startup: Unable to load dynamic library

My Apache log was filling up with this error which clearly needed fixing, but was also making it very difficult to find the cause of other problems because they were lost in a mass of PHP Startup entries.

Heres how I eventually fixed it.

The full entry actually consisted of two (very long) lines:

  1. [Fri Feb 09 03:22:17.832535 2018] [:error] [pid 14170:tid 140256384907008] [client 40.77.167.95:15043] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_mbstring.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0
  2. [Fri Feb 09 03:22:17.832859 2018] [:error] [pid 14170:tid 140256384907008] [client 40.77.167.95:15043] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0

 

'Googling' the error suggested that the problem was that there was an entry in php.ini 'extension=. . .' or  'zend_extension=. . .'.

Although I did find an entry

  1. ;extension=php_mbstring.dll

 

followed by 

  1. ;extension=php_exif.dll      ; Must be after mbstring as it depends on it

 

the semi-colon at the beginning of the line meant that the instruction was commented out and was not being processed.

After much more researching, I found another possible solution - the mbstring extension was not installed, so install it !

So using PuTTY (see here) I entered:

# yum -y install php-mbstring

 

(Note that I changed the underscore from the filename in the error log to a hyphen).

I also tried:

# yum -y install php-exif

 

but that was already installed. (The php_exif error message was because php_exif is dependent on php_mbstring which wasn't installed leading to the php_exif problem).

Next restart the apache server with:

# systemctl restart httpd.service

 

And that fixed the problem for me.

 

 

Related Articles

Troubleshooting Problems With Centos Web Panel

Troubleshooting Problems With Centos Web Panel

Posted by: The Curious Website Designer
on Mon 24 Apr 2017

The range and diversity of potential problems and errors with Centos (or any other) Web Panel is so great, that this article could never hope to come close to giving you all of the answers you may be looking for. In most cases, when something goes wrong - it just goes wrong! The clues, though, can usually be found in the error logs. But where on earth are they ? The purpose of this article is to not only help you find where they are, but also to provide you with a way of keeping them close at hand.

Tags: apache error, problem solving