I'm using wampserver and i want to use the oci8 to connect to the oracle database i enabled the oci8 but when ever i see my phpinfo(); it's not there can any one tell me what's going on. i have been searching everywhere for hours but i couldn't find a solution at all. i'm using WampServer Version 2.2 Apache 2.4.2 – PHP 5.4.3 and oracle 11g. every time i execute:
<?php
if ($conn = oci_connect('sys as sysdba', '12345', '//localhost/orcl'))
{
print 'Successfully connected to Oracle Database!';
}
else
{
$errmsg = oci_error();
print 'Oracle connection failed' . $errmsg['message'];
}
?>
it shows this error :
Fatal error: Call to undefined function OCILogon() in C:\wamp\www\IDS\Index.php on line 3
I downloaded a different php and Apache version
instead of Apache 2.4.2 – PHP 5.4.3
now i'm using Apache 2.2.2 – PHP 5.2.6
from wampserver-Addons - Add versions of Apache, MySQL et PHP
and i reemoved the ";"
semicolon from the php.ini
file at the oci8 line
it was like this:
;extension=php_oci8.dll
i changed it to:
extension=php_oci8.dll