Whatever the reason, this tutorial will run you through the basic process of doing so. You also may just want the latest version for the virtues that come with staying up-to-date.
This might be because you're using MySQL 8 and/or PHP 7 and the version provided by Ubuntu's apt repository either won't install or won't function with this setup. It does not store any personal data.Sometimes installing phpMyAdmin manually, as opposed to using apt, is necessary. The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. The cookie is used to store the user consent for the cookies in the category "Performance". This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly. To finish this task I need to go with our local Oracle guru (a.k.a ‘ the dba‘) and ask him permission on the database. You can easily check if everything went ok with a phpinfo() script: The hardest step To me, the last step is to restart php (if you are using lamp, restart apache) in order to PHP load the oci8 extension: systemctl restart php7.4-fpm I’m using php-fpm so I created a new file /etc/php/7.4//20-oci8.ini with this content: extension=oci8.so /etc/php/7.4/fpm/conf.d/20-oci8.ini The penultimate step is to instruct php to load this extension. You will be asked for the path to the ORACLE_HOME directory, answer this: instantclient,/opt/oracle/instantclientīuilding and installing the extension with success You can easily fix this by installing the -dev packages with: apt install php-dev apt installing php-devĪfter installing php-dev you will be able to install oci8-2.2.0 with pecl pecl install oci8-2.2.0 On my first try I’ve got this error: phpsize not found. When you are ready run: pecl install oci8-2.2.0 Or, if you choose Nginx, this is the tutorial for the LEMP stack. Im assuming that you already have the LAMP (for Apache) or LEMP (for nginx) stack installed on your system, if not you can check this tutorial for LAMP. You can check this by running ls -l *so checking symbolic linksĬonfigure the dynamic loader to search for this libraries in this path creating the file /etc/ld.so.conf.d/nf with the following content: /opt/oracle/instantclient /etc/ld.so.conf.d/nfĪnd then run: ldconfig Install the php-oci8 extension libclntsh.so must point to liblntsh.so.21.1.libocci.so must point to libocci.so.21.1.Make sure that the following two files exists and are symbolic links to the real library file: Now you can navigate to the destination directory, select all the files with the * key, and pressing F5 to copy them: Mkdir -p /opt/oracle/instantclient creating a directory for the extracted contents This path doesn’t exist yet, so create with I will put everything on /opt/oracle/instantclient.
The alternative is to run on the command line: unzip extracting the zip contentsĪs you can see in my above screenshot I’ve unzipped on a temporary folder on root’s home. You, as me, could be tempted on press enter to enter the zip and copy the contents, but doing that way breaks some symbolic links.
While I did this I was using midnight commander: step on the file, press F2, run command (or press and write ‘ unzip‘. This “installation” is just unzip the files you’ve downloaded earlier in a location that you can find later.
This last one is optional but will be very useful if you want to test your connection with an Oracle database from the command line
Oracle’s scalability features such as Database Resident Connection Pooling (DRCP) and result caching are also supported.» Downloadsįirst we need to download some libraries from here: Basic features include transaction control, binding of PHP variables to Oracle placeholders, and support for large object (LOB) types and collections.
This article will show you how to install php-oci8 on Ubuntu LTS. OCI functions allows access to Oracle databases, but, at least in Ubuntu, aren’t included in the default PHP installation.