Re: Php, Oracle on Mac, with strange behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for your replies.
In my desperation, I declared those environment variables in as many places as I could think of. The script (Although I know I shouldnt), php.ini and also the apache httpd.conf file:

SetEnv ORACLE_HOME /opt/oracle/instanceclient
SetEnv DYLD_LIBRARY_PATH /opt/oracle/instanceclient
SetEnv LD_LIBRARY_PATH /opt/oracle/instanceclient
SetEnv ORACLE_BASE /opt/oracle/instanceclient

But given that it works on the command line, but not through the browser, I think that the environment variables must be set correctly.

Cheers
Mark


On 16 Mar 2009, at 1:26 AM, Christopher Jones wrote:



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
<snip>
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.jones@xxxxxxxxxx  Tel: +1 650 506 8630
Twitter:  http://twitter.com/ghrd    Free PHP Book: http://tinyurl.com/UGPOM

_____________________________

Mark Halling-Brown
Higher Scientific Officer,
Computational Biology & Chemogenomics, Cancer Therapeutics,
The Institute of Cancer Research
15 Cotswold Road
Belmont, Surrey SM2 5NG, UK
Tel: (+44)-20-8722-4300 (ext: 4659)
Email: mhallingbrown@xxxxxxxxx
Web: http://www.markyhb.co.uk

"A cynic is what an idealist calls a realist"


The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux