php+oci8 以及编码问题
1.安装php+oci8
#cd /opt/distfiles/php-5.2.6
configure参数:
./configure \
--prefix=/opt/modules/phpcgi \
--enable-fastcgi \
--enable-discard-path \
--enable-force-cgi-redirect \
--enable-bcmath \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-sockets \
--enable-mbstring \
--enable-sqlite-utf8 \
--enable-safe-mode \
--enable-gd-native-ttf \
--enable-ftp \
--disable-debug \
--with-mcrypt \
--with-openssl \
--with-mysql \
--with-pdo-mysql \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--with-jpeg-dir \
--with-gd \
--with-ttf \
--with-iconv-dir \
--with-zlib-dir \
--with-openssl \
--enable-soap \
--with-mysql \
--with-pdo-mysql \
--with-pdo-oci=instantclient,/opt/modules/instantclient_10_2,10.2.0.4 \
--with-oci8=instantclient,/opt/modules/instantclient_10_2 \
--enable-sigchild \
需要支持的包(以64位X86系统为例)
#cd /opt/modules/
#wget
#wget
#unzip -x sdk-10.2.0.4.0-linux-x86_64.zip
# unzip -x basic-10.2.0.4.0-linux-x86_64.zip
#cd /opt/modules/instantclient_10_2
#ln -s libclntsh.so.10.1 libclntsh.so
#make
#make install
配置完成后如果连接获取到的数据编码不对。需要在
系统环境变量或者apache/lighttpd的启动脚本中添加环境变量
export NLS_LANG="american_america.ZHS16GBK"
阅读(1388) | 评论(0) | 转发(0) |