Created
March 6, 2017 10:55
-
-
Save fabianofa/98b989c739a5290b8d8f8d64ee781211 to your computer and use it in GitHub Desktop.
Instalando extensão em ambiente linux com php já compilado
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you already have php installed (from repository for example), you can compile only the PDO_OCI from PHP source (you need the instantclient installed) | |
Download the PHP source with same version that you have installed; | |
Unzip; | |
Change to directory php-YOUR-VERSION/ext/pdo_oci | |
Inside the pdo_oci folder, run these commands: | |
$ git clone https://github.com/php/php-src.git | |
$ cd php-src | |
#opcional se na versão mais recente do PHP: | |
$ git checkout PHP-7.0.15 | |
$ cd ext/pdo_oci | |
$ phpize | |
$ ./configure --with-pdo-oci=instantclient,/usr,12.1 | |
$ make && make install | |
$ echo "extension=pdo_oci.so" > /etc/php.d/pdo_oci.ini | |
$ service httpd restart | |
This method will only create a pdo_oci.so in the PHP extensions folder, don't need to recompile entire PHP. You can do it with repositories versions of PHP, and can do it with any extension inside the ext folder in PHP source. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment