Jump to content

PHP+Oracle problem - oci_fetch_all() fails for certain schema


obay

Recommended Posts

Hi all,

 

I have a weird problem with PHP + Oracle.

 

Within my PHP program, I have a function which executes all queries:

 

//all queries are executed by this function
//simplified for readability
function query($db, $query) {
$result = array();
$parse_result = oci_parse($db, $query);
$execute_result = oci_execute($parse_result, OCI_DEFAULT);
$result["count"] = oci_fetch_all($parse_result, $result["result"]);
return $result;
}

 

I have an Oracle DB in the backend, which I manage with PL/SQL.

 

Schemas: A, B, C, D

Users (Roles): E (Role1)

Role1 has SELECT privilege on A, B, C, D

 

Everything works fine in PL/SQL. But my problem is that, my query() function above stops / terminates at oci_fetch_all() for any table in schema D. I know it terminates there because I have logging. It never gets past that line. It just simply terminates whenever I do SELECTs on schema D.anyTable. I tried copying my queries on D.anyTable into PL/SQL and they work. So that rules out the possibility of insufficient privileges.

 

What am I missing?

 

Thanks for your time!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.