- 安装UnixODBC
yum install unixODBC unixODBC-devel
2.进入之前下载的对应版本PHP
cd php-5.4.45/php-5.4.45/ext/pdo_odbc/ /opt/remi/php54/root/usr/bin/phpize ./configure --with-php-config=/opt/remi/php54/root/usr/bin/php-config --with-pdo-odbc=unixODBC
报错
configure: error: ODBC header file '/usr/local/incl/sqlext.h' not found!
解决
[root@dev odbc]# find / -name "sqlext.h" /usr/include/sqlext.h [root@dev odbc]# mkdir /usr/local/incl/ [root@dev odbc]# cp /usr/include/sqlext.h /usr/local/incl/sqlext.h
3.安装
make make install