Hey,
Instant client is installed under (/opt/oracle/product/12.1.0/client). I tried
to install oci8 with pecl but I get an error:
# /usr/local/php5/bin/pecl install oci8
No releases for package "pecl/oci8" exist
install failed
Installing from source also failed but I did try to install 2.0.0. I was able
to compile it but ldd shows me some libs were not found:
root@zone-eu4# ldd oci8.so
libclntsh.so.12.1 =>
/opt/oracle/product/12.1.0/client/libclntsh.so.12.1
libc.so.1 => /lib/libc.so.1
libgcc_s.so.1 => /usr/sfw/lib/libgcc_s.so.1
libnnz12.so => (file not found)
libons.so => (file not found)
libkstat.so.1 => /lib/libkstat.so.1
libnsl.so.1 => /lib/libnsl.so.1
libsocket.so.1 => /lib/libsocket.so.1
libresolv.so.2 => /lib/libresolv.so.2
libgen.so.1 => /lib/libgen.so.1
libdl.so.1 => /lib/libdl.so.1
libsched.so.1 => /usr/lib/libsched.so.1
librt.so.1 => /lib/librt.so.1
libaio.so.1 => /lib/libaio.so.1
libpool.so.1 => /usr/lib/libpool.so.1
libadm.so.1 => /lib/libadm.so.1
libefi.so.1 => /lib/libefi.so.1
libm.so.2 => /lib/libm.so.2
libclntshcore.so.12.1 => (file not found)
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
libxml2.so.2 => /usr/lib/libxml2.so.2
libnvpair.so.1 => /lib/libnvpair.so.1
libexacct.so.1 => /usr/lib/libexacct.so.1
libuuid.so.1 => /lib/libuuid.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libpthread.so.1 => /lib/libpthread.so.1
libz.so.1 => /usr/lib/libz.so.1
Although libnnz12 is found in oracle instant client path:
root@zone-eu4# find / -name libnnz12.so
/usr/local/lib/libnnz12.so
/opt/oracle/product/12.1.0/client/libnnz12.so
Its the same for libclntshcore.so.12.1. When restarting apache I get this error
(which is normal I guess):
[12-Aug-2013 09:50:09 UTC] PHP Warning: PHP Startup: Unable to load dynamic
library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/oci8.so'
- ld.so.1: php: fatal: libnnz12.so: open failed: No such file or directory in
Unknown on line 0
This just appeared to me. I just tried to compile oci8 from source (version
1.4.10) and after make I am asked to run make test. So I do and this is the
output:
SKIP statement cache [tests/statement_cache.phpt] reason: oci8 extension is not
available
SKIP oci_statement_type() [tests/statement_type.phpt] reason: no oci8 extension
SKIP ocistatementtype() [tests/statement_type_old.phpt] reason: no oci8
extension
SKIP Exercise OCIPing functionality on reconnect (code coverage test)
[tests/testping.phpt] reason: no oci8 extension
SKIP uncommitted connection [tests/uncommitted.phpt] reason: no oci8 extension
SKIP Basic XMLType test [tests/xmltype_01.phpt] reason: oci8 extension is not
available
SKIP Basic XMLType test #2 [tests/xmltype_02.phpt] reason: oci8 extension is
not available
=====================================================================
TIME END 2013-08-13 06:57:05
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 0
Exts tested : 42
---------------------------------------------------------------------
Number of tests : 315 0
Tests skipped : 315 (100.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 0 ( 0.0%) ( 0.0%)
ALL tests are skipped. Any idea's? Make install runs but the output is the same
as above (from ldd).
Thanks for all the help already!
Kas
> Date: Mon, 12 Aug 2013 09:13:32 -0700
> From: [email protected]
> To: [email protected]
> CC: [email protected]; [email protected]
> Subject: Re: [PHP-INSTALL] installing php 5.5.1 on to solaris 10 results in
> error during make
>
>
>
> On 08/12/2013 09:08 AM, Eugene M. Zheganin wrote:
> > Hi.
> >
> > On 12.08.2013 20:45, KAs Coenen wrote:
> >> Reinstalled openssl in 64bit with shared libs, libiconv and added zlib.
> >> Now everything ran fine. I still have other questions (not related to php
> >> install) about how to add oci as module. Where can I ask such things?
> > You can install it from PECL, you can build it with PHP (statically or as
> > shared extension). Both ways should suit your needs. But you need to have
> > installed Oracle database client, or at least Instant client on your server.
> >
> > Eugene.
>
> Using PECL as a shared extension is currently the best plan for OCI8 because
> of the release schedules/statuses of the PHP branches and of OCI8. Using PECL
> will let you easily update OCI8 to the latest versions as they are released.
>
> For example, the OCI8 2.0 extension (which is in 'developer' preview on PECL)
> is not likely to be merged back to the PHP 5.4 code bundles, even though it
> works with PHP 5.x.
>
> Chris
>
> --
> [email protected] http://twitter.com/ghrd
> Free PHP & Oracle book:
> http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html