Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

PHP is always trying to load extensions from a relative path. For example:



Warning: PHP Startup: Unable to load dynamic library './/' - .// cannot open shared object file: No such file or directory in Unknown on line 0

Any ideas on how to fix this?

share|improve this question
up vote 1 down vote accepted

Place your extension in the correct directory.

PHP looks for extensions in the directory specified in the extension_dir directive in php.ini. The extension directive simply specifies one or more extensions that PHP will attempt to load, relative to the extension_dir path.

share|improve this answer
Thanks! I actually had extension_dir=./ in my php.ini. – Zulakis Jul 27 '12 at 19:23
One thing i want to add: The default of extension_dir is /path/to/your/php/. If you now use extension=/ it will actually look for /path/to/your/php/ To use absolute paths you need to use extension_dir=/ – Zulakis Jul 27 '12 at 19:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.