Reputation: 865
I'm having a weird problem with PHP and the OCI-Lob::read method.
We have a page that connects to the database and pulls all the other fields out with no problems. However, it when it comes to the clobs, only a small portion of the actual data is retrieved.
The code uses:
$content= $features[14]->read(2000);
echo $content;
And we're getting a tiny section of the field returned (only about 185 out of a total 553 chars). The really strange thing is that no matter what the length specified is - it still only returns a small section and - the cut off seems to actually be 549 bytes/chars - anything below the length specified as 549 shortens the returned string but anything over 549 makes no difference.
Additionally, we've used the OCI-Lob::load method with exactly the same results where only a portion of the actual contents of the clob field is returned.
Any ideas what could be causing this?
TIA
Upvotes: 3
Views: 1345
Reputation: 865
It turns out the problem stems from the connect string!
The TNS_ALIAS wasn't properly configured so I hard coded the connect string and then it worked - for some bizarre reason, a minor error in the TNS_ALIAS config allowed some, but not all of the clob data to get pulled through.
Upvotes: 2