How to use oracle client 11.2 with php (xampp) on win7 x64

两盒软妹~` 提交于 2019-12-05 15:33:56

I finally found a solution:

I downloaded the actual OCI-DLLs from "PECL :: PAckage :: oci8 :: 2.0.8" (in my case the 32bit, threadsafe DLL) and then removed the ; from this line

;extension=php_oci8_11g.dll  ; Use with Oracle 11gR2 Instant Client

I also added the following lines to my http.conf of apache

SetEnv ORACLE_BASE "C:/oracle/"
SetEnv ORACLE_HOME "C:/oracle/product/11.2.0/client_1"  

After that I restarted apache, made sure that my connection-alias is probably placed in my tsnames.ora and then I could use the oci8-functions witout any problems.

  1. https://pecl.php.net/package/oci8/2.2.0/windows SELECT -> 7.3 Thread Safe (TS) x86 for 32bits or 7.3 Thread Safe (TS) x64 for 64 bits
  2. Extract all files and copy into de C:\xampp\php\ext
  3. Open php.ini file and write this: extension=php_oci8.dll
  4. Restart xampp. check your browser http://localhost/dashboard/phpinfo.php if the oci8 is enabled if not appear. download from internet and copy the oci8.dll into the c:\windows\system32 folder.
  5. Restart xampp
  6. Check your browser http://localhost/dashboard/phpinfo.php if the oci8 is enabled. Done!!
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!