how to connect oracle database with xampp?

user3119396 picture user3119396 · Dec 19, 2013 · Viewed 7.2k times · Source

I download the XAMPP Windows 1.8.2 and oracle instant client 12.1.

Then, I unzip the oracle instant client file, edit the PATH environment setting, and edit PATH in the System variables list by adding instant client's path.

I find string ;extension=php_oci8.dll. Remove the semicolon (;) from the begining of the string to activate the oracle extension and save it.

Then I restart xampp but I cannot find oci8 in phpinfo.

Please help me to save the problem.

Answer

Chintan Gor picture Chintan Gor · Feb 19, 2014

Now check in php_info(); that oci8 enables or not if enable then use standard oci8 connections

This is your standard Oracle connection

 include('database.php'); //which have database credentials and server name stored

  $c = oci_connect($userName, $password, "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =$serverName)(PORT = 1521)))(CONNECT_DATA=(SID=$databaseName)))");

print_r($c);

Try this