PHP Classes

reGlobal: Register request vars when register_globals is off

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2004-03-22 (11 years ago) RSS 2.0 feedNot enough user ratingsTotal: 554 All time: 5,142 This week: 1,076Up
Version License Categories  
reglobal 1.0GNU Lesser Genera...HTTP, Utilities and Tools
Description Author  

When register_globals option is On in php.ini, PHP automatically fills variables like $userName with $HTTP_GET_VARS["username"], and so on. As it represents a security concern, the default value of this option is Off since PHP version 4.2.

This class provides two solutions to emulate the setting of register_globals On under PHP installations that have it disabled.

The first solution consists assigning the respective request global variables for the pages that depend on the effect of having register_globals option enabled.

The second solution consists on modifying consists on modifying automatically the current script source code to include statements that require the assignment of some global variables so this class is no longer needed.

See the PHP manual on the risks of having the register_globals option enabled.

Picture of Logan Dugenoux
Name: Logan Dugenoux <contact>
Classes: 6 packages by
Country: France France
Age: ???
All time rank: 735 in France France
Week rank: 435 Down17 in France France Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example reGlobals example file
Accessible without login HTML file reGlobals.html Doc. reGlobals documentation
Plain text file reGlobals.php Class reGlobals class source

 Version Control Unique User Downloads Download Rankings  
 0%Total:554All time:5,142
 This week:0This week:1,076Up