4、/opt/php/bin/phpize生成编译配置文件
5、 ./configure --with-php-config=/opt/php/bin/php-config --with-mssql=/opt/local/freetds
6、make&sudo make install
编译完成在/opt/php/lib/php/extensions/no-debug-zts-20121212/目录下生成 mssql.so.
7、修改php.ini,将该模块载入:
extension=mssql.so
8、sudo service apachectl restart
9、测试testmssql.php内容如下
10、结果
172-32-1176::White
213-46-8915::Green
238-95-7766::Carson
267-41-2394::O'Leary
274-80-9391::Straight
341-22-1782::Smith
409-56-7008::Bennet
427-17-2319::Dull
472-27-2349::Gringlesby
486-29-1786::Locksley
527-72-3246::Greene
648-92-1872::Blotchet-Halls
672-71-3249::Yokomoto
712-45-1867::del Castillo
722-51-5454::DeFrance
724-08-9931::Stringer
724-80-9391::MacFeather
756-30-7391::Karsen
807-91-6654::Panteley
846-92-7186::Hunter
893-72-1158::McBadden
899-46-2035::Ringer
998-72-3567::Ringer
213-46-8915::Green
238-95-7766::Carson
267-41-2394::O'Leary
274-80-9391::Straight
341-22-1782::Smith
409-56-7008::Bennet
427-17-2319::Dull
472-27-2349::Gringlesby
486-29-1786::Locksley
527-72-3246::Greene
648-92-1872::Blotchet-Halls
672-71-3249::Yokomoto
712-45-1867::del Castillo
722-51-5454::DeFrance
724-08-9931::Stringer
724-80-9391::MacFeather
756-30-7391::Karsen
807-91-6654::Panteley
846-92-7186::Hunter
893-72-1158::McBadden
899-46-2035::Ringer
998-72-3567::Ringer
装PDO扩展
1、进入PHP源码目录
2、
cd
ext/pdo_dblib/
3、执行/opt/php/bin/phpize
4、
./configure --with-php-config=/opt/php/bin/php-config
--with-pdo-dblib=/opt/local/freetds
5、make
6、sudo make install 这时pdo_oci.so扩展模块已经安装到PHP中了,我的模块路径:/opt/php/lib/php/extensions/no-debug-zts-20131226/
7、 修改/opt/php/lib/php.ini加入extension=pdo_dblib.so;