Opened 12 years ago
Last modified 12 years ago
#35675 new defect
oci_connect(): OCIEnvNlsCreate() failed
Reported by: | sawright@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | oracle apache php5 | Cc: | |
Port: | oracle-instantclient php5-oracle |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I've been trying to add on Oracle connectivity to an existing webserver (php5, apache2) managed by macports successfully for years.
I installed 'oracle-instantclient' and 'php5-oracle'. phpinfo shows the oci library loaded, but when I try to connect to an external database, I get the error: "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 /path/to/oci.php on line 9 Fatal error: in /path/to/oci.php on line 12"
I've tried reloaded the oracle-instantclient (#23148), but that hasn't done anything.
I also tried using the 'php53-oracle' variant, but that didn't do anything to change the end result, either.
I also tried adding the DYLD path to various locations ('/opt/local/apache2/bin/envvars',.profile,etc.) as per the hint here 'http://lists.macosforge.org/pipermail/macports-users/2011-July/024699.html', still no luck.
Any idea what I can do to get this working?
Thanks!
Change History (1)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
You must indeed set the DYLD_LIBRARY_PATH (or DYLD_FALLBACK_LIBRARY_PATH) variable to the correct value, or it will not work.
If you are on Lion or later, you must run in 32-bit mode or Oracle will crash. For the php command line, this means using e.g. "arch -i386 php". For the Apache web server, this means putting the
arch
command into the appropriate Apache start script file.Other than that, I don't know.