<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.jordan-lenuff.com/index.php?action=history&amp;feed=atom&amp;title=Technique%2FPHP%2FExtensions</id>
	<title>Technique/PHP/Extensions - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.jordan-lenuff.com/index.php?action=history&amp;feed=atom&amp;title=Technique%2FPHP%2FExtensions"/>
	<link rel="alternate" type="text/html" href="https://wiki.jordan-lenuff.com/index.php?title=Technique/PHP/Extensions&amp;action=history"/>
	<updated>2026-04-27T01:51:36Z</updated>
	<subtitle>Historique des révisions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://wiki.jordan-lenuff.com/index.php?title=Technique/PHP/Extensions&amp;diff=712&amp;oldid=prev</id>
		<title>Jordan : Page créée avec « ==Présentation== Cette page a pour objet de présenter certaines extensions de PHP.  == OCI8 == === Présentation === ''Cette extension apportent des fonctions qui permet… »</title>
		<link rel="alternate" type="text/html" href="https://wiki.jordan-lenuff.com/index.php?title=Technique/PHP/Extensions&amp;diff=712&amp;oldid=prev"/>
		<updated>2020-07-24T14:53:31Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « ==Présentation== Cette page a pour objet de présenter certaines extensions de PHP.  == OCI8 == === Présentation === &amp;#039;&amp;#039;Cette extension apportent des fonctions qui permet… »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Présentation==&lt;br /&gt;
Cette page a pour objet de présenter certaines extensions de PHP.&lt;br /&gt;
&lt;br /&gt;
== OCI8 ==&lt;br /&gt;
=== Présentation ===&lt;br /&gt;
''Cette extension apportent des fonctions qui permettent d'accéder aux bases de données Oracle 19c, 18c, 12c, 11g, 10g, 9i et 8i. Elles supportent les commandes SQL et PL/SQL. Les fonctions de base incluent le contrôle de transaction, la liaison de variables PHP avec des conteneurs Oracle, le support des types de grands objets (LOB) et des collections. Les fonctions d'extensibilité de Oracle, telles que de Database Resident Connection Pooling (DRCP) et le cache de résultats sont aussi supportés.''&lt;br /&gt;
&lt;br /&gt;
Plus d'informations sur https://www.php.net/manual/fr/book.oci8.php.&lt;br /&gt;
&lt;br /&gt;
=== Prérequis ===&lt;br /&gt;
La présence des librairies de l'Instant Client d'Oracle est obligatoire pour l'installation de l'extension oci8.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
==== Par le gestionnaire de paquets ====&lt;br /&gt;
Valable uniquement si PHP a été installé par le gestionnaire de paquet également.&lt;br /&gt;
&lt;br /&gt;
Lancer la commande :&lt;br /&gt;
 yum install php-oci8&lt;br /&gt;
&lt;br /&gt;
Cela aura pour effet d'installer oci8 en tant que module partagé. Pour l'activer, modifier le fichier &amp;lt;code&amp;gt;php.ini&amp;lt;/code&amp;gt; et ajouter/modifier la ligne suivante :&lt;br /&gt;
 extension=oci8.so&lt;br /&gt;
&lt;br /&gt;
==== Lors de la compilation de PHP ====&lt;br /&gt;
Lors de la configuration de la compilation de PHP, ajouter la ligne suivante :&lt;br /&gt;
 ...&lt;br /&gt;
 --with-oci8=instantclient,/usr/lib/oracle/10.2.0.4/client64/lib \&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Remplacer &amp;lt;code&amp;gt;/usr/lib/oracle/10.2.0.4/client64/lib&amp;lt;/code&amp;gt; par le chemin correspondant à la version d'Instant Client d'installée.&lt;br /&gt;
&lt;br /&gt;
==== Avec PECL ====&lt;br /&gt;
Indiquer à PECL la localisation du fichier &amp;lt;code&amp;gt;php.ini&amp;lt;/code&amp;gt; :&lt;br /&gt;
 pear config-set php_ini /local/php/php-5.6.40/php.ini&lt;br /&gt;
&lt;br /&gt;
Mettre à jour la base PECL :&lt;br /&gt;
 pecl channel-update pecl.php.net&lt;br /&gt;
