Re: [PHP] $_ENV or getenv to get bash environmental variables.. change php.ini?? env vars

2008-07-23 Thread mike
On 7/23/08, mindspin311 <[EMAIL PROTECTED]> wrote:
>
> I want to be able to do a getenv('SYMFONY_HOME'); or any env var that I've
> setup in my /etc/bashrc for everyone. But apache obviously doesn't have a
> shell, so it doesn't know about these. only the stuff in $_ENV.
>
> What I want to know is how can I read env vars like ANT_HOME, JAVA_HOME,
> etc.. in php? I just need to be able to read symfony's root path so I can
> stop hard coding it into a config file in the project everytime I deploy to
> a new machine.

i believe you can add it to /etc/profile and restart apache (possibly
need to reboot, not sure) and those are global environment variables
everyone receives, including non-interactive shells and processes.

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



[PHP] $_ENV or getenv to get bash environmental variables.. change php.ini?? env vars

2008-07-23 Thread mindspin311

I want to be able to do a getenv('SYMFONY_HOME'); or any env var that I've
setup in my /etc/bashrc for everyone. But apache obviously doesn't have a
shell, so it doesn't know about these. only the stuff in $_ENV. 

What I want to know is how can I read env vars like ANT_HOME, JAVA_HOME,
etc.. in php? I just need to be able to read symfony's root path so I can
stop hard coding it into a config file in the project everytime I deploy to
a new machine.
-- 
View this message in context: 
http://www.nabble.com/%24_ENV-or-getenv-to-get-bash-environmental-variables..-change-php.ini---env-vars-tp18617784p18617784.html
Sent from the PHP - General mailing list archive at Nabble.com.


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