NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_SERVER

Jon Baer jonbaer at jonbaer.com
Sun May 27 23:30:26 EDT 2007


Well I remembered it from a PHP internals talk I saw once and the  
same question was asked about how $_* variables are pushed up from  
the server layer.  Although Nate's solution is definitely what you  
want.  It makes sense though as you work up the stack to have common  
variables to depend on even if they need to be set in the environment.

- Jon

On May 27, 2007, at 1:30 PM, David Krings wrote:

> Jon Baer wrote:
>>  From what I recall this depends on what's thrown into it @ the  
>> SAPI handler level which you can view via source ...
>> http://lxr.php.net/source/php-src/sapi/
>> http://lxr.php.net/source/php-src/sapi/apache2handler/sapi_apache2.c
>> http://lxr.php.net/source/php-src/sapi/isapi/php5isapi.c
>
> Thanks, but are you sure about that being a PHP dependent thing? As  
> mentioned earlier I walked into the trap with EnginSrv, which is  
> fairly similar to IIS. I used the exact same PHP binaries on  
> EnginSrv as well as Apache and $_SERVER was different.
> And in NuSphere I replaced their stripped down stock PHP version  
> with the one from Luckasoft (which comes straight from php.net) and  
> $_SERVER is different in each instance using the internal server  
> and different again when using Apache.
> It seems to be server app dependent and PHP just packages up  
> anything it can get into a nice array. Or is that what you wanted  
> to point out? I'm not that versed in reading C code. :(
>
> David
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php




More information about the talk mailing list