From: daniel at bitarts dot com Operating system: solaris PHP version: 5.0.4 PHP Bug Type: OCI8 related Bug description: Strange behaviour passing long string to TRANSLATE in oracle
Description: ------------ Trying to insert data into an NCLOB field. I can do this by using a TRANSLATE in my sql, and binding variable with the OCIBindByName functions. However, when I pass a certain amount of characters, the update fails with this (incorrect) error: Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-12703: this character set conversion is not supported That amount of characters seems to be 2000. In the code below, if you change this line $data = str_pad($data, 2001, "a"); to $data = str_pad($data, 2000, "a"); It works fine. It's only when you try to insert more than 2000 characters you get this odd behaviour. Thank you. Daniel Reproduce code: --------------- $data = str_pad($data, 2001, "a"); $lob = OCINewDescriptor($conn, OCI_D_LOB); $stmt = OCIParse($conn,"UPDATE TEST SET NCLOB_TEST = TRANSLATE(:NCLOB_TEST USING NCHAR_CS) WHERE ID='1'"); OCIBindByName($stmt, ':NCLOB_TEST', &$lob, -1, OCI_B_CLOB); $lob->WriteTemporary($data); OCIExecute($stmt, OCI_DEFAULT); $lob->close(); $lob->free(); OCICommit($conn); Expected result: ---------------- The NCLOB data field fills with 2001 "a" characters Actual result: -------------- error message: Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-12703: this character set conversion is not supported Nothing added to database. -- Edit bug report at http://bugs.php.net/?id=33564&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33564&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33564&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33564&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33564&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33564&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33564&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33564&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33564&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33564&r=support Expected behavior: http://bugs.php.net/fix.php?id=33564&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33564&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33564&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33564&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33564&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33564&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33564&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33564&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33564&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33564&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33564&r=mysqlcfg