1
votes

I'm trying to connect to an oracle database remotely using PHP. I'm working on a Windows 7 machine that's running IIS as its webserver.

I have downloaded/extracted the files of Instant Client 11.2.0.3.0, added the path to the client libraries in %PATH% environmental variables and uncommented the extension=php_oci_11g.dll file in my php.ini file. When I run a oci_connect script it dies on the first line and the PHP error log says:

Fatal error: Call to undefined function oci_connect()

I checked my phpinfo() to see if OCI8 Support was enabled but could only find it in the configure command section see below:enter image description here So I've concluded that Oracle support hasn't been enabled in PHP. I've tried following multiple troubleshooting articles but haven't been able to enable support.

Question: Why does the Configure Command section specify the wrong path to the oci8-11g extension? It's actually located on C:/Program files/PHP/v5.3/ext

Thanks in advance.

UPDATE: If I try to run php -m in CLI I get this error message:

enter image description here

as well as an error message in the php error log:

PHP Startup: unable to load dynamic library ‘C:\Program files\PHP\v5.3\ext\php_oci8_11g.dll’ – the specified procedure could not be found

Then I did php -v and it gave me this error message: enter image description here

1

1 Answers

2
votes

What I did was switch from IIS to WAMP and I instantly was able to enable support to the OCI8_11g extension for PHP. I don't know why IIS wasn't allowing me to enable support.