Linux PHP (OCI) to access the remote Oracle database, the query returns the char

Linux under the PHP program through the Oracle client remote query server oci8 and a local end of information, through the program returns the text results is a question mark.

When using the sqlplus link to a remote database, returns the text information is correct.
Linux Redhat system environment, Oracle instant client 11g, PHP5.4 , apache2.
Database link code $conn = oci_connect('username', 'password', 'database');

In sqlplus, the use of select * from V$NLS_PARAMETERS Where PARAMETER='NLS_LANGUAGE'; the result is KOREAN

In the /etc/init.d/httpd file, has joined the export NLS_LANGUAGE=KOREAN, and restart the Apache, the result is still a question mark.

I would like to ask you how to solve?

Started by Byron at February 03, 2016 - 3:33 AM

The NLS_LANG parameter is composed of the following parts:

NLS_LANG=<Language>_<Territory>.<Clients Characterset>  
Each part of the NLS_LANG is defined as follows:
LANGUAGE: message using -Oracle language
- month and date display
TERRITORY specifies: monetary and digital format
- area and calculate the week and the date of the habit
CHARACTERSET: - control client application using the character set

If Language cannot successfully into Clients Characterset then there will be a question mark

Posted by Roger at February 13, 2016 - 3:54 AM

I would like to ask how to solve it?

Posted by Byron at February 26, 2016 - 4:21 AM

I change into KOREAN.UTF-8 or not.

Posted by Byron at March 08, 2016 - 5:16 AM

The problem is to store your table is Korean content it?
Is not clear whether Oracle has the specified binary mode of writing, such as the MySQL BINARY
If there are, can be read back in binary mode analysis

Posted by Roger at October 31, 2016 - 11:19 PM

Is the Korean.

Posted by Byron at November 11, 2016 - 11:35 PM

Set a few years ago, the same code is no problem. I think I should not program problem, should be configured on the wrong. I have any good suggestions.?

Posted by Byron at November 24, 2016 - 11:58 PM

1, To the remote database administrator solution
2, In binary mode to retrieve their data analysis

Posted by Roger at December 03, 2016 - 11:59 PM

About the "themselves in binary mode to retrieve data analysis" can you tell me how to analysis? What to do?

Posted by Byron at December 16, 2016 - 12:28 AM

The moderator, there may be Oracle instant client 11g need to set the character set encoding?

Posted by Byron at December 20, 2016 - 12:46 AM

If you can retrieve the data in binary mode, then the data is a natural
You use the mb_detect_encoding can detect his character set is what

Posted by Roger at December 25, 2016 - 1:26 AM

The installation is sure to set regular character set, not always do the character set conversion waste
But this is not to say that other character sets cannot be stored content

Posted by Roger at January 02, 2017 - 3:19 AM

Linux Oracle client is the use of RPM package is installed, I haven't done any settings. The default is english. This I know, if you want to support multi byte, need to set out. I think it might be a problem here. Linux Oracle if set, where? I also use Baidu search.

Mb_detect_encoding performed, without any return values, and behind the code is not run. But no PHP error messages.

Posted by Byron at January 04, 2017 - 3:07 AM

Get their own! Korean is so important!!! I can't. = =!)


$conn = oci_connect('user_name', 'pwd', 'test_db', 'AL32UTF8');

I wish I could provide help to people in need.

Posted by Byron at January 05, 2017 - 2:17 AM