php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18449 OCI8 NLS_LANG set, but wrong result ('???')
Submitted: 2002-07-20 17:32 UTC Modified: 2002-11-10 09:48 UTC
From: dehaili at netease dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.2.1 OS: Redhat Linux 7.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dehaili at netease dot com
New email:
PHP Version: OS:

 

 [2002-07-20 17:32 UTC] dehaili at netease dot com
i installed redhat linux 7.3, and then oracle 8.1.7.
i created a database whose character set is
"AMERICAN_AMERICA.ZHS16GBK". within the database, i:

create table xxx ( a varchar2 ( 256 ) );


as my php4.1.2 that shiped with RH7.3 had no --with-oci8
option set, oci funcstions didn't work. so i downloaded
php4.2.1 and modified its makerpm file to add --with-oci8
and --with-oracle options and run

sh makerpm

and then installed the rpm. i also add

SetEnv ORACLE_HOME ...
...
SetEnv NLS_LANG "AMERICAN_AMERICA.ZHS16GBK"
...

to the file: /etc/httpd/conf/httpd.conf, this time oci
functions works.


BUT, the PROBLEM is: when my sql statment is

select a from xxx;

the result contain many '???' instead of my chinese words


I set NLS_LANG as root and the apachectl stop, apachectl
start, this time, ocilogon failed with ora-12705 "charset
no supported"

can you help me? thx a lot

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-20 17:38 UTC] dehaili at netease dot com
sqlplus works

nls_lang and database charset change to 'zhs16cgb231280'
cannot work too
 [2002-07-21 04:17 UTC] thies@php.net
don't use SetEnv in httpd.conf -> please set the oracle 
env-vars in you apache start (shell-)script. 
 
 
 [2002-07-23 05:23 UTC] dehaili at netease dot com
can not work too, or, worse

i did what you tell me, but it failed connect to oracle
when nls_lang not set charset to
'american_america.us7asii'. this time ocilogon return
ora-12705 'unsupported character set'!
 [2002-07-23 05:25 UTC] dehaili at netease dot com
can not work too, or, worse

i did what you tell me, but it failed connect to oracle
when nls_lang not set charset to
'american_america.us7asii'. this time ocilogon return
ora-12705 'unsupported character set'!
 [2002-08-06 23:58 UTC] dehaili at netease dot com
ok now

sorry i used wrong --php-config-file-path so the php.ini
is missing. after corrected the php.ini problem, the
nls_lang problem was overcome.

just as you said, only NLS_LANG set in apachectl script
works. it is not perfect solution for i can not use
multi-language php-oracle couples in one apache+php server.

thanks for your help.
 [2002-11-10 00:27 UTC] maxim@php.net
It's been here for a while and looks to me that the whole thing was kinda resolved. Classifying as Suspended.

Maxim Maletsky
 [2002-11-10 09:48 UTC] sniper@php.net
not a bug 

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 07:01:32 2024 UTC