Coder Perfect

PHP Startup Error: Unable to Load Dynamic Library PHP Warning: PHP Startup Error: Unable to Load Dyna

Problem

When I start a PHP script, I get the following error:

What exactly does that imply?

Asked by Popolo

Solution #1

It means that one of your PHP configuration files (php.ini or something similar) has an extension=… or zend extension=… line that is attempting to load that extension: ixed.5.2.lin

Unfortunately, the file or location does not exist, or the permissions have been set incorrectly.

Answered by Pascal MARTIN

Solution #2

If you’re using Linux, type this in shell to find all loaded configuration files:

php -r "print phpinfo();" | grep ".ini"

UPDATE: As pointed out in the comments, this is even more accurate:

php -i | grep ini

Answered by nefski

Solution #3

phpStom with XAMPP

TL;DR You may need to add the drive letter to various records in your php.ini file in addition to ensuring that the files exist.

I started having problems using phpStorm 7 to debug php with xampp and xdebug all of a sudden. I got a bunch of warnings like the one in the question while trying to set intellij interperter to be xampps php:

I had to add my drive letter to the extension dir and browscap records in the php.ini file for some reason:

extension_dir = "\xampp\php\ext"
browscap = "\xampp\php\extras\browscap.ini"

to

extension_dir = "e:\xampp\php\ext"
browscap = "e:\xampp\php\extras\browscap.ini"

Answered by Technotronic

Solution #4

If you just want to get rid of the problem and don’t require the extension, leave the line in php.ini commented out. However, if you really want to solve the problem, here’s some more information.

There are a variety of reasons for this, depending on the module, however there are some common standards.

Installation of extensions on Windows (PEAR) Installation of extensions on *nix (PEAR)

Answered by EternalHour

Solution #5

“echo php ini loaded file();” php -r

Will display the current ini loaded file in CLI; look for Your extension there; the path to it is incorrect.

Answered by Błażej Krzakala

Post is based on https://stackoverflow.com/questions/5282264/php-warning-php-startup-unable-to-load-dynamic-library