简体   繁体   中英

how to install oracle instant client for xampp

I have XAMPP for Windows 1.7.3 installed.

I'm using Zend Framework and need to use the pdo_oci8 extension. I've enabled the extension - but now getting the error that it can't find the oci.dll file.

I've downloaded the instantclient_11_2 zip file from oracle. Unzipped it. It contains a bunch of dll files.

How do I install this on windows? Do I need to run a cmd prompt or move it to a specific folder under xampp?

Below you will find the instructions on how to configure/install and enable the Oracle Instant Client for XAMPP v7, v5.5 and v5.6.

  1. Download and install XAMPP
  2. Modify the php.ini in "C:\\xampp\\php"
    • Uncomment the following line ";extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client"
    • Restart Apache
  3. Download the 32 bit (PHP is 32 bit so no need to 64) Oracle Instant Client
    • You need both Instant Client Package - Basic and Instant Client Package - SDK
    • Unzip both in "C:\\php-sdk\\oracle\\x86\\instantclient_12_1" and "c:\\php-sdk\\oracle\\x86\\instantclient_12_1\\sdk" respectivly
  4. Add the directory "C:\\php-sdk\\oracle\\x86\\instantclient_12_1" to the windows path veritable
    • Under system Properties click Environment Variables
    • Edit the Path variable
    • You need to reboot windows
  5. (Optional) If you want to specify the oracle connections in the tnsnames.ora file:

Thats it :)

instruction where taken from here: http://www.gi-architects.co.uk/2016/11/how-to-install-oracle-instant-client-v12-for-xampp-v7-v5-5-v5-6-windows/

Google gave me this topic when I searched the problem, but I have not found solution here.

But I found here: http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-084410.html

My problem was that I downloaded the 64 version of Oracle instant client, and php seems to be working only with the 32-bit.

I unzipped the file into a directory.

That directory I placed in c:\\xampp, eg c:\\xampp\\intanstclient_11_2

Then I added that to my windows path variable.

Quite simple really in the end.

当我添加类似 "c:\\instantclient_12_2" 的路径变量时,我的问题得到了解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM