How to Disable/Turn Off register_globals for TomatoCart
Written by Jack Yin Saturday, 10 November 2012
reigter_globals is turned on
Some users face the problem as installing the TomatoCart on the host that enable the reigter_globals. This is not a secure PHP configuration and is known to cause issues in TomatoCart.
This is an issue with your host. You can try to resolve it yourself using one of the methods below, but not all web hosts allow you to use these options so you might need to contact your host directly to request they disable ‘register_globals’ for PHP if the below methods do not work.
Method 1: The php.ini file
In a text editor, such as Windows Notepad (but not a “rich text editor” like MS Word), create a new document with the following contents:
Now save the file as php.ini and upload it to the base directory of your website. Reload your Website Publisher control panel to see if the error message is still there. If it has disappeared you have successfully disabled ‘register_globals’. If the message is still there you can attempt method 2.
Method 2: The .htaccess file
Interspire Website Publisher comes with a .htaccess file for controlling the search engine friendly URLs. This file can be used for a variety of server related things, and some webhosts will allow you to define PHP settings through them. So open up the file and create a new line at the very top with this:
php_flag register_globals off
Refresh your control panel and website. If you get an ‘Internal Server Error’ it means you host has restricted your hosting to not allow PHP configuration changes. You will need to remove the line you just put in your .htaccess file and contact your host to disable ‘register_globals’ for PHP.
If you refreshed and the error message is gone, then your website has allowed you to use the .htaccess file for this purpose and Website Publisher should function correctly.