#45021 [Fbk-Opn]: PDO_OCI only fetches 512 bytes from a LONG column
ID: 45021 User updated by: steil at zweitwerk dot com Reported By: steil at zweitwerk dot com -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Linux PHP Version: 5.2.6 New Comment: Testing on Linux, I can find no improvement. The error message and result are as before Previous Comments: [2009-04-25 15:07:27] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-05-19 16:30:10] steil at zweitwerk dot com Sorry, I thought I could straighten the example by omitting records with small content, but the long column does not support the length property whence the statement should just read $res = $db-query(SELECT longcolumn FROM table); However, the bug remains. [2008-05-16 14:43:10] steil at zweitwerk dot com Description: If you fetch from an Oracle column of datatype long, and the actual data is more than 512 byte long it will be truncated and the following warning will be issued Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was truncated to fit it in Reproduce code: --- $db = new PDO('oci:dbname=...', 'user', 'pwd'); $res = $db-query(SELECT longcolumn FROM table WHERE length(longcolumn) 512); $row = $res-fetch(); print_r('data length: '. strlen($row[0])); results in $row[0] being truncated and the output data length: 512 Expected result: $row[0] should contain all of the data and the output data length: x (where x 512) -- Edit this bug report at http://bugs.php.net/?id=45021edit=1
#45021 [Opn]: PDO_OCI only fetches 512 bytes from a LONG column
ID: 45021 User updated by: steil at zweitwerk dot com Reported By: steil at zweitwerk dot com Status: Open Bug Type: PDO related Operating System: Linux PHP Version: 5.2.6 New Comment: Sorry, I thought I could straighten the example by omitting records with small content, but the long column does not support the length property whence the statement should just read $res = $db-query(SELECT longcolumn FROM table); However, the bug remains. Previous Comments: [2008-05-16 14:43:10] steil at zweitwerk dot com Description: If you fetch from an Oracle column of datatype long, and the actual data is more than 512 byte long it will be truncated and the following warning will be issued Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was truncated to fit it in Reproduce code: --- $db = new PDO('oci:dbname=...', 'user', 'pwd'); $res = $db-query(SELECT longcolumn FROM table WHERE length(longcolumn) 512); $row = $res-fetch(); print_r('data length: '. strlen($row[0])); results in $row[0] being truncated and the output data length: 512 Expected result: $row[0] should contain all of the data and the output data length: x (where x 512) -- Edit this bug report at http://bugs.php.net/?id=45021edit=1
#45021 [NEW]: PDO_OCI only fetches 512 bytes from a LONG column
From: steil at zweitwerk dot com Operating system: Linux PHP version: 5.2.6 PHP Bug Type: PDO related Bug description: PDO_OCI only fetches 512 bytes from a LONG column Description: If you fetch from an Oracle column of datatype long, and the actual data is more than 512 byte long it will be truncated and the following warning will be issued Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was truncated to fit it in Reproduce code: --- $db = new PDO('oci:dbname=...', 'user', 'pwd'); $res = $db-query(SELECT longcolumn FROM table WHERE length(longcolumn) 512); $row = $res-fetch(); print_r('data length: '. strlen($row[0])); results in $row[0] being truncated and the output data length: 512 Expected result: $row[0] should contain all of the data and the output data length: x (where x 512) -- Edit bug report at http://bugs.php.net/?id=45021edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45021r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45021r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45021r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45021r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45021r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45021r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45021r=needscript Try newer version:http://bugs.php.net/fix.php?id=45021r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45021r=support Expected behavior:http://bugs.php.net/fix.php?id=45021r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45021r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45021r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45021r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45021r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45021r=dst IIS Stability:http://bugs.php.net/fix.php?id=45021r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45021r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45021r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45021r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45021r=mysqlcfg
#22659 [NEW]: set_error_handler(foo) doesn't care if foo exists
From: steil at zweitwerk dot com Operating system: Linux PHP version: 4.2.3 PHP Bug Type: Unknown/Other Function Bug description: set_error_handler(foo) doesn't care if foo exists What I mean is the following ?php // first call returns nothing $ret1 = set_error_handler(unknown_function); var_dump($ret1); // second call returns unknown_function $ret2 = set_error_handler(another_unknown_function); var_dump($ret2); ? The documentation says set_error_handler() would return FALSE if an error occurs. Therefore, both of the above calls should return FALSE since setting the error handler to an unknown function is certainly an error. As a consequence I am not able to check if the call to set_error_handler() has been successful. -- Edit bug report at http://bugs.php.net/?id=22659edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22659r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22659r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22659r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22659r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22659r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=22659r=support Expected behavior: http://bugs.php.net/fix.php?id=22659r=notwrong Not enough info:http://bugs.php.net/fix.php?id=22659r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=22659r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22659r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22659r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22659r=dst IIS Stability: http://bugs.php.net/fix.php?id=22659r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=22659r=gnused