Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 239 Big Data Appliance
- 1.9K Data Science
- 450.3K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 544 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.8K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.5K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 439 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
php 5.6 with oracle 11gR2 configuration

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
[[email protected] oci]# cd oci8-2.0.12/
[[email protected] oci8-2.0.12]# phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
[[email protected] 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
[[email protected] 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
Answers
-
Show the code for the login and show the attempt with error message/s
-
Don't forget to add /usr/lib/oracle/12.1/client64/lib to the library search path, perhaps by editing /etc/sysconfig/httpd (On RHEL or Oracle Linux) systems. Alternatively, if Instant Client is the only software on the machine, it can be easier just to use ldconfig:
sudo sh -c "echo /usr/lib/oracle/12.1/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf"sudo ldconfig