Page 1 of 1

php connectivity to oracle

Posted: Wed Mar 17, 2004 1:33 pm
by sam2004
Hi
We are trying to move data froma ccess to oracle.
wrote a php script for oracle connectivity;
Getting this error:

Warning: ocilogon(): _oci_open_server:

at Line number:
if ($c=OCILogon("scott", "tiger",$db)) {

Full code is as follows:

<?


putenv('ORACLE_HOME=C:\oracle\ora92');
putenv('ORACLE_SID=bookKeeper);
putenv('TNS_ADMIN=C:\oracle\ora92\network\admin');
//putenv('NLS_LANG=English_America.WE8ISO8859PL');
//en_US
putenv("TWO_TASK=bookKeeper");


$db = "(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = iabetaweb)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = bookKeeper)
)
)";

//$conn = ocilogon("scott", "tiger", $db);

if ($c=OCILogon("scott", "tiger",$db)) {
echo "Successfully connected to Oracle.\n";
OCILogoff($c);
} else {
$err = OCIError();
echo "Oracle Connect Error " . $err[text];
exit();
}


Wondering why

Thanks in advance!

Posted: Wed Mar 17, 2004 9:21 pm
by JAM
Is 'scott' your database username and 'tiger' your database password for sure? Just making sure...

Posted: Thu Mar 18, 2004 12:03 pm
by sam2004
scott/tiger is what the system tells us as username/password.
i did not create this user "scott".
its like the default username/password combo for sql and SQLPlus editor.
Thanks