Edit report at http://bugs.php.net/bug.php?id=34211&edit=1
ID: 34211 Comment by: kurtb149 at yahoo dot com Reported by: kurtb149 at yahoo dot com Summary: PDO_OCI: Allow for data type "TIMESTAMP(0) WITH LOCAL TIME ZONE" Status: Open Type: Feature/Change Request Package: Feature/Change Request Operating System: Linux PHP Version: 6CVS-2005-08-22 (CVS) Block user comment: N Private report: N New Comment: This is still broken in php version 5.3.5; The fix is a really simple patch. The oci8 even has the fix, but the pdo_oci still does not. Previous Comments: ------------------------------------------------------------------------ [2006-06-09 15:24:55] kurtb149 at yahoo dot com 1. Create a table in Oracle that used the "timestamp(0) with local time zone" type: SQL> create table ltz_test(aa timestamp(0) with local time zone not null) ; 2. Insert a row into ltz_test: SQL> insert into ltz_test values(current_timestamp); 3. Using PDO, read the table: <?php $dbh = new PDO('oci:', 'username', 'hello'); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); $sth = $dbh->prepare('select aa from ltz_test'); $sth->execute(); $r = $sth->fetch(); print $r[0] . "\n"; ?> The following error is produced: Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was truncated to fit it in ltz_test.php on line 7 ------------------------------------------------------------------------ [2006-04-14 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2006-04-06 07:27:34] tony2...@php.net Thanks for posting the patch again. Actually I asked you to provide a small piece of PHP code I can use to test the problem you are trying to fix. ------------------------------------------------------------------------ [2006-04-05 23:32:59] kurtb149 at yahoo dot com $ cvs diff oci_statement.c Index: oci_statement.c =================================================================== RCS file: /repository/php-src/ext/pdo_oci/oci_statement.c,v retrieving revision 1.20 diff -r1.20 oci_statement.c 420a421,424 > #ifdef SQLT_TIMESTAMP_LTZ > || dtype == SQLT_TIMESTAMP_LTZ > #endif > ------------------------------------------------------------------------ [2006-04-04 09:52:45] tony2...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=34211 -- Edit this bug report at http://bugs.php.net/bug.php?id=34211&edit=1