说明:Sybase IQ安装目录:/sybiq/asiq153/
( 本人是在Sybase IQ 库上做的php开发,网上资料比较少,这是本人花了将近一个星期才解决的问题 ZCTT--ChenHuiCan)
------------编译PHP,支持Sybase IQ-----------
PHP版本:php-5.5.3.tar.gz
./configure
--with-mcrypt
--with-libxml-dir=/usr/local/libxml2
--with-apxs2=/usr/local/apache2/bin/apxs //我这里apache是编译安装的,如果是RPM方式安装,可能没有apxs这个文件。
--with-mysql=no //最好加上,不然编译时会报错 可能与Sybase IQ的函数库有冲突!
--with-config-file-path=/usr/local/php5
--with-gd=/usr/local/gd
--with-sybase-ct=/sybiq/asiq153 //支持Sybase 的选项
-------------------------------------------------------------------------------------------------------
如果不懂,可以查看configure选项,如何配置支持sybase:
[root@JK02 php-5.5.3]# ./configure --help |grep sybase //查看配置选项,对于源码安装时必须具备的技能。
--with-sybase-ct=DIR Include Sybase-CT support. DIR is the Sybase home
directory /home/sybase
-------------------------------------------------------------------------------------------------------
--------------编译报错:--------
configure: error: ctpublic.h missing!
提示找不到 ctpublic.h文件, 这个文件是ct -library 库的中的东西 ,开始以为是没有装好 Sybase IQ 客户端。最后发现时路径的问题。
进入Sybase iQ安装目录:
[root@JK02 asiq153]# find -name ctpublic.h
./OCS-15_0/include/ctpublic.h
可以看到ctpublic.h文件 在OCS-15.3中。
再次编译设置如下:
./configure
--with-mcrypt
--with-libxml-dir=/usr/local/libxml2
--with-apxs2=/usr/local/apache2/bin/apxs
--with-mysql=no
--with-config-file-path=/usr/local/php5
--with-gd=/usr/local/gd
--with-sybase-ct=/sybiq/asiq153/OCS-15_0
再次编译,成功(^_^)。