#34630 [NEW]: LOB support incomplete in some drivers

From: Date: Sat, 24 Sep 2005 18:34:03 +0000
Subject: #34630 [NEW]: LOB support incomplete in some drivers
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-85545@lists.php.net to get a copy of this message
From:             wez@php.net
Operating system: any
PHP version:      5.1.0RC1
PHP Bug Type:     PDO related
Bug description:  LOB support incomplete in some drivers

Description:
------------
Quoting a reporting I received via email:

I'm trying to use PDO abstraction layer (version 1.0RC1), but I'm having
serious problems with LOB support in Oracle and Postgres (the only I've
tried).




Reproduce code:
---------------
<?php
	/* Connect to an ODBC database using driver invocation */
	$dsn = 'pgsql:host=192.168.0.4 port=5432 dbname=isodb_fresz';
	$path = "test.jpg";

   	$dbh = new PDO($dsn, "isodb_user", "isodb_user");

        $sql="
        insert into iso_dane_binarne (db_dane_binarne_id, db_dane)
        values(1, ?);";

        $content  = fopen($path, "rb");
        print_r($content);

        $stmt = $dbh->prepare($sql);
        print_r(PDO_PARAM_LOB);
        $stmt->bindParam( 1, $content, PDO_PARAM_LOB);
        $stmt->execute();
?>


Expected result:
----------------
The image content in the database

Actual result:
--------------
This inserts something like "Resource id 3#" string into db_dane (bytea
type) column.


-- 
Edit bug report at http://bugs.php.net/?id=34630&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34630&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34630&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34630&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34630&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34630&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34630&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34630&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34630&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34630&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34630&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=34630&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=34630&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34630&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34630&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34630&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34630&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34630&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34630&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34630&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34630&r=mysqlcfg


Thread (8 messages)

« previous php.bugs (#85545) next »