ID: 36625 Updated by: [EMAIL PROTECTED] Reported By: iakio at mono-space dot net -Status: Assigned +Status: Closed Bug Type: PostgreSQL related -Operating System: Linux +Operating System: * PHP Version: 5.1.2 Assigned To: helly New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Thanks for the patch and testcase Previous Comments: ------------------------------------------------------------------------ [2006-03-06 05:22:54] iakio at mono-space dot net Description: ------------ pg_trace() does not work. See attatched patch. I don't know what it means, but it was different from others which calling php_stream_cast() (e.g. ext/bz2/bz2.c, ext/gd/gd.c). I'm not good at English. Sorry. --- pgsql.c.orig 2006-03-06 13:02:21.000000000 +0900 +++ pgsql.c 2006-03-06 13:02:37.000000000 +0900 @@ -2360,7 +2360,7 @@ RETURN_FALSE; } - if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)fp, REPORT_ERRORS)) { + if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)&fp, REPORT_ERRORS)) { php_stream_close(stream); RETURN_FALSE; } Reproduce code: --------------- <?php $conn = pg_connect(""); pg_trace("/home/ishida/trace.log", "w", $conn); $res = pg_query($conn, "select 1"); pg_close($conn); ?> Expected result: ---------------- $ cat /home/ishida/trace.log To backend> Msg Q To backend> 'select 1' To backend> Msg complete, length 14 >From backend> T >From backend (#4)> 33 >From backend (#2)> 1 >From backend> "?column?" ... Actual result: -------------- $ cat /home/ishida/trace.log (empty) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36625&edit=1