0

Installed XAMMP and PHP 5.6.31 using Oracle instaclient_11_2 already in the C:\drive. Edited and enabled extension=php_oci8_11g.dll in php.ini. Installed php_oci8_11g.dll in C:\xampp\php\ext.

What did i miss?

PHP returns:

Fatal error: Call to undefined function oci_connect() in C:\xampp\htdocs\OC\oci8.php on line 3

<?php

$conn = oci_connect('hr', 'hr', 'localhost/orcl');
if (!$conn) {
    $e = oci_error();
    trigger_error(htmlentities($e['message'], ENTS_QUOTES),E_USER_ERROR);
}
else echo "connection successful";

?> 
Dave
  • 5,108
  • 16
  • 30
  • 40
spinyweb
  • 29
  • 2

1 Answers1

0

I understand that you have enable OCI but enabling OCI can be tricky.

  1. Please closely follow this link:

    https://www.oracle.com/technetwork/articles/dsl/technote-php-instant-12c-2088811.html

  2. Please see dll for OCI match php , that is 64bit php , 64bit OCI DLL, or 32bit php and 32bit OCI

  3. Try copying php_oci8_xx.dll to system32. and restart pc. (not recommended but just to avoid the path issue, but first thing first make sure you follow above link carefully)

Thank you

Community
  • 1
  • 1
Ali
  • 552
  • 6
  • 17
  • Thanks Rob, much better now i got this error: Forbidden You don't have permission to access /phpinfo.php on this server. with a simple – spinyweb Dec 06 '18 at 21:54
  • i have granted all permissions in httpd.conf but the result is still the same..could anybody suggest what i have missed? – spinyweb Dec 07 '18 at 23:33
  • There can be several reasons for forbidden , i think go through this https://stackoverflow.com/questions/10873295/error-message-forbidden-you-dont-have-permission-to-access-on-this-server this might narrow your issue. more over try looking in to apache error logs, last thing try chmod 777 /phpinfo.php – Ali Dec 08 '18 at 12:25