#34630 [Fbk->Asn]: LOB support incomplete in some drivers

From: Date: Sat, 24 Sep 2005 18:37:53 +0000
Subject: #34630 [Fbk->Asn]: LOB support incomplete in some drivers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-85549@lists.php.net to get a copy of this message
 ID:               34630
 Updated by:       wez@php.net
 Reported By:      wez@php.net
-Status:           Feedback
+Status:           Assigned
 Bug Type:         PDO related
-Operating System: *
+Operating System: any
-PHP Version:      5CVS-2005-09-24 (cvs)
+PHP Version:      5.1.0RC1
-Assigned To:      
+Assigned To:      wez


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

[2005-09-24 20:34:54] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



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

[2005-09-24 20:34:02] wez@php.net

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 this bug report at http://bugs.php.net/?id=34630&edit=1


Thread (8 messages)

« previous php.bugs (#85549) next »