I run a PHP script and get this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/ixed.5.2.lin' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ixed.5.2.lin: cannot open shared object file: No such file or directory in Unknown on line 0
What does that mean?
If you just want to make the error disappear, and you don't need the extension, then by all means comment the line out in
php.ini
. But if you actually want to fix the problem here is some additional info.There are various causes for this based on the exact module, but there are also some general guidelines.
phpinfo()
and look forextension_dir
under theCore
section. This is where your modules should be located.Installation on *nix (PEAR)
Installation of extensions on Windows
phpStom with XAMPP
TL;DR Except from verifying that the files exist, you might need to add the drive letter to some records in your php.ini file
I suddenly started having a problem using phpStorm 7 for debugging php with xampp and xdebug. When trying to set intellij interperter to be xampps php I got a lot of the warnings like the one in the question, for example:
For some reason I had to add my drive letter to the records of extension_dir and browscap in the php.ini file:
to
Note that you can also get this error if your PHP library doesn't have the "other" directory opening permission. In my particular case, I noticed this when using
php -l
to syntax check a script in my text editor. This meant that since my account was called "volomike", that account didn't have permission to run the libraries that thephp
command relied upon.For instance, on Ubuntu 14.04, I had PHP5 installed automatically into the path
/usr/lib/php5/20121212+lfs
. However, because I was working in C++ in building some shared objects, I messed around with the directory permissions and screwed things up such that non-root accounts did not have the directory execute (directory open) permissions to view/usr/lib/php5/20121212+lfs
. So, I typed the following command to rectify that problem:sudo chmod o+x /usr/lib/php5/20121212+lfs
.Now when I do
php -l example.php
as a non-root user, it never gives me this "Unabled to load dynamic library" problem anymore.Loading .dll in Linux
I've encountered this warning message while I was trying to install a php-extension via the php.ini file;
until I figured out that you cannot load .dll extensions in Linux,
but you have to comment the extensions that you want to import
;extension= ... .dll
and install it correctly viasudo apt-get install php-...
note:
...
is the extension name you want to enable.php -r "echo php_ini_loaded_file();"
Will show in CLI current ini loaded file, search there for Your extension, path to it is incorrect.
I encountered a similar error. The mistake I made was to use the "controller" name as "Pages" instead of "pages" in my url.