1
votes

I have two php.ini :

  • one regular in /usr/local/php5/lib/php.ini
  • one for my CLI /usr/lib/php.ini

The regular one works fine and load all the extensions I need, whereas the CLI one refuse to load some extensions (such as pdo.so) :

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/pdo.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/pdo.so, 9): image not found in Unknown on line 0

I'd like to change the Configuration File (php.ini) Path of my CLI to make it point on the regular one (and then solve the extension loading problem) but I can't find how to make it on an UNIX system.

1

1 Answers

0
votes

Make the second one a symbolic link to the first. This is done using:

ln -s [TARGET_FILE] [SYMLINK_NAME]

If your non-CLI php.ini is /etc/php.cgi.ini and your CLI php.ini is /etc/php.cli.ini, you'd be doing ln -s /etc/php.cgi.ini /etc/php.cli.ini