NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_SERVER

David Krings ramons at gmx.net
Sun May 27 13:41:08 EDT 2007


Nate Abele wrote:
> Hi David,
> 
> This may or may not be helpful for your specific situation, but I wrote 
> a $_SERVER compatibility layer into Cake in the form of an env() 
> function, which you can check out here:
> 
> https://trac.cakephp.org/browser/branches/1.2.x.x/cake/basics.php#L978
> 
> It's not super-comprehensive, but it covers the basics, and uses 
> fallback accessors if the $_SERVER variable is disabled entirely (I know 
> Yahoo! does this, as there are some advantages in reduced overhead).

Thank you! This is sweet! Right now I use my script in a 'controlled' 
environment as I am the only one who uses it. I do plan on releasing it 
to the public at some point, especially after adding the modularized 
internationalization and the context sensitive help portion that is 
intended to work with MadCap Flare's WebHelp.
I need to make sure that it likely works on various servers and not only 
on a specific XAMPP version on the first Monday in March if the Friday 
before was full moon and the tide in San Diego is right.
I doubt it will be a big problem, after all there are as many PHP based 
image galleries as lines in Cake's basic.php.

I will need to investigate which keys/values I end up using in $_SERVER. 
Gee, we manage to standardize toilet seats, why not environment variables?

David





More information about the talk mailing list