I'm having problems running a stored procedure on an Oracle database using PHP ODBC. I can query and do simple inserts using PHP ODBC on the Oracle database but when I'm attempting to run a stored procedure it just fails with no odbc_errors reported.
The stored procedure is supposed to create a new row but the row is never created when called from PHP ODBC. There are no problems with the stored procedure since when I run it from SQLPlus it works perfectly fine.
I can't seem to identify the problem cause when I try to print any odbc_error I get nothing. Does anyone have any tips or suggestions to help debug this problem?
If this helps, I'm running PHP 4 and Oracle 10 and the code snippet:
$dbh = odbc_connect("profile", $db_user, $db_pswd);
error_log('ODBC Oracle Connection:' . $dbh);
$storedProc = "EXEC INSERT_PROFILER ($profile)";
$result = odbc_execute($storedProc);
if ($result) {
error_log("Stored Procedure Successfully Ran.");
odbc_commit();
}else {
error_log("Stored Procedure Failed to Run.");
error_log(odbc_error($dbh));
}
Thanks,
ron