Hi, Le Wed, 14 Mar 2007 17:37:02 -0500 (CDT), "Richard Lynch" <[EMAIL PROTECTED]> a écrit : > PHP runs as its own user in its own environment. > > Stuff you cram into your environment has no effect on that, as it > should be. > > If you alter the environment of the PHP user you might get what you > want. > > You may also be able to use http://php.net/setenv > > And http://php.net/getenv is probably faster than your exec. > > Setting the env up in httpd.conf and/or php.ini and/or .htaccess > should work. httpd.conf for sure, others I think.
Yes, great... Now, I have another problem ;-)
In Debian, everything is ok. I put my variable
in /etc/apache2/httpd.conf.
But on RedHat, I don't know which file is concerned...
So, I've searched in php.ini, but I did not find a place where I can
put variables...
Do you know which is the equivalent of /etc/apache2/httpd.conf on
RedHat ?
And is it possible (and how ;-)) to put variables in the php.ini ?
Thank you very much.
David.
> On Wed, March 14, 2007 9:32 am, David BERCOT wrote:
> > Hi,
> >
> > I'd like to read an environment variable with PHP.
> > I've tried with :
> > exec ('echo $CONTEXTE_D_EXECUTION',$result);
> > $result is empty !!!
> >
> > I've put the variable in /etc/environment, in /etc/profile,
> > in /etc/bash.bashrc but nothing worked...
> >
> > Do you have any idea ?
> >
> > If it is not possible, I suppose I can put a variable in php.ini ?
> >
> > Thank you very much.
> >
> > David.
> >
>
>
signature.asc
Description: PGP signature

