|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-03-06 21:17 UTC] helly@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
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)