免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2107 | 回复: 0
打印 上一主题 下一主题

php+oci8 以及编码问题 [复制链接]

论坛徽章:
4
ChinaUnix专家徽章
日期:2015-07-27 10:05:26IT运维版块每日发帖之星
日期:2015-09-01 06:20:00IT运维版块每日发帖之星
日期:2016-07-29 06:20:00PHP
日期:2016-10-25 16:08:01
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-18 14:17 |只看该作者 |倒序浏览
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
http://download.oracle.com/otn/linux/instantclient/10204/sdk-10.2.0.4.0-linux-x86_64.zip
#wget
http://download.oracle.com/otn/linux/instantclient/10204/basic-10.2.0.4.0-linux-x86_64.zip
#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"

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/88527/showart_1867237.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP