Rabu, 02 Januari 2019

How to install PHP OCI extension on php remi 5.6 centos 7

  Tidak ada komentar
Download the Oracle instant client basic and devel installation files from official website

Download link : https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html



Download the pdo oci installation files from official website

Download link : https://pecl.php.net/package/PDO_OCI
[[email protected] ~]# curl https://pecl.php.net/get/PDO_OCI-1.0.tgz -o PDO_OCI-1.0                 .tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13679  100 13679    0     0   8828      0  0:00:01  0:00:01 --:--:--  8830
[[email protected] ~]#
[[email protected] ~]# ls
anaconda-ks.cfg
oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
PDO_OCI-1.0.tgz
[[email protected] ~]#
Extract the file
[[email protected] ~]# tar -xzf PDO_OCI-1.0.tgz
[[email protected] ~]# ls
anaconda-ks.cfg                                         package.xml
oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm  PDO_OCI-1.0
oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm  PDO_OCI-1.0.tgz
[[email protected] ~]#
Change working directory to PDO OCI
[[email protected] ~]# cd PDO_OCI-1.0
[[email protected] PDO_OCI-1.0]# lsl
-bash: lsl: command not found
[[email protected] PDO_OCI-1.0]# ls
config.m4   CREDITS       oci_statement.c  php_pdo_oci.h
config.w32  oci_driver.c  pdo_oci.c        php_pdo_oci_int.h
[[email protected] PDO_OCI-1.0]#
[[email protected] PDO_OCI-1.0]# vi config.m4
[[email protected] PDO_OCI-1.0]#
Running phpize
[[email protected] PDO_OCI-1.0]# phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
[[email protected] PDO_OCI-1.0]#
[[email protected] PDO_OCI-1.0]# ls
acinclude.m4    config.m4     install-sh       oci_statement.c
aclocal.m4      config.sub    ltmain.sh        pdo_oci.c
autom4te.cache  configure     Makefile.global  php_pdo_oci.h
build           configure.in  missing          php_pdo_oci_int.h
config.guess    config.w32    mkinstalldirs    run-tests.php
config.h.in     CREDITS       oci_driver.c
[[email protected] PDO_OCI-1.0]#
Configure the pdo oci
[[email protected] PDO_OCI-1.0]# ./configure --with-pdo-oci=instantclient,/usr,12.2
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking 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
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking Oracle OCI support for PDO... yes, shared
checking Oracle Install-Dir... instantclient,/usr,12.2 :instantclient,/usr,12.2:
checking if that is sane... yes
checking for oci.h... /usr/include/oracle/12.2/client
checking for OCIEnvCreate in -lclntsh... no
checking for OCIEnvNlsCreate in -lclntsh... no
checking for OCILobIsTemporary in -lclntsh... no
checking for OCILobIsTemporary in -locijdbc8... no
checking for OCICollAssign in -lclntsh... no
checking for OCIStmtFetch2 in -lclntsh... no
checking for PDO includes... checking for PDO includes... /usr/include/php/ext
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
[[email protected] PDO_OCI-1.0]#
Compile the oci files

[[email protected] PDO_OCI-1.0]# make
/bin/sh /root/PDO_OCI-1.0/libtool --mode=install cp ./pdo_oci.la /root/PDO_OCI-1.0/modules
libtool: install: cp ./.libs/pdo_oci.so /root/PDO_OCI-1.0/modules/pdo_oci.so
libtool: install: cp ./.libs/pdo_oci.lai /root/PDO_OCI-1.0/modules/pdo_oci.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /root/PDO_OCI-1.0/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/PDO_OCI-1.0/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

[[email protected] PDO_OCI-1.0]#
Install the oci
[[email protected] PDO_OCI-1.0]# make install
Installing shared extensions:     /usr/lib64/php/modules/
[[email protected] PDO_OCI-1.0]#

