php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56602 BLOB support needed in oci8_pdo
Submitted: 2005-10-19 18:58 UTC Modified: 2005-10-30 21:56 UTC
From: cjbj at hotmail dot com Assigned: wez (profile)
Status: Closed Package: PDO_OCI (PECL)
PHP Version: 5_1 CVS-2005-10-19 (dev) OS: Windows 2000
Private report: No CVE-ID: None
 [2005-10-19 18:58 UTC] cjbj at hotmail dot com
Description:
------------
This text is cut/pasted from Oracle's PHP forum http://forums.oracle.com/forums/thread.jspa?threadID=332179&tstart=15
There is a similar problem reported in http://forums.oracle.com/forums/thread.jspa?threadID=332765&tstart=0

--------------------------------------------------------------------
Is the any php_pdo_oci.dll that works with PHP 5.1 RC1. I have tried to install PHP 5.1 RC1 with php_pdo_oci drivers avaiable at http://www.oracle.com/technology/pub/articles/php_experts/otn_pdo_oracle5.html and got an error that says it was not possible to find the procedure empty_string in php5ts.dll.

I have installed the PHP 5.1 RC1 because the PDO::Statement::bindParam (BLOB Columns) does not works with the pdo that comes with the PCL 5.0. I have to insert files in a BLOB field like this:

--------------
CODE
--------------
<?
// $db = new PDO( "mysql:dbname=isoweb;host=localhost", "root", "" );
$db = new PDO( "oci:dbname=oracle", "isoweb", "isoweb" );

$nome = 'teste123';
$path = "C:\\temp\\padrao.doc";
$FILE = fopen( $path, "rb" );

$query = "update doc_modelos set nome = :NOME, MODELO = :MODELO WHERE ID_MODELO = '1'";

$sth = $db->prepare( $query );
$sth->bindParam( ":NOME", $nome, PDO_PARAM_STR);
$sth->bindParam( ":MODELO", $FILE, PDO_PARAM_LOB );
$sth->execute();
?>
--------------
END CODE
--------------

If I remove the blob field from the query it works... I have tried it with MySql too, and it did not work, but when I have updated to 5.1 RC1 it worked with MySql but with Oracle I got the error above.

I think it is a PDO bug, on Windows maybe...

I am using:
> Windows 2000 SP 4 (5.00.2195)
> PHP 5.1 RC1
> Apache 2.0.48

Please help...

Best regards,
Junior
--------------------------------------------------------------------


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-27 00:13 UTC] wez@php.net
Changed to correct package
 [2005-10-30 21:56 UTC] wez@php.net
Fixed in PHP 5.1 CVS.

For usage instructions, see:
http://netevil.org/node.php?uuid=4365876a-cee9-3009-7726-365876a51802
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 15:01:28 2024 UTC