I have got a brand new database here and it is an alternative version from Oracle 10g to Oracle 11g - the primary issue is with LOB posts and each time any function returns a LOB as result, the brand new database will not return strings such as the old one did:

Old DB:

["C"]=>
string(23) "3874163,3874197,3874201"

New DB:

["C"]=>
resource(182) of type (stream)

Now when reading through the streams sometimes there's a mistake of the non-existing stream resource beeing recommended and everything fails. I am speculating the bond closed meanwhile with no stream beeing read and then the access sheds.

When altering the claims to incorporate a casting against varchar for instance:

CONVERT(VARCHAR, C, 120)

Or such as this:

SELECT TO_CHAR(FUNC())

The worthiness is came back like a string again but this isn't really an optimal solution as every statement will have to be transformed.

Can there be in whatever wayOrchoice to avoid LOBs from beeing shipped as streams so that they are rather shipped as strings as with Oracle 10g?

Edit:
We're while using oci function-looking for db access.

No answer as a result but a couple of products which i hope helps.

It appears like this there's a little difference in the manner that LOBs are came back between 10g and 11g, under 11g there's some notes concerning the conversion from btyes to byteStreams when LOBs are gone a particular value, within the JDBC reference manual (I realize this does not effect OCI calls because they make use of a different driver set).

From what I can tell when it comes to the OCI8 functions within php the default operation from the fetch functions would be that the LOBs are returns like a reference and have to be utilized while using ->read() ->load() etc functions (see http://au.php.net/oci_fetch_array - concerning the mode and also the default).

Now I have no idea if you work with the OCI functions to gain access to your oracle system as it is not specified by your question.

Handful of other products that will assist in foreseeing this out could be should you could tell us should you recompiled php or up-to-date the oracle motorists using the more recent client version whatsoever.

I understand it is not a complete solution but when you're using oci_fetch_* to come back the row, give a second argument towards the call of OCI_RETURN_LOBS, this makes the fetch to come back a string from the LOB area rather than a mention of the a stream, or make use of the $variable["C"]->load() to gain access to this LOB this makes it to load the entire stream and behave like an ordinary string.

Hope this can help.

If you work with PDO you will need to alter from PDO::PARAM_LOB to PDO::PARAM_STR. For instance in conjunction with bind column:

$statement->bindColumn(1, $as_string, PDO::PARAM_STR, 256);
$statement->bindColumn(1, $as_lob, PDO::PARAM_LOB);

When utilizing LOBs you have to use either OCI::read or OCI::load to have their contents.

[...]
$row = oci_fetch_assoc($result);

$lobContents = $row['LOB_COLUMN']->load(); //fetches the whole LOB
//or
while ($buffer = $row['LOB_COLUMN']->read(4096)) { //sequential read
   $lobContents .= $buffer;
}