Hi All,
Cannot enable OCI8 after following steps mentioned in below document.
http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html
Linux version - Red Hat Enterprise Linux Server release 6.9
PHP – 5.3
Server version: Apache/2.2.15 (Unix)
Oracle Instant client – 11.2.0.4
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
--------------------------------------
# pecl install oci8-2.0.12 --with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib
Attempting to discover channel "--with-oci8=instantclient,/usr/lib/oracle/11.2/client64"...
Attempting fallback to https instead of http on channel "--with-oci8=instantclient,/usr/lib/oracle/11.2/client64"...
unknown channel "--with-oci8=instantclient,/usr/lib/oracle/11.2/client64" in "--with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib"
invalid package name/package file "--with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib"
downloading oci8-2.0.12.tar ...
Starting to download oci8-2.0.12.tar (1,615,360 bytes)
.....................................................................................................................................................................................................................................................................................done: 1,615,360 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
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] :
building in /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12
running: /tmp/pear/temp/oci8/configure --with-php-config=/usr/local/bin/php-config --with-oci8
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /usr/local/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.5.38, ok
checking OCI8 DTrace support... no
checking size of long int... 8
checking checking if we're on a 64-bit platform... yes
configure: WARNING: OCI8 extension: ORACLE_HOME is not set, looking for default Oracle Instant Client instead
checking Oracle Instant Client directory... /usr/lib/oracle/11.2/client64/lib
checking Oracle Instant Client SDK header directory... /usr/include/oracle/11.2/client64
checking Oracle Instant Client library version compatibility... 11.1
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... 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
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/libtool --mode=compile cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8.c -o oci8.lo
mkdir .libs
cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8.c -fPIC -DPIC -o .libs/oci8.o
/bin/sh /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/libtool --mode=compile cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_lob.c -o oci8_lob.lo
cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_lob.c -fPIC -DPIC -o .libs/oci8_lob.o
/bin/sh /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/libtool --mode=compile cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_statement.c -o oci8_statement.lo
cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_statement.c -fPIC -DPIC -o .libs/oci8_statement.o
/bin/sh /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/libtool --mode=compile cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_collection.c -o oci8_collection.lo
cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_collection.c -fPIC -DPIC -o .libs/oci8_collection.o
/bin/sh /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/libtool --mode=compile cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_interface.c -o oci8_interface.lo
cc -I. -I/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/oci8/oci8_interface.c -fPIC -DPIC -o .libs/oci8_interface.o
/bin/sh /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/include -I/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/main -I/tmp/pear/temp/oci8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/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 /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/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
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
creating oci8.la
(cd .libs && rm -f oci8.la && ln -s ../oci8.la oci8.la)
/bin/sh /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/libtool --mode=install cp ./oci8.la /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/modules
cp ./.libs/oci8.so /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/modules/oci8.so
cp ./.libs/oci8.lai /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/modules/oci8.la
PATH="$PATH:/sbin" ldconfig -n /tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/modules
----------------------------------------------------------------------
Libraries have been installed in:
/tmp/pear/temp/pear-build-root2QETxI/oci8-2.0.12/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'.
running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12" install
Installing shared extensions: /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12/usr/local/lib/php/extensions/no-debug-non-zts-20121212/
running: find "/tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12" | xargs ls -dils
128456 4 drwxr-xr-x. 3 root root 4096 Aug 10 09:21 /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12
128485 4 drwxr-xr-x. 3 root root 4096 Aug 10 09:21 /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12/usr
128486 4 drwxr-xr-x. 3 root root 4096 Aug 10 09:21 /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12/usr/local
128487 4 drwxr-xr-x. 3 root root 4096 Aug 10 09:21 /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12/usr/local/lib
128488 4 drwxr-xr-x. 3 root root 4096 Aug 10 09:21 /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12/usr/local/lib/php
128489 4 drwxr-xr-x. 3 root root 4096 Aug 10 09:21 /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12/usr/local/lib/php/extensions
128490 4 drwxr-xr-x. 2 root root 4096 Aug 10 09:21 /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12/usr/local/lib/php/extensions/no-debug-non-zts-20121212
128484 488 -rwxr-xr-x. 1 root root 497707 Aug 10 09:21 /tmp/pear/temp/pear-build-root2QETxI/install-oci8-2.0.12/usr/local/lib/php/extensions/no-debug-non-zts-20121212/oci8.so
Build process completed successfully
Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/oci8.so'
install ok: channel://pecl.php.net/oci8-2.0.12
configuration option "php_ini" is not set to php.ini location
You should add "extension=oci8.so" to php.ini
# make test
make: *** No rule to make target `test'. Stop.
# which make
/usr/bin/make
# grep extension= /etc/php.ini
; extension=modulename.extension
; extension=msql.so
; extension=/path/to/extension/msql.so
extension=mysql.so
extension=mysqli.so
extension=oci8.so
#
#
#
# grep extension_dir /etc/php.ini
; extension_dir = "./"
extension_dir="/usr/lib64/php/modules"
;sqlite3.extension_dir =
# ls -ltr /usr/lib64/php/modules
total 3824
-rwxr-xr-x. 1 root root 46840 Oct 3 2016 mcrypt.so
-rwxr-xr-x. 1 root root 83088 Jan 11 2017 zip.so
-rwxr-xr-x. 1 root root 34056 Jan 11 2017 xsl.so
-rwxr-xr-x. 1 root root 46736 Jan 11 2017 xmlwriter.so
-rwxr-xr-x. 1 root root 30096 Jan 11 2017 xmlreader.so
-rwxr-xr-x. 1 root root 33320 Jan 11 2017 wddx.so
-rwxr-xr-x. 1 root root 44368 Jan 11 2017 sqlite3.so
-rwxr-xr-x. 1 root root 261392 Jan 11 2017 phar.so
-rwxr-xr-x. 1 root root 24640 Jan 11 2017 pdo_sqlite.so
-rwxr-xr-x. 1 root root 102456 Jan 11 2017 pdo.so
-rwxr-xr-x. 1 root root 30112 Jan 11 2017 pdo_mysql.so
-rwxr-xr-x. 1 root root 54408 Jan 11 2017 mysql.so
-rwxr-xr-x. 1 root root 136832 Jan 11 2017 mysqli.so
-rwxr-xr-x. 1 root root 36200 Jan 11 2017 json.so
-rwxr-xr-x. 1 root root 328784 Jan 11 2017 gd.so
-rwxr-xr-x. 1 root root 1843120 Jan 11 2017 fileinfo.so
-rwxr-xr-x. 1 root root 170360 Jan 11 2017 dom.so
-rwxr-xr-x. 1 root root 66448 Jan 11 2017 curl.so
-rwxr-xr-x. 1 root root 497707 Aug 10 10:21 oci8.so
#
---------------------------------
restarted Apache and tested phpinfo.php don't show oci8 enable.
Please let me know if any more steps needs to be performed.
Regards,
Moazzam.