PHP calling PL/SQL functions
| From: | egarciaf at safei dot es | Date: | Thu, 10 Apr 2003 11:34:52 +0000 |
| Subject: | PHP calling PL/SQL functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-143307@lists.php.net to get a copy of this message | ||
Hi all,
I'm trying call to a PL/SQL function from a PHP script and Oracle response is
the following error:
Warning: OCIStmtExecute: ORA-06550: line 1, column 8: PLS-00553: character set
name is not recognized ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated in
/home/gerv/desarrollo/EGF/alpha/ejecutable/cron/lanza_proc.php on line 16
The PHP script is:
<?PHP
$usr = "cuadres";
$pwd = "cds";
$sid = "CORE_IOM";
putenv("ORACLE_HOME=/var/oracle/app/oracle/product/8.1.7");
$conn = OCILogon ($usr, $pwd, $sid);
$stmt = OCIParse($conn, " begin :res := TO_CHAR(SYSDATE,'YYYYMMDD') ; end;");
OCIBindByName($stmt, ":res", &$result,55 );
OCIExecute($stmt);
OCIResult($stmt,$result);
echo $result;
ocilogoff($conn);
?>
It fails executing OCIExecute
I have set the environment variables in the httpd.conf file:
SetEnv NLS_LANG spanish_spain.we8dec
SetEnv ORA_NLS33 /var/oracle/app/oracle/product/8.1.7/ocommon/nls/admin/data
The Oracle connection works properly with other queries.
Thanks a lot
Eduardo