php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41996 PDO_OCI: Problem accessing Oracle ROWID
Submitted: 2007-07-14 14:45 UTC Modified: 2016-03-08 01:41 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tsedeke at feigenblatt dot de Assigned: sixd (profile)
Status: Closed Package: PDO OCI
PHP Version: 5.2.3 OS: Suse Enterprise Server 9
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: tsedeke at feigenblatt dot de
New email:
PHP Version: OS:

 

 [2007-07-14 14:45 UTC] tsedeke at feigenblatt dot de
Description:
------------
Getting error accessing the oracle rowid in a PDO select statement.

The NLS_LANG is set to AMERICAN_AMERICA.AL32UTF8 same as the database.
I also restartet the Apache2.2 with the php as module, to be sure it take the right parameters.

Reproduce code:
---------------
$db_username = "elements";
$db_password = "elements";
$db = "oci:dbname=XE;charset=AL32UTF8";
$conn = new PDO($db,$db_username,$db_password);

$stmt = $conn->prepare("SELECT rowid,t1,t2 FROM test");
$stmt->execute();
  while ($row = $stmt->fetch()) {
    print_r($row);
  }

Expected result:
----------------
Array ( [ROWID] => AAADVUAAEAAAAFMAAA [0] => AAADVUAAEAAAAFMAAA [T1] => test1 [1] => test1 [T2] => First test [2] => First test )

Actual result:
--------------
Warning: PDOStatement::fetch() [function.PDOStatement-fetch]: column 0 data was too large for buffer and was truncated to fit it

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-23 14:51 UTC] jani@php.net
Assigned to the PDO OCI driver maintainer.
 [2007-09-06 14:22 UTC] rubio at jsc dot com dot ar
Try to replace your query with:
"SELECT ROWIDTOCHAR(rowid),t1,t2 FROM test"

Hope this helps...

--
Jonatan
 [2008-07-21 18:05 UTC] pajoye@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2016-03-08 01:41 UTC] sixd@php.net
-Package: PDO related +Package: PDO OCI
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 08:01:28 2024 UTC