PHP+Oracle problem - oci_fetch_all() fails for certain schem
Posted: Tue Sep 01, 2009 11:01 am
Hi all,
I have a weird problem with PHP + Oracle.
Within my PHP program, I have a function which executes all queries:
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!
I have a weird problem with PHP + Oracle.
Within my PHP program, I have a function which executes all queries:
Code: Select all
//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;
}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!