Portal Home > Knowledgebase > Your Control Panel > Enabling register_globals for your account


Enabling register_globals for your account




Quite many php written application requires register_globals to be turned ON for it to work. For security reasons, we have configured our servers to have register_globals to be disabled. However, if you wish to enable it for your account only, you can do so by following this steps:

STEP 1 - php.ini file

1. Open the directory which you need register_globals to be on using File Manager
2. Create (if not already there) a file named php.ini in that directory
3. Place this line in your php.ini file register_globals = on
4. Save it

STEP 2 - .htaccess file

What should my .htaccess file look like if my account is on a suPHP server?
You should remove the lines that begin with "php_value" and "php_flag". You will need to move these files to a file named php.ini and upload php.ini into your public_html directory. Then, add the following line into the .htaccess file in your public_html:

 

suPHP_ConfigPath /home/username/public_html

 

where "username" is your cPanel username. You will need to remove php_value and php_flag from ALL .htaccess files you may have. However, you only need to add the suPHP_ConfigPath line in the .htaccess file in your public_html directory only.

 

Please note that you will need to change the format of your php_value and php_flag lines into the php.ini format. (Refer to the FAQ entry on how your php.ini file should be formatted).

 

Keywords: register_globals register_global register global php



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Video Tutorials Test (Views: 158)

Powered by WHMCompleteSolution