0
votes
Win 2007 Server 32bit
Apache2.2
PHP version 5.3.14 which was without php_oci8 files
oracle Enterprise Edition installed

I need to be able to connect to remote oracle database, so I find out, that OCI8 extension should be used. To make OCI8 work, I also should need at least Oracle Instant Client on server, because of certain DLL OCI8 need.

What I did?

downloaded Oracle Instant Client from their sites ( oracle download site ), version 11.2.0.4.0
unpacked into folder, I choosed Program Files/oci_11_2
added to windows variable path the address
restarted Win
downloaded php_oci8 libraries from PECL ( PECL oci8 dl site )
put them into the ext directory set in php.ini
added extension=php_oci8.dll into php.ini
restarted apache

After all this I checked php_info to see, if everything is ok, however no signs of oci8.

I tried older Oracle instant client, swtiching between php_oci8.dll, php_oci8_11g.dll or php_oci8_12c.dll, yet nothing helped.

Currently, I have no idea what to do, unless trying reinstalling php(which I don't want to because of many problematics connected with that), different Oracle instant clients or differenct php_oci8 libraries. I google for some hours, tried looking on Stack, but no solution, just some tips, that didn't help. Have someone encountered and solved something similar?

2

2 Answers

0
votes

you've got to set ORACLE_HOME and LD_LIBRARY_PATH Apache environment variables too.

0
votes

You have to:

  1. set ORACLE_HOME to point to the Instant Client root folder,
  2. enable PHP_OCI8_SOMETHING.DLL in your PHP.INI config (... which you did),
  3. restart Windows, ideally,
  4. start Apache.

... and it should work.

Ideally you would do this under the Windows account which owns+runs the Apache+PHP server (which should be other than that which you use regularly; this way you can have several Oracle homes concurrently in use on your Windows), so one more ...

  1. check the filesystem privileges - whether the Instant Client is accessible to the Apache process.