今天编译了几个扩展
在php.ini使用extension=pdo_odbc.so 添加后,重启PHP报错:
[root@dev modules]# /etc/init.d/php54-php-fpm restart Stopping php-fpm: [ OK ] Starting php-fpm: [03-Aug-2016 15:35:43] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/opt/remi/php54/root/usr/lib64/php/modules/pdo_dblib.so' - /opt/remi/php54/root/usr/lib64/php/modules/pdo_dblib.so: undefined symbol: php_pdo_register_driver in Unknown on line 0 [03-Aug-2016 15:35:43] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/opt/remi/php54/root/usr/lib64/php/modules/pdo_odbc.so' - /opt/remi/php54/root/usr/lib64/php/modules/pdo_odbc.so: undefined symbol: php_pdo_register_driver in Unknown on line 0 [ OK ]
仔细检查后发现,这些扩展是依赖pdo.so的,所以必须在引入pdo.so之后才能引入
extension=pdo_dblib.so extension=pdo_odbc.so
于是找到php.d/pdo.ini将这两个模块的引入放到pdo.so的后面即可