المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How to disable/turn off register_globals for PHP



Rise Company
27-01-2016, 00:33
How to disable/turn off register_globals for PHP Problem: You have register_globals turned 'on' on your host but wish to disable it, or you are seeing this error message in your Website Publisher dashboard:

'register_globals' for PHP is currently turned on. This is not a secure PHP configuration and is known to cause issues with this product. Please ask your webhost to turn this option off.

Solution:
This is an issue with your host. You can try to resolve it yourself using one of the methods below, but not all webhosts 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:

[PHP]
register_globals=0;
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.

Rise Company
27-01-2016, 00:37
Login to cPanel.
Click on php.ini QuickConfig in the "Software/Services" section.
Enable QuickConfig if not already enabled.
Change the settings that you want to change.
Click the Save Changes button to save your changes.

In my cpanel php configuration is in php.ini EZConfig

and I successfully installed joomla 3.