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

.htaccess URL Masking Examples

If you would like to access a specific URL for your domain but do not display it in the browser's...

Leverage Browser Caching using .htaccess

Add the following .htaccess rules to the very end of your .htaccess file to reduce the load times...

.htaccess RewriteRule Examples

Here are some useful mod_rewrite RewriteRule redirect examples that you can use in your .htaccess...

Force a Directory to load in HTTPS SSL

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

Resolving XMLRPC DDoS WordPress Attack with .htaccess

Brute Force Attacks against WordPress have always been very common.Here is how to temporarily...