自托管盒子,
RHEL 6
PHP 5.3.3
原文链接:https://www.f2er.com/php/139286.htmlRHEL 6
PHP 5.3.3
已安装PDO
freetds安装
pdo_dblib – 到目前为止没有运气安装
我的目标是将PDO与sybase一起使用.尝试从相应的版本PHP源代码安装pdo_dblib.我尝试了各种方法,并在这个主题上寻求了很多帮助,但还没有成功.
方法1
安装freetds
$./configure $make $su root Password: $make install
这很成功
安装pdo_dblib
在/ ext / pdo_dblib文件夹中:
$PHPize $./configure $make $make test
PHP Warning: PHP Startup: Unable to load dynamic library '/home/sybase/Install_items/PHP_533_src/PHP-5.3.3/ext/pdo_dblib/modules/pdo_dblib.so' - /home/sybase/Install_items/PHP_533_src/PHP-5.3.3/ext/pdo_dblib/modules/pdo_dblib.so: undefined symbol: PHP_pdo_register_driver in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library '/home/sybase/Install_items/PHP_533_src/PHP-5.3.3/ext/pdo_dblib/modules/pdo_dblib.so' - /home/sybase/Install_items/PHP_533_src/PHP-5.3.3/ext/pdo_dblib/modules/pdo_dblib.so: undefined symbol: PHP_pdo_register_driver in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/home/sybase/Install_items/PHP_533_src/PHP-5.3.3/ext/pdo_dblib/modules/pdo_dblib.so' - /home/sybase/Install_items/PHP_533_src/PHP-5.3.3/ext/pdo_dblib/modules/pdo_dblib.so: undefined symbol: PHP_pdo_register_driver in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library '/home/sybase/Install_items/PHP_533_src/PHP-5.3.3/ext/pdo_dblib/modules/pdo_dblib.so' - /home/sybase/Install_items/PHP_533_src/PHP-5.3.3/ext/pdo_dblib/modules/pdo_dblib.so: undefined symbol: PHP_pdo_register_driver in Unknown on line 0
这看起来不太好……我研究了这个,发现了一个有趣的黑客,这个here.但是将pdo.ini改为pdo_0.ini不是解决方案,因为我在make测试中仍然遇到相同的错误.
$su $make install
输出:
Installing shared extensions: /usr/lib64/PHP/modules/
这看起来很奇怪……不,它实际上并没有安装(在apache重启后没有出现在PHPinfo上).
方法2
安装freetds
完全按照说明,我添加前缀
$./configure --prefix=/usr/local/freetds $make $su root Password: $make install
这很成功
安装pdo_dblib
在/ ext / pdo_dblib文件夹中:
$PHPize $./configure --with-sybase=/usr/local/freetds
... checking for PDO_DBLIB support via FreeTDS... yes,shared configure: error: Cannot find FreeTDS in known installation directories
方法3
freetds ./configure变体(包括或不包括–prefix …)没有改变这个结果,所以我会跳过它.
安装pdo_dblib pecl扩展
pecl download pdo_dblib tar -xzvf PDO_DBLIB-1.0.tgz
删除了线,
<dep type=”ext” rel=”ge” version=”1.0″>pdo</dep>
保存package.xml文件,并将其移入PDO_DBLIB目录.
mv package.xml ./PDO_DBLIB-1.0
导航到PDO_DBLIB目录,然后从中安装包
目录.
cd ./PDO_DBLIB-1.0 pecl install package.xml
checking for PDO_DBLIB support via FreeTDS... yes,shared configure: error: Cannot find FreeTDS in known installation directories ERROR: `/home/sybase/Install_items/pecl_pdo_dblib/PDO_DBLIB-1.0/configure' Failed