&lt;br /&gt;
Voici le détail du package oci8 : https://pecl.php.net/package/oci8.&lt;br /&gt;
&lt;br /&gt;
Grâce à ces informations, il faut choisir la version du package PECL oci8 correspondant à la version de PHP.&lt;br /&gt;
&lt;br /&gt;
Par exemple, pour PHP 5.6.40, il faut lancer la commande suivante :&lt;br /&gt;
 pecl install oci8-2.0.12&lt;br /&gt;
&lt;br /&gt;
Alors que pour la version 7.4.7, il faudra simplement lancer la commande :&lt;br /&gt;
 pecl install oci8&lt;br /&gt;
&lt;br /&gt;
Exemple de retour :&lt;br /&gt;
{{terminal|text=&lt;br /&gt;
[root@vmwcentos7 ~]# /local/php/php-5.6.40/bin/pecl install oci8-2.0.12&lt;br /&gt;
downloading oci8-2.0.12.tgz ...&lt;br /&gt;
Starting to download oci8-2.0.12.tgz (191,954 bytes)&lt;br /&gt;
.........................................done: 191,954 bytes&lt;br /&gt;
11 source files, building&lt;br /&gt;
running: phpize&lt;br /&gt;
Configuring for:&lt;br /&gt;
PHP Api Version:         20131106&lt;br /&gt;
Zend Module Api No:      20131226&lt;br /&gt;
Zend Extension Api No:   220131226&lt;br /&gt;
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] :&lt;br /&gt;
building in /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12&lt;br /&gt;
running: /tmp/pear/temp/oci8/configure --with-php-config=/local/php/php-5.6.40/bin/php-config --with-oci8&lt;br /&gt;
checking for grep that handles long lines and -e... /usr/bin/grep&lt;br /&gt;
checking for egrep... /usr/bin/grep -E&lt;br /&gt;
checking for a sed that does not truncate output... /usr/bin/sed&lt;br /&gt;
checking for cc... cc&lt;br /&gt;
checking whether the C compiler works... yes&lt;br /&gt;
checking for C compiler default output file name... a.out&lt;br /&gt;
checking for suffix of executables...&lt;br /&gt;
checking whether we are cross compiling... no&lt;br /&gt;
checking for suffix of object files... o&lt;br /&gt;
checking whether we are using the GNU C compiler... yes&lt;br /&gt;
checking whether cc accepts -g... yes&lt;br /&gt;
checking for cc option to accept ISO C89... none needed&lt;br /&gt;
checking how to run the C preprocessor... cc -E&lt;br /&gt;
checking for icc... no&lt;br /&gt;
checking for suncc... no&lt;br /&gt;
checking whether cc understands -c and -o together... yes&lt;br /&gt;
checking for system library directory... lib&lt;br /&gt;
checking if compiler supports -R... no&lt;br /&gt;
checking if compiler supports -Wl,-rpath,... yes&lt;br /&gt;
checking build system type... x86_64-unknown-linux-gnu&lt;br /&gt;
checking host system type... x86_64-unknown-linux-gnu&lt;br /&gt;
checking target system type... x86_64-unknown-linux-gnu&lt;br /&gt;
checking for PHP prefix... /local/php/php-5.6.40&lt;br /&gt;
checking for PHP includes... -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib&lt;br /&gt;
checking for PHP extension directory... /local/php/php-5.6.40/lib/php/extensions/no-debug-non-zts-20131226&lt;br /&gt;
checking for PHP installed headers prefix... /local/php/php-5.6.40/include/php&lt;br /&gt;
checking if debug is enabled... no&lt;br /&gt;
checking if zts is enabled... no&lt;br /&gt;
checking for re2c... no&lt;br /&gt;
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.&lt;br /&gt;
checking for gawk... gawk&lt;br /&gt;
checking for Oracle Database OCI8 support... yes, shared&lt;br /&gt;
checking PHP version... 5.6.40, ok&lt;br /&gt;
checking OCI8 DTrace support... no&lt;br /&gt;
checking size of long int... 8&lt;br /&gt;
checking checking if we're on a 64-bit platform... yes&lt;br /&gt;
configure: WARNING: OCI8 extension: ORACLE_HOME is not set, looking for default Oracle Instant Client instead&lt;br /&gt;
checking Oracle Instant Client directory... /usr/lib/oracle/19.6/client64/lib&lt;br /&gt;
checking Oracle Instant Client SDK header directory... /usr/include/oracle/19.6/client64&lt;br /&gt;
checking Oracle Instant Client library version compatibility... 19.1&lt;br /&gt;
checking for ld used by cc... /usr/bin/ld&lt;br /&gt;
checking if the linker (/usr/bin/ld) is GNU ld... yes&lt;br /&gt;
checking for /usr/bin/ld option to reload object files... -r&lt;br /&gt;
checking for BSD-compatible nm... /usr/bin/nm -B&lt;br /&gt;
checking whether ln -s works... yes&lt;br /&gt;
checking how to recognize dependent libraries... pass_all&lt;br /&gt;
checking dlfcn.h usability... yes&lt;br /&gt;
checking dlfcn.h presence... yes&lt;br /&gt;
checking for dlfcn.h... yes&lt;br /&gt;
checking the maximum length of command line arguments... 1572864&lt;br /&gt;
checking command to parse /usr/bin/nm -B output from cc object... ok&lt;br /&gt;
checking for objdir... .libs&lt;br /&gt;
checking for ar... ar&lt;br /&gt;
checking for ranlib... ranlib&lt;br /&gt;
checking for strip... strip&lt;br /&gt;
checking if cc supports -fno-rtti -fno-exceptions... no&lt;br /&gt;
checking for cc option to produce PIC... -fPIC&lt;br /&gt;
checking if cc PIC flag -fPIC works... yes&lt;br /&gt;
checking if cc static flag -static works... no&lt;br /&gt;
checking if cc supports -c -o file.o... yes&lt;br /&gt;
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes&lt;br /&gt;
checking whether -lc should be explicitly linked in... no&lt;br /&gt;
checking dynamic linker characteristics... GNU/Linux ld.so&lt;br /&gt;
checking how to hardcode library paths into programs... immediate&lt;br /&gt;
checking whether stripping libraries is possible... yes&lt;br /&gt;
checking if libtool supports shared libraries... yes&lt;br /&gt;
checking whether to build shared libraries... yes&lt;br /&gt;
checking whether to build static libraries... no&lt;br /&gt;
&lt;br /&gt;
creating libtool&lt;br /&gt;
appending configuration tag &amp;quot;CXX&amp;quot; to libtool&lt;br /&gt;
configure: creating ./config.status&lt;br /&gt;
config.status: creating config.h&lt;br /&gt;
running: make&lt;br /&gt;
/bin/sh /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/libtool --mode=compile cc  -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/oci8/oci8.c -o oci8.lo&lt;br /&gt;
mkdir .libs&lt;br /&gt;
 cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8.c  -fPIC -DPIC -o .libs/oci8.o&lt;br /&gt;
/bin/sh /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/libtool --mode=compile cc  -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/oci8/oci8_lob.c -o oci8_lob.lo&lt;br /&gt;
 cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_lob.c  -fPIC -DPIC -o .libs/oci8_lob.o&lt;br /&gt;
/bin/sh /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/libtool --mode=compile cc  -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/oci8/oci8_statement.c -o oci8_statement.lo&lt;br /&gt;
 cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_statement.c  -fPIC -DPIC -o .libs/oci8_statement.o&lt;br /&gt;
/bin/sh /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/libtool --mode=compile cc  -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/oci8/oci8_collection.c -o oci8_collection.lo&lt;br /&gt;
 cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_collection.c  -fPIC -DPIC -o .libs/oci8_collection.o&lt;br /&gt;
/bin/sh /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/libtool --mode=compile cc  -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/oci8/oci8_interface.c -o oci8_interface.lo&lt;br /&gt;
 cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_interface.c  -fPIC -DPIC -o .libs/oci8_interface.o&lt;br /&gt;
/bin/sh /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/local/php/php-5.6.40/include/php -I/local/php/php-5.6.40/include/php/main -I/local/php/php-5.6.40/include/php/TSRM -I/local/php/php-5.6.40/include/php/Zend -I/local/php/php-5.6.40/include/php/ext -I/local/php/php-5.6.40/include/php/ext/date/lib -I/usr/include/oracle/19.6/client64  -DHAVE_CONFIG_H  -g -O2   -o oci8.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/modules  oci8.lo oci8_lob.lo oci8_statement.lo oci8_collection.lo oci8_interface.lo -Wl,-rpath,/usr/lib/oracle/19.6/client64/lib -L/usr/lib/oracle/19.6/client64/lib -lclntsh&lt;br /&gt;
cc -shared  .libs/oci8.o .libs/oci8_lob.o .libs/oci8_statement.o .libs/oci8_collection.o .libs/oci8_interface.o  -L/usr/lib/oracle/19.6/client64/lib -lclntsh  -Wl,-rpath -Wl,/usr/lib/oracle/19.6/client64/lib -Wl,-soname -Wl,oci8.so -o .libs/oci8.so&lt;br /&gt;
creating oci8.la&lt;br /&gt;
(cd .libs &amp;amp;&amp;amp; rm -f oci8.la &amp;amp;&amp;amp; ln -s ../oci8.la oci8.la)&lt;br /&gt;
/bin/sh /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/libtool --mode=install cp ./oci8.la /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/modules&lt;br /&gt;
cp ./.libs/oci8.so /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/modules/oci8.so&lt;br /&gt;
cp ./.libs/oci8.lai /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/modules/oci8.la&lt;br /&gt;
PATH=&amp;quot;$PATH:/sbin&amp;quot; ldconfig -n /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/modules&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
Libraries have been installed in:&lt;br /&gt;
   /tmp/pear/temp/pear-build-rootnlbXUf/oci8-2.0.12/modules&lt;br /&gt;
&lt;br /&gt;
If you ever happen to want to link against installed libraries&lt;br /&gt;
in a given directory, LIBDIR, you must either use libtool, and&lt;br /&gt;
specify the full pathname of the library, or use the `-LLIBDIR'&lt;br /&gt;
flag during linking and do at least one of the following:&lt;br /&gt;
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable&lt;br /&gt;
     during execution&lt;br /&gt;
   - add LIBDIR to the `LD_RUN_PATH' environment variable&lt;br /&gt;
     during linking&lt;br /&gt;
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag&lt;br /&gt;
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'&lt;br /&gt;
&lt;br /&gt;
See any operating system documentation about shared libraries for&lt;br /&gt;
more information, such as the ld(1) and ld.so(8) manual pages.&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Build complete.&lt;br /&gt;
Don't forget to run 'make test'.&lt;br /&gt;
&lt;br /&gt;
running: make INSTALL_ROOT=&amp;quot;/tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12&amp;quot; install&lt;br /&gt;
Installing shared extensions:     /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local/php/php-5.6.40/lib/php/extensions/no-debug-non-zts-20131226/&lt;br /&gt;
running: find &amp;quot;/tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12&amp;quot; | xargs ls -dils&lt;br /&gt;
26361016   0 drwxr-x--- 3 root root     19 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12&lt;br /&gt;
 8473496   0 drwxr-x--- 3 root root     17 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local&lt;br /&gt;
17684939   0 drwxr-x--- 3 root root     24 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local/php&lt;br /&gt;
26361017   0 drwxr-x--- 3 root root     17 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local/php/php-5.6.40&lt;br /&gt;
 1150692   0 drwxr-x--- 3 root root     17 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local/php/php-5.6.40/lib&lt;br /&gt;
 8473497   0 drwxr-x--- 3 root root     24 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local/php/php-5.6.40/lib/php&lt;br /&gt;
17684940   0 drwxr-x--- 3 root root     39 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local/php/php-5.6.40/lib/php/extensions&lt;br /&gt;
26361019   0 drwxr-x--- 2 root root     21 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local/php/php-5.6.40/lib/php/extensions/no-debug-non-zts-20131226&lt;br /&gt;
26361021 568 -rwxr-xr-x 1 root root 579224 23 juil. 18:18 /tmp/pear/temp/pear-build-rootnlbXUf/install-oci8-2.0.12/local/php/php-5.6.40/lib/php/extensions/no-debug-non-zts-20131226/oci8.so&lt;br /&gt;
&lt;br /&gt;
Build process completed successfully&lt;br /&gt;
Installing '/local/php/php-5.6.40/lib/php/extensions/no-debug-non-zts-20131226/oci8.so'&lt;br /&gt;
install ok: channel://pecl.php.net/oci8-2.0.12&lt;br /&gt;
Extension oci8 enabled in php.ini&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== SQL Server ==&lt;br /&gt;
Pour pouvoir communiquer avec les serveurs SQL Server de Microsoft depuis un serveur Linux avec PHP, il est nécessaire d'installer les pilotes ODBC pour SQL Server.&lt;br /&gt;
&lt;br /&gt;
Pour ce faire, installer le dépôt Microsoft pour la version de Linux nécessaire :&lt;br /&gt;
 curl https://packages.microsoft.com/config/rhel/7/prod.repo &amp;gt; /etc/yum.repos.d/mssql-release.repo&lt;br /&gt;
&lt;br /&gt;
Ensuite, installer la version désirée du pilote ODBC MicroSoft :&lt;br /&gt;
ACCEPT_EULA=Y yum install msodbcsql17&lt;br /&gt;
&lt;br /&gt;
Une fois le pilote installé, il faut ensuite installer l'extension nécessaire dans PHP.&lt;br /&gt;
&lt;br /&gt;
=== PHP 7 ===&lt;br /&gt;
Pour pouvoir communiquer avec les serveurs SQL Server de Microsoft avec PHP 7, il faut installer l'extension &amp;lt;code&amp;gt;sqlsrv&amp;lt;/code&amp;gt; ou son homologue en PDO &amp;lt;code&amp;gt;pdo_sqlsrv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Pour ce faire, il est possible de l'installer via le gestionnaire de paquets (moyennant l'ajout du dépôt correspondant), ou de recompiler intégralement PHP, ou de compiler uniquement l'extension grâce à PECL.&lt;br /&gt;
&lt;br /&gt;
Pour une installation au travers de PECL, lancer les commandes suivantes :&lt;br /&gt;
 pecl channel-update pecl.php.net&lt;br /&gt;
 pecl install pdo_sqlsrv&lt;br /&gt;
&lt;br /&gt;
=== PHP 5 ===&lt;br /&gt;
Pour pouvoir communiquer avec les serveurs SQL Server de Microsoft avec PHP 5, plusieurs solutions sont possibles.&lt;br /&gt;
&lt;br /&gt;
Les différentes solutions sont résumées sur un article sur le blog de Rémi : https://blog.remirepo.net/post/2016/09/20/Microsoft-SQL-Server-depuis-PHP&lt;br /&gt;
&lt;br /&gt;
==== Avec PDO ====&lt;br /&gt;
Pour pouvoir faire du PDO sur des serveurs SQL Server depuis un serveur Linux avec PHP 5, il faut, au choix :&lt;br /&gt;
*Installer le paquet &amp;lt;code&amp;gt;mssqlodbc&amp;lt;/code&amp;gt; depuis le repository de Rémi (voir lien ci-dessus)&lt;br /&gt;
*Recompiler PHP&lt;br /&gt;
&lt;br /&gt;
Dans les deux cas, le paquet &amp;lt;code&amp;gt;unixODBC&amp;lt;/code&amp;gt; est nécessaire.&lt;br /&gt;
&lt;br /&gt;
Pour installer les prérequis nécessaire à la recompilation de PHP, lancer la commande suivante :&lt;br /&gt;
 yum install unixODBC-devel msodbcsql17&lt;br /&gt;
&lt;br /&gt;
Lancer ensuite la recompilation de PHP en y ajoutant l'option suivante :&lt;br /&gt;
 ...&lt;br /&gt;
 --with-pdo-odbc=unixODBC,/usr \&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Voici un exemple de code PHP fonctionnel pour se connecter à un SQL Server 2014 :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
try {&lt;br /&gt;
	$dbh = new PDO('odbc:DRIVER={ODBC Driver 17 for SQL Server};Server=MyServer\MyInstance,MyPort;UID=MyUserName;PWD=MyPassword;');&lt;br /&gt;
} catch (PDOException $exception) {&lt;br /&gt;
      echo $exception-&amp;gt;getMessage();&lt;br /&gt;
      exit;&lt;br /&gt;
}&lt;br /&gt;
var_dump($dbh);&lt;br /&gt;
unset($dbh);&lt;br /&gt;
echo &amp;quot;Connexion OK !&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jordan</name></author>
		
	</entry>
</feed>