php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39376 Unable to load Chinese characters from oci8
Submitted: 2006-11-04 12:09 UTC Modified: 2006-11-07 12:06 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: automap at gmail dot com Assigned:
Status: Closed Package: OCI8 related
PHP Version: 5.2.0 OS: WindowsXP
Private report: No CVE-ID: None
 [2006-11-04 12:09 UTC] automap at gmail dot com
Description:
------------
after I upgraded the Apache from 2.0.59 to 2.2.3
then I downloaded php5.2.0 to replace the original php5.0.5
but when I start apache, error log shows as below:
Unable to load dynamic library 'C:/php52/ext/php_oci8.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xb3\xcc\xd0\xf2\xa1\xa3\r\n in Unknown on line 0

Reproduce code:
---------------
the error log shows that the php_oci8.dll is not loaded when Apache is started
my oracle client version is 9.2.0.1
it's good to load oci8 dll before I upgrade
because I upgrded php and apache , so I'm not sure whether it's a problem of php, either inside apache

Expected result:
----------------
I need to load oci8 into the apache ,so I can connect my oracle db

Actual result:
--------------
now the oci8 dll can't be loaded.is it the problem of php5.2.0?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-04 18:42 UTC] crescentfreshpot at yahoo dot com
You need oracle instant client installed. See bug #39360
 [2006-11-05 15:28 UTC] jhtpeter at gmail dot com
I get the same problem.
My environment is: Windows 2003, Oracle9i Server, PHP 5.2
I installed oracle instant client and set these env variables:
PATH=C:\instantclient;...
TNS_ADMIN=C:\instantclient
LD_LIBRARY_PATH=C:\instantclient

and also edit registry as BUG#39096 instructions:
rename NLS_LANG TO xLNS_LANG

At last, apache logs report:
unable to load php_oci8.dll

It seem to if Oracle Server installed, PHP cannot use instant client as the same machine?
 [2006-11-06 08:09 UTC] automap at gmail dot com
Thanks to crescentfreshpot@yahoo.com 
the problem "Unable to load dynamic library " was resolved.
but a new one occured:
when I fetch data from remote oracle db, I get the Chinese data in '?', while the Eglish and numeric characterset is still ok.
I have thought that it's due to the parameter 'xLNS_LANG',but I have changed many possible configure to the xLNS_LANG or NLS_LANG , NO effect.
Why?
 [2006-11-06 13:43 UTC] automap at gmail dot com
problem resolved!
oci_connect() function should take the fourth parameter, which indicates the characterset, for example:
 oci_connect( $username, $password ,$db, 'ZHS16GBK');
Thanks to all
 [2006-11-07 12:06 UTC] automap at gmail dot com
for other users' convenient, there are some important thing should be attention as below:
1.the oracle instant client environmental parameter('path' in windows) should be set before other existed oracle path(if you want to use the former oracle path later)
2.mabye you should download the msvcr71.dll and copy it to the directory where oralce instant client files lie
3.you should restart your system after setting the path parameters
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC