Thank you @guilerme-birth.
I was able to install it as follows (remembering that I use Centos 6.6):
Download the PHP
$ wget http://ar2.php.net/get/php-5.6.10.tar.gz/from/this/mirror
Unzip and switch to the unzipped folder
$ tar -xzf php-5.6.10.tar. gz
$ cd php-5.6.10
Run configure command with desired parameters (below my example)
./configure
--prefix=/usr
--sysconfdir=/etc
--localstatedir=/var
--datadir=/usr/share/php
--Mandir=/usr/share/man
--with-config-file-path=/etc
--with-config-file-scan-dir=/etc/php. d
--with-zlib
--enable-bcmath
--with-bz2
--enable-Calendar
--with-gdbm
--with-gmp
--enable-ftp
--with-gettext
--enable-mbstring
--with-readline
--with-apxs2
--with-Pdo-oci=instantclient,/usr,12.1
--enable-dba=Shared
--with-Pdo-mysql --with-mysql-Sock=/var/mysql/mysql.Sock
--with-Pdo-pgsql
OBS: During this step errors may occur due to dependencies that need to be installed before, such as db4 and db4-devel. In my case, I was executing the command, seeing which dependency was giving error. Once identified, install the dependency (always installing also the version devel of each package) and ran again to see the next dependency that was missing. I did this until the command ran error free.
Compiling and installing
$ make && make install
At this point, PHP is already installed.
To make sure, run the following command:
$ php -v
But before we conclude, we need to make some adjustments...
Copy php.ini to the right directory
If you are on a local server
$ cp php.ini-Development /etc/php.ini
If you are on a production server
$ cp php.ini-Production /etc/php.ini
Open apache configuration file for editing
$ vi /etc/httpd/conf/httpd.conf
Add the lines below for Apache to interpret PHP
Addtype application/x-httpd-php . php
Addtype application/x-httpd-php-source . phps
Save and restart Apache
$ service httpd Restart
Ready! By now everything should be working properly!
The disadvantage of this method (at least as far as I noticed) is that whenever you need some module like PDO_MYSQL, PDO_PGSQL etc, you cannot install via package, as it will not work.
To install some, it can be via PECL, except those that are outdated, as the PDO_MYSQL and PDO_OCI, where you must build php again to install these.
@jflizandro edited the answer, use the command
yum install php-pdo
– Guilherme Nascimento
Giving a search understood better. Actually not only enable the extension in php.ini, because it does not come in PHP installed via repository. I found that it is necessary to install PHP through the source and compile it with the command ./configure --with-Pdo-oci=instantclient,/usr,. I was able to install it quietly and PDO_OCI enabled right. Only problem is that php pages are being displayed as text. I will perform some VM tests, redoing the whole process.
– jflizandro
Pdo was already installed, but PDO_OCI does not come in the package, because to compile it is necessary to point the instantclient path, which may vary.
– jflizandro
@jflizandro I added some details in the installation response, see if help
– Guilherme Nascimento