Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

php 5.6 with oracle 11gR2 configuration

User194259Oct 24 2017 — edited Oct 30 2017

Hi All,

I have to configure php 5.6 with Oracle 11.2.0.4 I installed oracle client 12.1 and compiled oci8 but unable to connect to database.

export PATH=/opt/apache/php/bin:$PATH

[root@moodle-app oci]# cd oci8-2.0.12/

[root@moodle-app oci8-2.0.12]# phpize

Configuring for:

PHP Api Version:         20131106

Zend Module Api No:      20131226

Zend Extension Api No:   220131226

[root@moodle-app oci8-2.0.12]# ./configure --with-oci8=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... /opt/apache/php

checking for PHP includes... -I/opt/apache/php/include/php -I/opt/apache/php/include/php/main -I/opt/apache/php/include/php/TSRM -I/opt/apache/php/include/php/Zend -I/opt/apache/php/include/php/ext -I/opt/apache/php/include/php/ext/date/lib

checking for PHP extension directory... /opt/apache/php/lib/php/extensions/no-debug-zts-20131226

checking for PHP installed headers prefix... /opt/apache/php/include/php

checking if debug is enabled... no

checking if zts is enabled... no

checking for re2c... re2c

checking for re2c version... 0.13.5 (ok)

checking for gawk... gawk

checking for Oracle Database OCI8 support... yes, shared

checking PHP version... 5.6.5, ok

checking OCI8 DTrace support... no

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 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

config.status: config.h is unchanged

[root@moodle-app oci8-2.0.12]# make install

/bin/sh /opt/oci/oci8-2.0.12/libtool --mode=install cp ./oci8.la /opt/oci/oci8-2.0.12/modules

cp ./.libs/oci8.so /opt/oci/oci8-2.0.12/modules/oci8.so

cp ./.libs/oci8.lai /opt/oci/oci8-2.0.12/modules/oci8.la

PATH="$PATH:/sbin" ldconfig -n /opt/oci/oci8-2.0.12/modules

----------------------------------------------------------------------

Libraries have been installed in:

   /opt/oci/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.

----------------------------------------------------------------------

Installing shared extensions:     /opt/apache/php/lib/php/extensions/no-debug-zts-20131226/

Already modify php.ini with

extension=/opt/oci/oci8-2.0.12/modules/oci8.so

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2017
Added on Oct 24 2017
2 comments
3,639 views