From: blair dot chesnut at gmail dot com Operating system: Unix/Solaris 10 PHP version: 5.4.9 Package: PDO related Bug Type: Bug Bug description:ORA-01461 when inserting/updating more that 1333 characters
Description: ------------ Using PDO/OCI via Yii framework. Inserts/updates to varchar2(4000) column fail with error ORA-01461 when value exceeds 1332 characters. Line 300 of source php-5.4.9/ext/pdo_oci/oci_statement.c: value_sz = 1332; /* maximum size before value is interpreted as a LONG value */ Why??? I changed to "value_sz = 4000", recompiled, and inserts/updates work fine. I'm not using CLOBs, only varchar2() columns. Test script: --------------- $dbh = new PDO($dsn, $dbuser, $dbpass); $sth = $dbh->prepare('insert into some_table (some_varchar4000_column) values (:p1)'); $big_value = str_repeat('ABCDEFGHIJ', 300); $sth->bindValue(':p1', $big_value, PDO::PARAM_STR); $sth->execute(); print_r($sth->errorInfo()); Expected result: ---------------- Array ( [0] => 00000 [1] => [2] => ) Actual result: -------------- Array ( [0] => HY000 [1] => 1461 [2] => OCIStmtExecute: ORA-01461: can bind a LONG value only for insert into a LONG column (/usr/local/src/php-5.4.5/ext/pdo_oci/oci_statement.c:146) ) -- Edit bug report at https://bugs.php.net/bug.php?id=63809&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63809&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63809&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63809&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63809&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63809&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63809&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63809&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63809&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63809&r=support Expected behavior: https://bugs.php.net/fix.php?id=63809&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63809&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63809&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63809&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63809&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63809&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63809&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63809&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63809&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63809&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63809&r=mysqlcfg