How do I enable magic_quotes_gpc (PHP)?


Since version 4.2.3 of PHP, the magic_quotes_gpc setting has been disabled by default on all new installations. As all our servers run a standard PHP installation, it is disabled.


However, if you are still using a software package that requires the setting to be enabled, (for example Joomla), then there are two ways to enable it on your account.


Via .htaccess


For further information about .htaccess files and how they work, take a look at the following article:

How do .htaccess files work in Plesk?


The normal method is to use a .htaccess file to change the PHP settings via the php_flag directive:


php_flag magic_quotes_gpc on

Just create the file .htaccess with the above contents in the directory where you are going to install the application (or in the root of the domain if you want it to take affect over the whole domain). To switch if off, either change on to off or remove the line or file.


Via Technical Support


If you're unsure about working with .htaccess files, and would like us to help, you can Submit a Ticket to our Support Team. We can either create the .htaccess file for you, or edit your domain's master Apache configuration file (the httpd.include file) which will switch the setting to on by default for the whole domain (although not any sub-domains - each one must be enabled separately).

  • 118 användare blev hjälpta av detta svar
Hjälpte svaret dig?

Relaterade artiklar

How do I enable register_globals (PHP)?

Since version 4.2.0 of PHP, the register_globals setting has been disabled by default on all new...

How do I enable magic_quotes_gpc (PHP)?

Since version 4.2.3 of PHP, the magic_quotes_gpc setting has been disabled by default on all...

How do I enable register_globals (PHP)?

Since version 4.2.0 of PHP, the register_globals setting has been disabled by default on all new...

How do I enable register_globals (PHP)?

Since version 4.2.0 of PHP, the register_globals setting has been disabled by default on all new...

How do I enable magic_quotes_gpc (PHP)?

Since version 4.2.3 of PHP, the magic_quotes_gpc setting has been disabled by default on all...