problem with ocilogon

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kunchesm
Forum Newbie
Posts: 1
Joined: Tue Dec 10, 2002 11:51 am
Location: India
Contact:

problem with ocilogon

Post by kunchesm »

<?php
//sample
putenv("ORACLE_SID=intranet");
putenv("ORACLE_HOME=/usr/local/OraHome1");
//putenv("NLS_LANG=THAI_THAILAND.TH8TISASCII");
$iDBConn = OCILogon("ksm", "kusuma");

if(! $iDBConn)
{
echo("can't connet to oracle") ;
}
//PDOB = "24/02/1989" and
$SqlUpdate2CT = "UPDATE T_PERSON SET PID = PID + 10 WHERE PNAME like 'Q%' " ;
$iStatement = @OCIParse($iDBConn, $SqlUpdate2CT);
$arrError = OCIError($iStatement);

if ($arrError['code'])
{
print $arrError['message'];
OCIRollback($iDBConn);
exit;
}

$Update2 = @OCIExecute($iStatement, OCI_DEFAULT);
$arrError = OCIError($iStatement);

if ($arrError['code'])
{
print $arrError['message'];
OCIRollback($iDBConn);
exit;
}

OCICommit($iDBConn);

?>

This code is giving me ..
'Fatal error: Call to undefined function: ocilogon() in c:\myphp\orcl1.php on line 6'
.. I am a newbie .. and i hav just started using database connectivity thru Php .. can anyone guide me .. how to connect to MS Access Databse and Oracle Database.

thanX in advance
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

probably the oracle 8 extension is not loaded.
Read http://www.php.net/manual/en/ref.oci8.php
Which distribution do you use? (ORACLE_HOME=/usr/local/OraHome1 suggests it's some kind of unix/kinux/freebsd/...)
Post Reply