hi all,
i've run into an interesting oracle permission error, when i call an oracle connection function from within another function.
i get this error:
12546, 00000, "TNS:permission denied"
// Cause: User has insufficient privileges to perform the requested operation.
// Action: Acquire necessary privileges and try again.
when i call this function, from within ANY other function:
function oracle_connect() {
$dbh = @OCILogon($oracle["user"], $oracle["pass"], $oracle["sid"]);
if($error = OCIError()) {
return $error;
} else {
return $dbh;
}
}
the above oracle_connect() function works fine when called from a standard block of php code, but fails when i call it from within another function ??
for example, something like this works as expected:
<?php
// CODE BLOCK
oracle_connect();
query();
// FUNCTIONS
function oracle_connect() {
...
}
function query() {
...
}
?>
BUT something like this doesn't work, instead i receive an oracle permission error??:
<?php
/ CODE BLOCK /
all_steps();
/ FUNCTIONS /
function all_steps() {
oracle_connect();
query();
}
function oracle_connect() {
...
}
function query() {
...
}
?>
p.s. all php files have the same file permissions, etc.
can anyone offer any insight to this behavior??