Create pdo oci ini configuration
[[email protected] php.d]# echo "extension=pdo_oci.so" > 30-pdo_oci.ini
[[email protected]erver php.d]#
Testing the php oci extension
[[email protected] PDO_OCI-1.0]# php -i | grep oci
/etc/php.d/30-pdo_oci.ini,
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
PDO drivers => mysql, oci, sqlite
[[email protected] PDO_OCI-1.0]#
Download the oci 8 installation files from official website
Download link : https://pecl.php.net/package/oci8
[[email protected] ~]# curl https://pecl.php.net/get/oci8-1.4.10.tgz -o oci8-1.4.10.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  165k  100  165k    0     0  74043      0  0:00:02  0:00:02 --:--:-- 74036
[[email protected] ~]#
[[email protected] ~]# ls
anaconda-ks.cfg  oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm  package.xml
oci8-1.4.10.tgz  oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm  PDO_OCI-1.0
oci8-2.2.0       oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm  PDO_OCI-1.0.tgz
oci8-2.2.0.tgz   oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
[[email protected] ~]#
Extract the downloaded file
[[email protected] ~]# tar -xzf oci8-1.4.10.tgz
[[email protected] ~]# ls
anaconda-ks.cfg                                         oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
oci8-1.4.10                                             oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
oci8-1.4.10.tgz                                         oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
oci8-2.2.0                                              package.xml
oci8-2.2.0.tgz                                          PDO_OCI-1.0
oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm  PDO_OCI-1.0.tgz
[[email protected] ~]#

Change directory to extracted directory

[[email protected] ~]# cd oci8-1.4.10
[[email protected] oci8-1.4.10]# ls
config.m4   CREDITS  oci8_collection.c  oci8_interface.c  oci8_statement.c  php_oci8_int.h  tests
config.w32  oci8.c   oci8.dsp           oci8_lob.c        php_oci8.h        README
[[email protected] oci8-1.4.10]#
[[email protected] oci8-1.4.10]# ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/12.1/client64/lib/
-bash: ./configure: No such file or directory
[[email protected] oci8-1.4.10]#
[[email protected] oci8-1.4.10]# phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226

