{"id":888,"date":"2013-04-24T06:04:36","date_gmt":"2013-04-24T10:04:36","guid":{"rendered":"https:\/\/gonzalo.aro.cl\/blog\/?p=888"},"modified":"2013-04-24T06:35:52","modified_gmt":"2013-04-24T10:35:52","slug":"instalando-el-instantclient-de-oracle-para-php-en-linux","status":"publish","type":"post","link":"https:\/\/gonzalo.aro.cl\/blog\/2013\/04\/24\/instalando-el-instantclient-de-oracle-para-php-en-linux\/","title":{"rendered":"Instalando el InstantClient de Oracle para PHP en Linux"},"content":{"rendered":"<p>Aun cuando puedes encontrar en<a href=\"https:\/\/www.oracle.com\/technetwork\/articles\/technote-php-instant-084410.html\"> esta p\u00e1gina<\/a> una descripcion detallada de la instalaci\u00f3n, aqui te muestro una instalaci\u00f3n paso a paso de los comando aplicados en el orden que se expresa para linux, exceptuando la de php-devel que la instale debido a que no estaba. Esta instalaci\u00f3n se hizo en RedHat 6.1.<\/p>\n<pre class=\"brush: bash\">\r\n[root@aro-cl oraclePhp]# rpm -Uvh oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm \r\nPreparing...                ########################################### [100%]\r\n   1:oracle-instantclient11.########################################### [100%]\r\n[root@aro-cl oraclePhp]# rpm -Uvh oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm \r\nPreparing...                ########################################### [100%]\r\n   1:oracle-instantclient11.########################################### [100%]\r\n[root@aro-cl oraclePhp]# rpm -Uvh php-devel-5.3.3-3.el6.x86_64.rpm \r\nwarning: php-devel-5.3.3-3.el6.x86_64.rpm: Header V3 RSA\/SHA256 Signature, key ID fd431d51: NOKEY\r\nPreparing...                ########################################### [100%]\r\n   1:php-devel              ########################################### [100%]\r\n[root@aro-cl oraclePhp]# tar -xzf oci8-1.4.7.tgz\r\n[root@aro-cl oraclePhp]# cd oci8-1.4.7\r\n[root@aro-cl oci8-1.4.7]# phpize\r\nConfiguring for:\r\nPHP Api Version:         20090626\r\nZend Module Api No:      20090626\r\nZend Extension Api No:   220090626\r\n[root@aro-cl oci8-1.4.7]# .\/configure --with-oci8=instantclient,\/usr\/lib\/oracle\/11.2\/client64\/lib\r\nchecking for grep that handles long lines and -e... \/bin\/grep\r\nchecking for egrep... \/bin\/grep -E\r\nchecking for a sed that does not truncate output... \/bin\/sed\r\nchecking for cc... cc\r\nchecking for C compiler default output file name... a.out\r\nchecking whether the C compiler works... yes\r\nchecking whether we are cross compiling... no\r\nchecking for suffix of executables... \r\nchecking for suffix of object files... o\r\nchecking whether we are using the GNU C compiler... yes\r\nchecking whether cc accepts -g... yes\r\nchecking for cc option to accept ISO C89... none needed\r\nchecking how to run the C preprocessor... cc -E\r\nchecking for icc... no\r\nchecking for suncc... no\r\nchecking whether cc understands -c and -o together... yes\r\nchecking for system library directory... lib\r\nchecking if compiler supports -R... no\r\nchecking if compiler supports -Wl,-rpath,... yes\r\nchecking build system type... x86_64-unknown-linux-gnu\r\nchecking host system type... x86_64-unknown-linux-gnu\r\nchecking target system type... x86_64-unknown-linux-gnu\r\nchecking for PHP prefix... \/usr\r\nchecking for PHP includes... -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib\r\nchecking for PHP extension directory... \/usr\/lib64\/php\/modules\r\nchecking for PHP installed headers prefix... \/usr\/include\/php\r\nchecking if debug is enabled... no\r\nchecking if zts is enabled... no\r\nchecking for re2c... no\r\nconfigure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.\r\nchecking for gawk... gawk\r\nchecking for Oracle Database OCI8 support... yes, shared\r\nchecking PHP version... 5.3.3, ok\r\nchecking for ANSI C header files... yes\r\nchecking for sys\/types.h... yes\r\nchecking for sys\/stat.h... yes\r\nchecking for stdlib.h... yes\r\nchecking for string.h... yes\r\nchecking for memory.h... yes\r\nchecking for strings.h... yes\r\nchecking for inttypes.h... yes\r\nchecking for stdint.h... yes\r\nchecking for unistd.h... yes\r\nchecking size of long int... 8\r\nchecking checking if we're on a 64-bit platform... yes\r\nchecking Oracle Instant Client directory... \/usr\/lib\/oracle\/11.2\/client64\/lib\r\nchecking Oracle Instant Client SDK header directory... \/usr\/include\/oracle\/11.2\/client64\r\nchecking Oracle Instant Client library version compatibility... 11.1\r\nchecking for a sed that does not truncate output... (cached) \/bin\/sed\r\nchecking for fgrep... \/bin\/grep -F\r\nchecking for ld used by cc... \/usr\/bin\/ld\r\nchecking if the linker (\/usr\/bin\/ld) is GNU ld... yes\r\nchecking for BSD- or MS-compatible name lister (nm)... \/usr\/bin\/nm -B\r\nchecking the name lister (\/usr\/bin\/nm -B) interface... BSD nm\r\nchecking whether ln -s works... yes\r\nchecking the maximum length of command line arguments... 1966080\r\nchecking whether the shell understands some XSI constructs... yes\r\nchecking whether the shell understands \"+=\"... yes\r\nchecking for \/usr\/bin\/ld option to reload object files... -r\r\nchecking for objdump... objdump\r\nchecking how to recognize dependent libraries... pass_all\r\nchecking for ar... ar\r\nchecking for strip... strip\r\nchecking for ranlib... ranlib\r\nchecking command to parse \/usr\/bin\/nm -B output from cc object... ok\r\nchecking for dlfcn.h... yes\r\nchecking for objdir... .libs\r\nchecking if cc supports -fno-rtti -fno-exceptions... no\r\nchecking for cc option to produce PIC... -fPIC -DPIC\r\nchecking if cc PIC flag -fPIC -DPIC works... yes\r\nchecking if cc static flag -static works... no\r\nchecking if cc supports -c -o file.o... yes\r\nchecking if cc supports -c -o file.o... (cached) yes\r\nchecking whether the cc linker (\/usr\/bin\/ld -m elf_x86_64) supports shared libraries... yes\r\nchecking whether -lc should be explicitly linked in... no\r\nchecking dynamic linker characteristics... GNU\/Linux ld.so\r\nchecking how to hardcode library paths into programs... immediate\r\nchecking whether stripping libraries is possible... yes\r\nchecking if libtool supports shared libraries... yes\r\nchecking whether to build shared libraries... yes\r\nchecking whether to build static libraries... no\r\nconfigure: creating .\/config.status\r\nconfig.status: creating config.h\r\nconfig.status: executing libtool commands\r\n[root@aro-cl oci8-1.4.7]# make install\r\n\/bin\/sh \/root\/oraclePhp\/oci8-1.4.7\/libtool --mode=compile cc  -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64  -DHAVE_CONFIG_H  -g -O2   -c \/root\/oraclePhp\/oci8-1.4.7\/oci8.c -o oci8.lo \r\nlibtool: compile:  cc -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64 -DHAVE_CONFIG_H -g -O2 -c \/root\/oraclePhp\/oci8-1.4.7\/oci8.c  -fPIC -DPIC -o .libs\/oci8.o\r\n\/bin\/sh \/root\/oraclePhp\/oci8-1.4.7\/libtool --mode=compile cc  -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64  -DHAVE_CONFIG_H  -g -O2   -c \/root\/oraclePhp\/oci8-1.4.7\/oci8_lob.c -o oci8_lob.lo \r\nlibtool: compile:  cc -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64 -DHAVE_CONFIG_H -g -O2 -c \/root\/oraclePhp\/oci8-1.4.7\/oci8_lob.c  -fPIC -DPIC -o .libs\/oci8_lob.o\r\n\/bin\/sh \/root\/oraclePhp\/oci8-1.4.7\/libtool --mode=compile cc  -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64  -DHAVE_CONFIG_H  -g -O2   -c \/root\/oraclePhp\/oci8-1.4.7\/oci8_statement.c -o oci8_statement.lo \r\nlibtool: compile:  cc -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64 -DHAVE_CONFIG_H -g -O2 -c \/root\/oraclePhp\/oci8-1.4.7\/oci8_statement.c  -fPIC -DPIC -o .libs\/oci8_statement.o\r\n\/bin\/sh \/root\/oraclePhp\/oci8-1.4.7\/libtool --mode=compile cc  -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64  -DHAVE_CONFIG_H  -g -O2   -c \/root\/oraclePhp\/oci8-1.4.7\/oci8_collection.c -o oci8_collection.lo \r\nlibtool: compile:  cc -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64 -DHAVE_CONFIG_H -g -O2 -c \/root\/oraclePhp\/oci8-1.4.7\/oci8_collection.c  -fPIC -DPIC -o .libs\/oci8_collection.o\r\n\/bin\/sh \/root\/oraclePhp\/oci8-1.4.7\/libtool --mode=compile cc  -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64  -DHAVE_CONFIG_H  -g -O2   -c \/root\/oraclePhp\/oci8-1.4.7\/oci8_interface.c -o oci8_interface.lo \r\nlibtool: compile:  cc -I. -I\/root\/oraclePhp\/oci8-1.4.7 -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64 -DHAVE_CONFIG_H -g -O2 -c \/root\/oraclePhp\/oci8-1.4.7\/oci8_interface.c  -fPIC -DPIC -o .libs\/oci8_interface.o\r\n\/bin\/sh \/root\/oraclePhp\/oci8-1.4.7\/libtool --mode=link cc -DPHP_ATOM_INC -I\/root\/oraclePhp\/oci8-1.4.7\/include -I\/root\/oraclePhp\/oci8-1.4.7\/main -I\/root\/oraclePhp\/oci8-1.4.7 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/oracle\/11.2\/client64  -DHAVE_CONFIG_H  -g -O2   -o oci8.la -export-dynamic -avoid-version -prefer-pic -module -rpath \/root\/oraclePhp\/oci8-1.4.7\/modules  oci8.lo oci8_lob.lo oci8_statement.lo oci8_collection.lo oci8_interface.lo -Wl,-rpath,\/usr\/lib\/oracle\/11.2\/client64\/lib -L\/usr\/lib\/oracle\/11.2\/client64\/lib -lclntsh\r\nlibtool: link: 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\/11.2\/client64\/lib -lclntsh  -Wl,-rpath -Wl,\/usr\/lib\/oracle\/11.2\/client64\/lib   -Wl,-soname -Wl,oci8.so -o .libs\/oci8.so\r\nlibtool: link: ( cd \".libs\" && rm -f \"oci8.la\" && ln -s \"..\/oci8.la\" \"oci8.la\" )\r\n\/bin\/sh \/root\/oraclePhp\/oci8-1.4.7\/libtool --mode=install cp .\/oci8.la \/root\/oraclePhp\/oci8-1.4.7\/modules\r\nlibtool: install: cp .\/.libs\/oci8.so \/root\/oraclePhp\/oci8-1.4.7\/modules\/oci8.so\r\nlibtool: install: cp .\/.libs\/oci8.lai \/root\/oraclePhp\/oci8-1.4.7\/modules\/oci8.la\r\nlibtool: finish: PATH=\"\/usr\/lib64\/qt-3.3\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/root\/bin:\/sbin\" ldconfig -n \/root\/oraclePhp\/oci8-1.4.7\/modules\r\n----------------------------------------------------------------------\r\nLibraries have been installed in:\r\n   \/root\/oraclePhp\/oci8-1.4.7\/modules\r\n\r\nIf you ever happen to want to link against installed libraries\r\nin a given directory, LIBDIR, you must either use libtool, and\r\nspecify the full pathname of the library, or use the `-LLIBDIR'\r\nflag during linking and do at least one of the following:\r\n   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable\r\n     during execution\r\n   - add LIBDIR to the `LD_RUN_PATH' environment variable\r\n     during linking\r\n   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag\r\n   - have your system administrator add LIBDIR to `\/etc\/ld.so.conf'\r\n\r\nSee any operating system documentation about shared libraries for\r\nmore information, such as the ld(1) and ld.so(8) manual pages.\r\n----------------------------------------------------------------------\r\nInstalling shared extensions:     \/usr\/lib64\/php\/modules\/\r\n[root@aro-cl oci8-1.4.7]# cd \/etc\/php.d\r\n[root@aro-cl oci8-1.4.7]# vi oci8.ini\r\n; Enable oci extension module\r\nextension=oci8.so\r\n[root@aro-cl php.d]# cd \/etc\/httpd\/conf.d\r\n[root@aro-cl conf.d]# vi oracle.conf\r\nSetEnv NLS_LANG=AMERICAN_AMERICA.AL32UTF8\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Aun cuando puedes encontrar en esta p\u00e1gina una descripcion detallada de la instalaci\u00f3n, aqui te muestro una instalaci\u00f3n paso a paso de los comando aplicados en el orden que se expresa para linux, exceptuando la de php-devel que la instale debido a que no estaba. Esta instalaci\u00f3n se hizo en RedHat 6.1. [root@aro-cl oraclePhp]# rpm [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,16,4,15,48,9,47,50,12],"tags":[],"class_list":["post-888","post","type-post","status-publish","format-standard","hentry","category-base-de-datos","category-centos","category-desarrollo","category-linux","category-moodle","category-oracle","category-php","category-redhat","category-web"],"_links":{"self":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/888"}],"collection":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/comments?post=888"}],"version-history":[{"count":2,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/888\/revisions"}],"predecessor-version":[{"id":890,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/888\/revisions\/890"}],"wp:attachment":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/media?parent=888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/categories?post=888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/tags?post=888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}