无为清净楼资源网 Design By www.qnjia.com

在/etc/profile.d/简历oracle.sh

内容如下在NLS_LANG设置编码

ORACLE_HOME=/usr/lib/oracle/12.1/client64
C_INCLUDE_PATH=/usr/include/oracle/12.1/client64
LD_LIBRARY_PATH=$ORACLE_HOME/lib
#remember this is the client NLS_LANG not the server one
NLS_LANG=FRENCH_FRANCE.UTF8 
export ORACLE_HOME LD_LIBRARY_PATH NLS_LANG

然后修改 /etc/init.d/php-fpm

在头部增加

. /etc/profile.d/oracle.sh

. /etc/init.d/functions
. /etc/profile.d/oracle.sh
# Check that networking is up.
. /etc/sysconfig/network
# Additional environment file
if [ -f /etc/sysconfig/php-fpm ]; then
. /etc/sysconfig/php-fpm
fi
if [ "$NETWORKING" = "no" ]
then
exit 0
fi
RETVAL=0
prog="php-fpm"
pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid}
lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}

然后重新启动php即可

以上这篇php pdo oracle中文乱码的快速解决方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

标签:
php,pdo,oracle,乱码

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com