#42563 [Opn->Bgs]: OCI Oracle Connect error: OCINlsCharSetNameToId
| From: | sixd@php.net | Date: | Sat, 08 Sep 2007 22:23:21 +0000 |
| Subject: | #42563 [Opn->Bgs]: OCI Oracle Connect error: OCINlsCharSetNameToId | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-117315@lists.php.net to get a copy of this message | ||
ID: 42563
Updated by: sixd@php.net
Reported By: t_wiedmann at t-online dot de
-Status: Open
+Status: Bogus
Bug Type: PDO related
Operating System: Win XP
PHP Version: 5.2.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
----------
Use an Oracle character set name. The value you are passing is ignored
prior to PHP 5.2.4 because it is invalid.
A list of character sets is in the Oracle documentation:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/applocaledata.htm#sthref1958
----------
Previous Comments:
------------------------------------------------------------------------
[2007-09-06 08:01:50] t_wiedmann at t-online dot de
In the meantime, I have moved to PHP v5.2.3. This Version work well.
Regards
Thomas
------------------------------------------------------------------------
[2007-09-05 12:38:36] t_wiedmann at t-online dot de
Description:
------------
Hi,
if I try to connect to Oracle DB I get this error since PHP 5.2.4, with
5.2.0 or 5.2.1 work well
Regards,
Thomas
Reproduce code:
---------------
<?php
/**
* php.ini (v5.2.4)
*
* ; Windows Extensions
* extension=php_pdo.dll
* extension=php_pdo_oci.dll
*
*/
define('DBUSER','user');
define('DBPASS','password');
define('DBNAME','database');
try {
// Connect to Oracle Windows v9.2 or v10
$dbh = new
PDO('oci:dbname='.DBNAME.';charset=ISO-8859-1',DBUSER,DBPASS);
echo 'Connect ok';
$dbh = null;
} catch (PDOException $e) {
// Connect failed: SQLSTATE[HY000]: OCINlsCharSetNameToId: unknown
character set name (ext\pdo_oci\oci_driver.c:488)
echo 'Connect failed: ';
echo $e->getMessage();
die();
}
?>
Expected result:
----------------
Connect ok
Actual result:
--------------
Connect failed: SQLSTATE[HY000]: OCINlsCharSetNameToId: unknown
character set name (ext\pdo_oci\oci_driver.c:488)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42563&edit=1