PHP Classes

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

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 38%Total: 1,467 All time: 2,660 This week: 48Up
Version License Categories
webserverinfo 1.0GNU Lesser Genera...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
  Performance   Level  
Name: Svetoslav Marinov <contact>
Classes: 7 packages by
Country: Canada Canada
Age: 42
All time rank: 715 in Canada Canada
Week rank: 76 Down2 in Canada Canada Up
Innovation award
Innovation award
Nominee: 4x

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,467
This week:0
All time:2,660
This week:48Up
 User Ratings  
 
 All time
Utility:50%StarStarStar
Consistency:41%StarStarStar
Documentation:41%StarStarStar
Examples:50%StarStarStar
Tests:-
Videos:-
Overall:38%StarStar
Rank:3106