Hello
Having some setup problems with php (any version) and oracle instant client on macOS Sierra and ElCapitan.
I've installed instant client, set necessary envvars: ORACLE_HOME,DYLD_LIBRARY_PATH. sqlplus works fine.
After that I've compiled php with oci8 support and its works fine if I'm running scripts directly using php interpreter.
But in some cases I'm getting error like this:
/usr/local/bin/php composer.phar test
Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that DYLD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in /Users/www/Documents/PhpProjects/Oci8/src/Oci8/Oracle/DataObject.php on line 52
PHP Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that DYLD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in /Users/www/Documents/PhpProjects/Oci8/src/Oci8/Oracle/DataObject.php on line 52
Here is my phpinfo quotes:
phpinfo()
PHP Version => 7.1.0RC3
System => Darwin imc.local 16.0.0 Darwin Kernel Version 16.0.0: Mon Aug 29 17:56:20 PDT 2016; root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
Build Date => Oct 1 2016 17:42:43
Configure Command => './configure' '--enable-intl' '--with-oci8=shared,instantclient,/usr/local/oracle/instantclient_11_2' '--enable-opcache=no' '--enable-sigchild' '--enable-mbstring' '--with-xsl' '--with-gd' '--with-config-file-scan-dir=/etc/php' '--with-curl' '--with-openssl=/usr/local/Cellar/openssl/1.0.2h_1' '--with-zlib' '--enable-zip' '--enable-debug'
Server API => Command Line Interface
Virtual Directory Support => disabled
...
oci8
OCI8 Support => enabled
OCI8 DTrace Support => disabled
OCI8 Version => 2.1.2
Revision => $Id: 0527b558474b9602dac1cbae9d6544f6d1ee3f7e $
Oracle Run-time Client Library Version => 11.2.0.4.0
Oracle Compile-time Instant Client Version => 11.2
Directive => Local Value => Master Value
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
...
Anyone can say how to correctly setup php with oci8 support on macOS Sierra/El Capitan and avoid this errors?