Home > Backend Development > PHP Problem > What to do if php pdo oracle is garbled?

What to do if php pdo oracle is garbled?

藏色散人
Release: 2023-03-09 08:00:01
Original
2140 people have browsed it

Solution to php pdo oracle garbled code: First set the encoding in "NLS_LANG"; then modify "/etc/init.d/php-fpm"; then add "/etc/profile.d/" to the header oracle.sh"; finally restart php.

What to do if php pdo oracle is garbled?

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

php pdo oracle Chinese garbled code

In /etc/profile.d/resume oracle.sh

The content is as follows. Set the encoding in NLS_LANG

1 ORACLE_HOME=/usr/lib/oracle/12.1/client64
2 C_INCLUDE_PATH=/usr/include/oracle/12.1/client64
3 LD_LIBRARY_PATH=$ORACLE_HOME/lib
4 #remember this is the client NLS_LANG not the server one
5 NLS_LANG=FRENCH_FRANCE.UTF8 
6 export ORACLE_HOME LD_LIBRARY_PATH NLS_LANG
Copy after login

Then Modify /etc/init.d/php-fpm

Add

. /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}
Copy after login

in the header and then restart php

[Recommended learning: PHP video tutorial

The above is the detailed content of What to do if php pdo oracle is garbled?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template