Re: Php, Oracle on Mac, with strange behaviour

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

 



Hi Mark,

you are right /System/Library/LaunchDaemons/org.apache.httpd.plist will not work in your case, it's for the Mac OS X supplied Apache. In your case you can edit /usr/local/apache2/bin/apachectl adding the following:

DYLD_LIBRARY_PATH=/opt/oracle/instanceclient
LD_LIBRARY_PATH=/opt/oracle/instanceclient
ORACLE_BASE=/opt/oracle/instanceclient
ORACLE_HOME=/opt/oracle/instanceclient
export DYLD_LIBRARY_PATH LD_LIBRARY_PATH ORACLE_BASE ORACLE_HOME

(note: As Chris Jones mentioned LD_LIBRARY_PATH is not used on OS X, however there is no harm in having it set)

Place the above some where near the top of apachectl, I cannot tell you exactly since fink will not install and MacPorts does not build SQLite3. Restart apache and you should see the correct values in getenv() or phpinfo().

regards

grant


On/El 16/03/09 12:13, Mark Halling-Brown wrote/escribió:
Hi Grant,

Thanks to your instructions, I am making a bit of progress.
I have entered the PassEnv commands into the https.conf.:
SetEnv DYLD_LIBRARY_PATH /opt/oracle/instanceclient
SetEnv LD_LIBRARY_PATH /opt/oracle/instanceclient
PassEnv DYLD_LIBRARY_PATH
PassEnv LD_LIBRARY_PATH

It now seems that this variable is passed through correctly, but it is not as I set it. Instead it states:
DYLD_LIBRARY_PATH: /usr/local/apache2/lib:

I restart apache as root user (sudo /usr/local/apache2/bin/apachectl restart) and it complains that: [Mon Mar 16 11:08:53 2009] [warn] PassEnv variable LD_LIBRARY_PATH was undefined

So I am guessing that root has not picked up any of the environment variables that I have set in various places around my system. I have put DYLD_LIBRARY_PATH in /etc/bashrc ~/.bash_profileetc, but I still seems root doesn't know about them.

Have you any idea where I need to set these variables (Is there a root home directory I can edit a bash_profile or something?)

I did edit the /System/Library/LaunchDaemons/org.apache.httpd.plist file, but the apache I am using was compiled from source, so I fear it wont work list that plist?

Thanks for all your help
Mark



--
Grant Croker - Ingres PHP and Ruby maintainer
http://blogs.planetingres.org/grant
It was so much easier to blame it on Them. It was bleakly depressing to think that They were Us. If it was Them, then nothing was anyone's fault. If it was us, what did that make Me? After all, I'm one of Us. I must be. I've certainly never thought of myself as one of Them. No one ever thinks of themselves as one of Them. We're always one of Us. It's Them that do the bad things.
    -- Terry Pratchett, Jingo


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

  Powered by Linux