Re: replacing pearweb ENV variables with SERVER
| From: | Greg Beaver | Date: | Mon, 10 Aug 2009 18:18:18 +0000 |
| Subject: | Re: replacing pearweb ENV variables with SERVER | ||
| References: | 1 2 3 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-6604@lists.php.net to get a copy of this message | ||
Christian Weiske wrote:
> Hi Greg,
>
>
>>> What I propose is to do the same for every other setting in
>>> pear-config.php that uses $_ENV. Objections?
>> That's fine. There is no way to unit test pearweb, because there's no
>> way to inject $_SERVER in cgi that I've found.
> Sorry, I did not know that. Now using $_ENV makes sense - for unit
> tests. Do you happen to know if one can set $_ENV from within the
> server configuration? I found no way. Using SetEnv in apache sets
> $_SERVER only.
>
>> Not that it matters,
>> it's like unit testing the federal government here: even though the
>> tests are written, nobody is going to run them.
> This is not true anymore. Now that we have our test and continuous
> integration box, we'll set up regular test runs for pearweb as well.
Well then the solution is to do this:
1) if $_ENV[blah] is set, use it
2) if $_SERVER[blah] is set, use it
:)
Greg