|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #68326 Data from NCLOB column is not returned from PDO_OCI Statement
Submitted: 2014-10-29 19:23 UTC Modified: 2014-10-30 10:41 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: contact at greg dot md Assigned:
Status: Open Package: PDO OCI
PHP Version: 5.4.34 OS: Mac OS X
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.
Block user comment
Status: Assign to:
Bug Type:
From: contact at greg dot md
New email:
PHP Version: OS:


 [2014-10-29 19:23 UTC] contact at greg dot md
I have compiled last sources from

Data from NCLOB type is not returned in the row. From CLOB or NVARCHAR2 is all ok.

Test script:
$options = array(

$dbh = new PDO('dns', 'username', 'password', $options);

$stmt = $dbh->query('select NCLOB_COLUMN from TABLE');

$row = $stmt->fetch(PDO::FETCH_ASSOC);



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-30 10:41 UTC]
-Type: Bug +Type: Feature/Change Request
 [2014-10-30 10:41 UTC]
This is "expected" since support for NCLOB or NVARCHAR has not been implemented in PDO_OCI (or to the OCI8 extension).

From :

"Oracle recommends using SQL CHAR, VARCHAR2, and CLOB data types in
AL32UTF8 database to store Unicode character data. Use of SQL NCHAR,
NVARCHAR2, and NCLOB should be considered only if you must use a
database whose database character set is not AL32UTF8."
 [2014-10-30 11:22 UTC] contact at greg dot md

I have tested via oci, and it is working fine with NCLOB data type. That's why I thought it is a bug.

$dbh = oci_connect($username, $passwd, $tsa, 'UTF8');
$stmt = oci_parse($dbh, 'select * from "Feedbacks"');
$row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_LOBS);
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 09 23:03:35 2022 UTC