Re: [PHP-DB] Php, Oracle on Mac, with strange behaviour

2009-03-15 Thread Christopher Jones



Chris wrote:
Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. 
There is something wrong with your system - please check that 
LD_LIBRARY_PATH includes the directory with Oracle Instant Client 
libraries in/Library/WebServer/Documents/oracle.php on line 25   
Oracle Connect Error





putenv("LD_LIBRARY_PATH=/opt/oracle/instanceclient");


I'd guess you probably need this in apache's start up script, not in php 
(where that is on a mac setup I have no idea).


You could also try it in your virtual host:

http://httpd.apache.org/docs/2.2/mod/mod_env.html#setenv

SetEnv LD_LIBRARY_PATH /opt/oracle/instanceclient



I agree that using putenv() for Environment variables in scripts is bad.
On Mac, I think you need DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH.
See http://www.oracle.com/technology/pub/articles/bibbs-php-leopard.html

Chris

--
Email: christopher.jo...@oracle.com  Tel: +1 650 506 8630
Twitter:  http://twitter.com/ghrdFree PHP Book: http://tinyurl.com/UGPOM

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Php, Oracle on Mac, with strange behaviour

2009-03-15 Thread Chris
Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. 
There is something wrong with your system - please check that 
LD_LIBRARY_PATH includes the directory with Oracle Instant Client 
libraries in/Library/WebServer/Documents/oracle.php on line 25   
Oracle Connect Error





putenv("LD_LIBRARY_PATH=/opt/oracle/instanceclient");


I'd guess you probably need this in apache's start up script, not in php 
(where that is on a mac setup I have no idea).


You could also try it in your virtual host:

http://httpd.apache.org/docs/2.2/mod/mod_env.html#setenv

SetEnv LD_LIBRARY_PATH /opt/oracle/instanceclient

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php