Can we have 2 'extension_dir' in php.ini?

Posted by Nyxynyx on Server Fault See other posts from Server Fault or by Nyxynyx
Published on 2012-09-13T03:34:13Z Indexed on 2012/09/13 3:41 UTC
Read the original article Hit count: 1154

Filed under:
|
|
|
|

When I installed pdo-pgsql, the extension was installed into /usr/lib/php/extensions/no-debug-non-zts-20090626/ and thus not automatically loaded. In php.ini, I have extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626" already defined.

Snippet of php.ini

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
zend_extension = "/usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so"
extension = "eaccelerator.so"
extension = "pdo.so"
extension = "pdo_pgsql.so"
extension = "pdo_sqlite.so"
extension = "sqlite.so"
extension = "pdo_mysql.so"

Modified to work

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20090626"
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
zend_extension = "/usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so"
extension = "eaccelerator.so"
extension = "pdo.so"
extension = "pdo_pgsql.so"
extension = "pdo_sqlite.so"
extension = "sqlite.so"
extension = "pdo_mysql.so"
  1. Why did PECL install pdo-pgsql into the 2nd extension directory and not the first?

  2. Is it recommended to have 2 extension_dir as shown in the 2nd code snippet above?

© Server Fault or respective owner

Related posts about apache2

Related posts about php