|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42563 OCI Oracle Connect error: OCINlsCharSetNameToId
Submitted: 2007-09-05 12:38 UTC Modified: 2016-03-08 01:34 UTC
From: t_wiedmann at t-online dot de Assigned:
Status: Not a bug Package: PDO OCI
PHP Version: 5.2.4 OS: Win XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
11 + 3 = ?
Subscribe to this entry?

 [2007-09-05 12:38 UTC] t_wiedmann at t-online dot de

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


Reproduce code:

 * php.ini  (v5.2.4)
 * ; Windows Extensions
 * extension=php_pdo.dll
 * extension=php_pdo_oci.dll

 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();


Expected result:
Connect ok

Actual result:
Connect failed: SQLSTATE[HY000]: OCINlsCharSetNameToId: unknown character set name (ext\pdo_oci\oci_driver.c:488)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-06 08:01 UTC] t_wiedmann at t-online dot de
In the meantime, I have moved to PHP v5.2.3. This Version work well. 

 [2007-09-08 22:23 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

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:
 [2016-03-08 01:34 UTC]
-Package: PDO related +Package: PDO OCI
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 04:01:31 2024 UTC