Login   Register  
PHP Classes
elePHPant
Icontem

Web Server Info: Fix request values to work with different servers

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2006-11-19 (7 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,424 All time: 2,541 This week: 1,420Up
Version License Categories  
webserverinfo 1.0GNU Lesser General Publ...HTTP, System information
Description Author  

This class can be used to fix the values of super-global variables so they have the same values independently of the Web server.

It can:

- Fixes PATH_TRANSLATED variable to use only / as path separator
- Set the REQUEST_URI to SCRIPT_NAME or QUERY_STRING when the REQUEST_URI is not set
- Set the SERVER_SIGNATURE with values based on SERVER_SOFTWARE, SERVER_NAME, and SERVER_PORT when SERVER_SIGNATURE is not set
- Set SCRIPT_FILENAME based on PATH_TRANSLATED when SCRIPT_FILENAME is not set
- Set DOCUMENT_ROOT based on REQUEST_URI and PATH_TRANSLATED when DOCUMENT_ROOT is not set

Innovation Award  
PHP Programming Innovation award winner
November 2006
Winner


Prize: One copy of the Zend Studio
PHP can run with different Web servers in different modes. Each Web server may set different environment variables with details about each HTTP request. This makes more difficult to develop Web server independent applications.

This class provides a solution to this problem. It rewrites certain PHP super-globals that store environment variables set by the Web server.

This way, applications do not need to be adapted to run with different Web servers.

Manuel Lemos
Picture of Svetoslav Marinov
Name: Svetoslav Marinov <contact>
Classes: 6 packages by
Country: Canada Canada
Age: 33
All time rank: 675 in Canada Canada
Week rank: 219 Down4 in Canada Canada Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example1.php Example example1
Accessible without login Plain text file example2.php Example example2
Accessible without login Plain text file example3.php Example example3
Accessible without login Plain text file LICENSE Lic. LICENSE
Accessible without login Plain text file README Doc. README
Plain text file WebServerInfo.class.php Class WebServerInfo class

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,424All time:2,541
 This week:0This week:1,420Up