I am facing problem in connecting to database using PHP.
The error "Fatal error: Call to undefined function ocilogon() in C:\xampp\htdocs\ashish\x1.php", does not go at all.
Please Help me out with this, I was using oracle 10g(10.2.0) and since i was facing this issue i upgraded to Oracle 11g (11.1.0), Still i see the same error.
I am using PHP 5.2.8 (Installed with XAMPP), Oracle 11g(11.1.0).
I code i am using to connect to Oracle DB is as follows:
<?php
if ($c=OCILogon("scott", "rnd", "RND")) {
echo "Successfully connected to Oracle.\n";
OCILogoff($c);
} else {
$err = OCIError();
echo "Oracle Connect Error " . $err[text];
}
?>
P.S.: In the above code RND is the database available on my local machine. UID/PWD are scott/rnd
Install Location for xampp is C:\xampp\, i changes the PHP5.ini & PHP.ini file both present in folder C:\xampp\php and in both of them i have made following changes:
extension=php_oci8_11g.dll
extension=php_oracle.dll
also, i have kept ;extension=php_oci8.dll as disabled as mentioned in http://www.oracle.com/technology/pub/no ... stant.html
The reason behind keeping ";extension=php_oci8.dll" as diabled is i tried enabling that too but the error persists even with enabling that.
My PATH is as follows:
=====================
PATH=C:\Oracle\11.1.0\db_1\bin;C:\xampp\php;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\SFU\common;C:\Program Files\QuickTime\QTSystem;C:\Program Files\TortoiseSVN\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Ahead\Lib\
The Worst part is none of OCI or ORA functions from PHP to Oracle DB works
I am doing reaserach on this error from past 10 hrs tried all possible solutions but nothing helped, kindly help me out with this, i have seen an another user mentioned the same error in this forum and was able to resolve his problem after assitance from you guys.
Thanx in advance.