Installing PHP and the Oracle Instant Client for Linux and Windows. For PHP 5.5, OCI8 2.0 and Oracle Database 12c Release 1. By Christopher Jones. March 2015 See the version for PHP 5.4 and Oracle Database 11g Release 2. If you plan to use PHP to connect to an Oracle database, then you’ll want to install OCI8, which is a pecl extension for Oracle. You can also use PDO_OCI as mentioned in The Underground PHP and Oracle Manual, however Oracle does not contribute to PDO_OCI; if you look this up (for example on stackoverflow), you’ll find a number of users have had various problems getting PDO. And you've successfully built the oci8 PHP module:-). Step 5: Install the OCI8 PHP Module. Now that everything has been built, there should be a new folder named 'modules' in the oci8-1.3.4 folder. Cd into the modules directory and if you do an ls to see the folder contents you will see the oci8.so module. ||| Search for in the • • Documentation: • Downloads: • • •:::::: Windows oci8 2.1.8 Package Information Summary Extension for Oracle Database Maintainers Antony Dovgal (lead) [] [] Christopher Jones (lead) [] Wez Furlong (lead) [] Andi Gutmans (lead) [] Tianfang Yang (lead) [] License PHP Description Use the OCI8 extension to access Oracle Database. Use 'pecl install oci8' to install for PHP 7. Use 'pecl install oci8-2.0.12' to install for PHP 5.2 - PHP 5.6. Use 'pecl install oci8-1.4.10' to install for PHP 4.3.9 - PHP 5.1. The OCI8 extension can be linked with Oracle client libraries from Oracle Database 12, 11, or 10.2. These libraries are found in your database installation, or in the free Oracle Instant Client from Oracle's standard cross-version connectivity applies. For example, PHP OCI8 linked with Instant Client 11.2 can connect to Oracle Database 9.2 onward. See Oracle's note 'Oracle Client / Server Interoperability Support' (ID 207303.1) for details. Release notes Version 2.1.8 (stable) This version is for PHP 7 only. Fixed reference counting and memory issues. (Dmitry, Tianfang). How To Install Oci8 Php DownloadIntroduction In response to my extremely (thousands of hits) popular article, I decided to add this article since I find those instructions have become somewhat out of date, and also it is recommended to use PHP 7.2 with any web application that you are currently supporting. PHP 7.2 provides significant performance improvements over PHP 7.0, so if you are using PHP 7.0, I highly recommend updating to PHP 7.2. Stopping Apache You’ll need to stop Apache (web server) using the following command. In any Linux commands I show in this article, it presumes you aren’t logged in as the root user, so you will need to use sudo to issue privileged commands. Sudo service httpd stop Add EPEL & Remi Repositories You’ll need to install the EPEL & Remi repositories as follows: sudo yum install sudo yum install Set Config Manager for PHP 7.2 You’ll need to get the yum-utils to use the yum-config-manager to set the default repository using the following commands: sudo yum install yum-utils sudo yum-config-manager --enable remi-php72 The above enables the Remi PHP 7.2 repository. Installing PHP 7.2 If you already have PHP 5.x or PHP 7.0 installed, you will need to figure out how to remove it. I used this command to remove php70u from my system(s): sudo yum remove php70u-common.x86_64 You can then check to see if you still have php installed with this command: sudo yum list installed|grep php You shouldn’t see anything related to php installed, otherwise uninstall the package. Then you can install PHP 7.2; in my scenario, I normally develop applications that use PHP in Apache. Php Oci8 ConnectIn my case, I would use the following command to install: sudo yum install php php-pecl-mcrypt php-cli php-gd php-curl php-mysqlnd php-ldap php-zip php-fileinfo php-xml php-intl php-mbstring php-opcache php-process systemtap-sdt-devel php-pear php-json php-devel php-common php-bcmath php-pdo This installs all the packages I need. Installing OCI8 This is the part that could get tricky. You should be able to issue the following at this point: sudo install php-oci8 Then you’ll need to edit the php.ini file as follows: sudo vi /etc/php.ini Which is the typical location of the php.ini file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2018
Categories |