Search code examples
oracle11gwindows-7-x64php-5.3apache2.2

How Can I install oci8 drivers in php 5.3 on my windows pc whith out xampp or wamp


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?


Solution

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