Disabling Magic Quotes GPC

How to turn off magic quotes gpc (required by Joomla 3 and some other scripts).

1. Create a php.ini file in your script's root directory with the following:

magic_quotes_gpc = Off
extension=pdo.so
extension=pdo_mysql.so


2. Create/Edit .htaccess file in your script's root directory and add the following lines at the top:

<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/YourUsername/public_html
 <Files php.ini>
  order allow,deny
  deny from all
 </Files>
</IfModule>

Was this answer helpful?

Also Read

Force a Directory to load in HTTPS SSL

Use the following .htaccess code to force a particular directory to load in HTTPS/SSL mode. #...

Do you support mod_rewrite for apache?

Yes, mod_rewrite is enabled on your server. For more information on what mod_rewrite is and how...

How to execute php code as .htm or .html files

In your .htaccess file insert this line of code. addhandler application/x-httpd-php .htm .html

Block visitors by IP address using .htaccess

Deny access based upon IP address, or an IP block, by placing the following code into your...

Block Bad Bots and Spiders using .htaccess

Below is a useful code block for blocking a lot of the known bad bots and site rippers currently...