Forum Stats

  • 3,733,822 Users
  • 2,246,827 Discussions
  • 7,856,887 Comments

Discussions

Fail to load() a OCI-Lob with PHP 7.3

User_3YVAH
User_3YVAH Member Posts: 1 Green Ribbon

Hi everyone,

i'm working a website redesign. On the original website, we connect to an Oracle DB to get some data, and in this data, some attributes are contained in OCI-Lob objects. No issue there, i easily get the data and load the OCI-Lob using the ->load() method.

On the new environment, we try to get the same data from a Symfony 5.1 API. No issue to get the data, we easily get the database entries BUT when i try to access the attribute contained in the OCI-Lob object using the same ->load) method as before, i got a connection lost error.


I tried a lot a things, even wrote a very simple script to get i execute on both environments:

$conn = oci_connect($cnfuser, $cnfcode, $cnfhost.':'.$cnfport.'/'.$cnfsid);        
$result = array();
$stid = oci_parse($conn, "SELECT * FROM {table} WHERE length({column}) > 0 FETCH FIRST 5 ROWS ONLY");
oci_execute($stid);
while (($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
    $result[] = $row;
}
echo $result[0]['{column}']->size();
echo "\n";
echo $result[0]['{column}']->load();

It works fine on the WordPress server but not on the Symfony one: i can access the OCI-Lob->size(), but the load() fail:

Warning: OCI-Lob::load(): ORA-03156: OCI call timed out

Here are both environments configurations:

WordPress:
PHP 5.6

oci8OCI8 Support => enabled
OCI8 DTrace Support => disabled
OCI8 Version => 2.0.12
Revision => $Id: 020312b6429ebb9d6272ac9bc28f6dce529434b6 $
Oracle Run-time Client Library Version => 10.2.0.5.0
Oracle Compile-time Instant Client Version => 10.2Directive => Local Value => Master Value
oci8.default_prefetch => 100 => 100
oci8.events => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20


Symfony:
PHP 7.3

OCI8 Support => enabled
OCI8 DTrace Support => disabled
OCI8 Version => 2.2.0
Oracle Run-time Client Library Version => 19.8.0.0.0
Oracle Compile-time Instant Client Version => 19.8Directive => Local Value => Master Value
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100
oci8.events => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20

I must admit i'm stuck now, and don't really now where to look...

Could you please help me with this issue ?

Thanks !

Tagged:
Sign In or Register to comment.