Bug #19702 [Opn->Fbk]: Problem openin CLOB object
| From: | danielc at analysisandsolutions dot com | Date: | Tue, 13 Nov 2012 21:26:44 +0000 |
| Subject: | Bug #19702 [Opn->Fbk]: Problem openin CLOB object | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9339@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19702&edit=1
ID: 19702
Updated by: danielc@analysisandsolutions.com
Reported By: cchokote at yob dot fr
Summary: Problem openin CLOB object
-Status: Open
+Status: Feedback
Type: Bug
Package: MDB2_Driver_oci8
Operating System: Linux (Cent OS)
Package Version: 1.5.0b4
PHP Version: 5.4.0
-Assigned To:
+Assigned To: danielc
Roadmap Versions:
New Comment:
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: danielc
Hi Charles:
Sorry about the problem. I'm unable to install Oracle at the moment, so
I'll need your help in debugging what's going on, please. Run the unit
tests supplied with the package. It's best to get this from SVN.
# If you don't have PHPUnit installed.
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
Get the MDB2 source.
svn checkout https://svn.php.net/repository/pear/packages/MDB2/trunk
mdb2
cd mdb2
# Either hard code your settings in the "oci8" section or set the
environment variables listed there.
vim tests/dsn.inc
# Run the tests.
phpunit tests
Please post the output here. Also, if you can figure out how to fix the
problem, even better.
Sorry to put this on you. I didn't develop the oci8 driver and don't
have an oracle server available.
--Dan
Previous Comments:
------------------------------------------------------------------------
[2012-11-13 17:58:31] virtuel2000
Description:
------------
I recently upgrade my mdb2 package and driver for oracle.
When i try to read a clob column, i have and error (which where not
exist before).
Test script:
---------------
$sql = "SELECT fichier from matable where id = 1";
if (!$this->db->isError($result = $this->db->Query($sql,
array('clob'))))
{
if ($result->valid())
{
$obj = $result->FetchRow();
$clob = $obj['fichier'];
if (MDB2::isError($clob) == false)
{
while (!feof($clob))
{
$value .= fread($clob, 8192);
}
$this->db->datatype->destroyLOB($clob);
}
}
Expected result:
----------------
I expected to read a clob value in $value var
Actual result:
--------------
This scritp return no errot in log. But never end.
He always loop on
while (!feof($clob))
{
$value .= fread($clob, 8192);
}
whith error
feof() expects parameter 1 to be resource, object given
and
fread() expects parameter 1 to be resource, object given
There is data on my table.
Thank's for help...
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19702&edit=1