Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Env Variables



At 12:35 PM -0700 5/31/01, Justin Kelley wrote:
>I'm fairly new to Linux and Darwin and wondered if you guys could answer a
>question here. If I have an environment variable that I want the web server
>to see on boot and restart, in this case
>DYLD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib then where would I set that? I
>can set it by hand in the terminal, but the variable is no longer in effect
>once I log out, and it only affects terminal commands then rather then
>apache/webserving. Any help is much appreciated


Set the variable in whatever shell script is starting apache.

Environment variables are inherited. The first process run at boot is mach_init, and shortly after that, /etc/rc is run through a shell. /etc/rc starts a ton of stuff, including SystemStarter, which will look in /System/Library/StartupItems/ and start Apache (as well as a bunch of other things.)

If you put it in /etc/rc, it will be inherited by everything. But you probably don't want to do that. If you put it in /System/Library/StartupItems/Apache/Apache, it will get used by Apache and any processes that Apache starts.

-pmb


References: 
 >Re: Thanks . (From: Eugene Lee <email@hidden>)
 >Env Variables (From: Justin Kelley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.

dyld heap