How to disable magic_quotes_gpc on my DirectAdmin server?

The most straight way to disable magic_quotes_gpc on your dedicated server is to do it in the php.ini however it is not the case with DirectAdmin.

Even if you disable it in php.ini it will get commented out after you recompile php. And since it is commented out, by default it is enabled. 9You can find the official position of DirectAdmin re this topic here)

So, you will have to disable magic_quotes_gpc directly through .htaccess file for each of your domains manually.

To do it, place the .htaccess file in the root folder of the domain (i.e. public_html) and place the following code on a separate line:

php_value magic_quotes_gpc off


This will turn magic quotes off for this articular domain.

  • 28 Users Found This Useful
Was this answer helpful?

Related Articles

How to assign a User an 'owned' IP address

If you're trying to setup a User with an SSL certificate, you'll need to assign the User an owned...

I want to have the DirectAdmin version of Awstats

To install it, you login to ssh as root and type: cd /usr/local/directadmin/scripts ./

Creating your own service monitor

Many admins run extra pieces of software that DA does not check for, to make sure it's running....

How to customize the output of webalizer

DirectAdmin uses the default webalizer settings by not specifying a webalizer.conf file at all....

How can I edit all of the templates, messages, and default index.html pages?

If you're looking to customize the look and feel to the data that is used for your users, this...