1
votes

I have PHP application running on IIS7, windows 2008 R2 server

i try to connect to remote Oracle DB, i installed PHP on the IIS7 useing web platform installer, then enabled the following extension : php_oci8.dll, php_oci8_11g.dll, php_pdo_oci.dll

when i run phpinfo i can't find oci8 enabled in the extensions.

this is my function to connect

<?php

function oci_query_assoc($oconn,$query){
$result = oci_parse($query);
oci_execute($oconn,$result);
while($row = oci_fetch_assoc($result)){
$return[] = $row;
}
return $return;
}

function oci_query_assoc_single($oconn,$query){
$result = oci_parse($query);
oci_execute($oconn,$result);
while($row = oci_fetch_assoc($result)){
$return = $row;
}
return $return;
}

?>
1
If it is not in your PHPinfo then the module is not installed correctly and you wont be able to use it in your code. Check your logs for more infoDirkos

1 Answers

0
votes

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);

and let me know wether it is work or not

and congrats... you combined 3 separate services Oracle, Microsoft, PHP.