简体   繁体   中英

how to connect oracle database with xampp?

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. 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM