« When PHP and Oracle assume the worst about each other | Main | php|works '07 »

PDO_OCI does not support CLOBs

LOB support was added to PDO_OCI in PHP 5.1. This is really cool, however, it appears that the LOB support really means BLOB support. I'm trying to use PDO::PARAM_LOB constant to pass in CLOBs (not BLOBs) and I get the following Oracle error:

ORA-00932: inconsistent datatypes: expected BLOB got CLOB

After much investigation and self-doubt (e.g. "what if we're using streams incorrectly?"), we found out that PDO_OCI does not currently support CLOBs (BLOBs only!).

Here's some documentation on this bug: Cannot insert CLOB into table.

Chris Jones just let us know that a fix to this bug and a related Seg fault after NLS environment initialization error will be merged into the next PDO_OCI patch shortly.

(Comments are open if you have any updates about this bug.)

Comments (1)

Any feedback on the patch in the bug would be appreciated.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

Maggie Nelson is a software developer in New York City. She likes open source (especially PHP) but is willing to break her "free is good" philosophy for Oracle.


Subscribe to my feed

Copyright 2008 Maggie Nelson

New York PHP Community Member

Powered by
Movable Type 3.34