We are migrating from a Windows SBS 2011 to Windows Server 2012 R2.
We have an internal website that connects to our Oracle database using PHP.
I am trying to migrate this to the new server and so far I have:
- Installed IIS Server Role
- Installed PHP
- Downloaded Oracle Instant Client to C:\instantclient
- Added C:\instantclient to PATH System Variable
- Added php_oci8.dll to php.ini and checked that PHP is actually using this php.ini
- Restarted server
I am still getting error messages like oci_ commands not being recognised etc.
I'm lost. I've searched online and the instructions match what I have done from memory.
I haven't found a single thing online that I haven't done.
try this:
extension=php_oci8_12c.dll (instead of php_oci8.dll) - that is what I am using and you probably downloaded the same instant client as I did.
Depending on the version of InstantClient you have installed you might need to include the
bin
folder in the path, like so:To check if the DLL files are available in the path enter
where oci*.dll
in a command prompt. It should return a list of matching files.Also, remember that just because your account can see the DLL files doesn't mean IIS/PHP can. That runs under a different account that might not have permission to access the files. Check your IIS error log and PHP
php_errors.log
file for any specific error messages.Edit
After a rather lengthy chat, the problem was resolved by:
msvcr71.dll
to the InstantClient folder.Path
environment variable correctly pointed to the InstantClient and PHP folders.