[Phpmyadmin-devel] Re: about the absence of config.inc.php

Sebastian Mendel lists at sebastianmendel.de
Tue Apr 11 07:16:05 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michal ?iha? schrieb:
> Hi
> 
> On Tue, 11 Apr 2006 15:27:39 +0200
> Sebastian Mendel <lists at sebastianmendel.de> wrote:
> 
>> Michal ?iha? schrieb:
>>> On Tue, 11 Apr 2006 14:45:28 +0200
>>> Sebastian Mendel <lists at sebastianmendel.de> wrote:
>>>
>>>> the reason why i dropped check for $_SERVER/$_ENV was i thoguth there is
>>>> no need for this function-call-overhead for checking this arrays - as
>>>> normally getenv() should always work.
>>> getenv can not work when something is _only_ a server variable but not
>>> in environment.
>> What do you exactly mean with 'server' and 'environment'?
>>
>> no $_SERVER variable is in $_ENV
> 
> and variable not in _ENV is not returned by getenv.
> 
> Just try this code:
> 
> 
> foreach($_SERVER as $key => $val) {
>         if ($val != getenv($key)) {
>                 echo "$key differs from _SERVER\n";
>                 echo "$key = $val / " . getenv($key) . "\n";
>         }
> }
> foreach($_ENV as $key => $val) {
>         if ($val != getenv($key)) {
>                 echo "$key differs from _ENV\n";
>                 echo "$key = $val / " . getenv($key) . "\n";
>         }
> }
> 
> Most likely some variables from _SERVER are not available throught
> getenv:
> 
> SCRIPT_NAME differs from _SERVER
> SCRIPT_NAME = test.php /
> SCRIPT_FILENAME differs from _SERVER
> SCRIPT_FILENAME = test.php /

this booth works for me with getenv() (egual in getenv() end $_SERVER),

wired

PHP_* seems clear, as they are not really 'environment' variables


- --
Sebastian Mendel

www.sebastianmendel.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFEO7mzX/0lClpZDr4RAuu+AJ0VPHDv5mhFcCkNQbkXS6LcYF/XGgCgmk/i
PbGXLRMhxf2S5xfvBiijzRk=
=aUb/
-----END PGP SIGNATURE-----




More information about the Developers mailing list