ID:               39341
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jasen at treshna dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         PostgreSQL related
 Operating System: debian linux
 PHP Version:      4.4.4
 New Comment:

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 the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------

[2006-11-02 05:20:30] jasen at treshna dot com

Description:
------------
I have a postgresql database table with a bytea field

 I insert into a record into this table using pg_insert

but when I extract the data using pg_fetch_assoc the binary data is
still escaped and needs to be unescaped using pg_unescape_bytea



Reproduce code:
---------------
$db=pg_connect('dbname=foo');
$res=pg_query("select * from images limit 1");
$row=pg_fetch_assoc($res);
header("content-type: $row[type]");
echo /*pg_unescape_bytea(*/$row['data']); 
/* unescape is needed - is this a bug in php? */


Expected result:
----------------
I would expect my binary image to display in the browser

Actual result:
--------------
the browser complains about corruption in the image 
closer examination reveals that the data is still escaped.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39341&edit=1

Reply via email to