[[email protected] oci8-1.4.10]#
Configure the oci by running the following command on terminal
[[email protected] oci8-1.4.10]# ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/12.1/client64/lib/
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking 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
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for Oracle Database OCI8 support... yes, shared
checking PHP version... 5.6.39, ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of long int... 8
checking checking if we're on a 64-bit platform... yes
checking Oracle Instant Client directory... /usr/lib/oracle/12.1/client64/lib/
checking Oracle Instant Client SDK header directory... /usr/include/oracle/12.1/client64
checking Oracle Instant Client library version compatibility... 12.1
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
[[email protected] oci8-1.4.10]#
Compile the file
[[email protected] oci8-1.4.10]# make
/bin/sh /root/oci8-1.4.10/libtool --mode=compile cc  -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64  -DHAVE_CONFIG_H  -g -O2   -c /root/oci8-1.4.10/oci8.c -o oci8.lo
libtool: compile:  cc -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /root/oci8-1.4.10/oci8.c  -fPIC -DPIC -o .libs/oci8.o
/bin/sh /root/oci8-1.4.10/libtool --mode=compile cc  -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64  -DHAVE_CONFIG_H  -g -O2   -c /root/oci8-1.4.10/oci8_lob.c -o oci8_lob.lo
libtool: compile:  cc -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /root/oci8-1.4.10/oci8_lob.c  -fPIC -DPIC -o .libs/oci8_lob.o
/bin/sh /root/oci8-1.4.10/libtool --mode=compile cc  -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64  -DHAVE_CONFIG_H  -g -O2   -c /root/oci8-1.4.10/oci8_statement.c -o oci8_statement.lo
libtool: compile:  cc -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /root/oci8-1.4.10/oci8_statement.c  -fPIC -DPIC -o .libs/oci8_statement.o
/bin/sh /root/oci8-1.4.10/libtool --mode=compile cc  -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64  -DHAVE_CONFIG_H  -g -O2   -c /root/oci8-1.4.10/oci8_collection.c -o oci8_collection.lo
libtool: compile:  cc -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /root/oci8-1.4.10/oci8_collection.c  -fPIC -DPIC -o .libs/oci8_collection.o
/bin/sh /root/oci8-1.4.10/libtool --mode=compile cc  -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64  -DHAVE_CONFIG_H  -g -O2   -c /root/oci8-1.4.10/oci8_interface.c -o oci8_interface.lo
libtool: compile:  cc -I. -I/root/oci8-1.4.10 -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /root/oci8-1.4.10/oci8_interface.c  -fPIC -DPIC -o .libs/oci8_interface.o
/bin/sh /root/oci8-1.4.10/libtool --mode=link cc -DPHP_ATOM_INC -I/root/oci8-1.4.10/include -I/root/oci8-1.4.10/main -I/root/oci8-1.4.10 -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/12.1/client64  -DHAVE_CONFIG_H  -g -O2   -o oci8.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/oci8-1.4.10/modules  oci8.lo oci8_lob.lo oci8_statement.lo oci8_collection.lo oci8_interface.lo -Wl,-rpath,/usr/lib/oracle/12.1/client64/lib/ -L/usr/lib/oracle/12.1/client64/lib/ -lclntsh
libtool: link: cc -shared  -fPIC -DPIC  .libs/oci8.o .libs/oci8_lob.o .libs/oci8_statement.o .libs/oci8_collection.o .libs/oci8_interface.o   -L/usr/lib/oracle/12.1/client64/lib/ -lclntsh  -O2 -Wl,-rpath -Wl,/usr/lib/oracle/12.1/client64/lib/   -Wl,-soname -Wl,oci8.so -o .libs/oci8.so
libtool: link: ( cd ".libs" && rm -f "oci8.la" && ln -s "../oci8.la" "oci8.la" )
/bin/sh /root/oci8-1.4.10/libtool --mode=install cp ./oci8.la /root/oci8-1.4.10/modules
libtool: install: cp ./.libs/oci8.so /root/oci8-1.4.10/modules/oci8.so
libtool: install: cp ./.libs/oci8.lai /root/oci8-1.4.10/modules/oci8.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /root/oci8-1.4.10/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/oci8-1.4.10/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

[[email protected] oci8-1.4.10]#
Make install
[[email protected] oci8-1.4.10]# make install
Installing shared extensions:     /usr/lib64/php/modules/
[[email protected] oci8-1.4.10]#
[[email protected] oci8-1.4.10]# php -i | grep oci
/etc/php.d/20-oci8.ini,
/etc/php.d/30-pdo_oci.ini,
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
oci8
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100
oci8.events => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20
PDO drivers => mysql, oci, sqlite
PWD => /root/oci8-1.4.10
_SERVER["PWD"] => /root/oci8-1.4.10
[[email protected] oci8-1.4.10]#
Configure the oci8 extension 
[[email protected] php.d]# echo "extension=oci8.so" > 20-oci8.ini
[[email protected] php.d]#
Check the oci configuration
[[email protected] oci8-1.4.10]# php -i | grep oci
/etc/php.d/20-oci8.ini,
/etc/php.d/30-pdo_oci.ini,
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
oci8
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100
oci8.events => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20
PDO drivers => mysql, oci, sqlite
PWD => /root/oci8-1.4.10
_SERVER["PWD"] => /root/oci8-1.4.10
[[email protected] oci8-1.4.10]#

Check php module by running following command
[[email protected] oci8-1.4.10]# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
mcrypt
mhash
mysql
mysqli
mysqlnd
oci8
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_OCI
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

[[email protected] oci8-1.4.10]#


Tidak ada komentar :

Posting Komentar