环境是centos6 php5.2
yum -y install unixODBC-*
cd /data0/software/php-5.2.17/ext/pdo_odbc
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-pdo-odbc=unixODBC,/usr
make
make install
vi /usr/local/webserver/php/etc/php.ini
extension = "pdo_odbc.so"
/usr/local/webserver/php/sbin/php-fpm restart
查看安装成功没?查找odbc
<?php phpinfo(); ?>
转载于:https://blog.51cto.com/ning235/1869041