↑ Return to Buku PHP & MySQL

Enable or Disable magic_quotes_gpc

1. Login into your FTP account using an FTP program
2. Modify your .htaccess file in the html folder and do the following:

You can disable magic_quotes_gpc in the .htaccess file by adding:
# Disable magic_quotes_gpc
php_flag magic_quotes_gpc off

If your PHP script needs magic_quotes_gpc enabled, you can enable it in the .htaccess file by adding:
# Enable magic_quotes_gpc
php_flag magic_quotes_gpc on

If you get a 500 internal server error once you have put the above settings in your .htaccess file, remove them from the .htaccess file and add the following to your php file:
To disable:
ini_set (‘magic_quotes_gpc’, 0);
To enable:
ini_set (‘magic_quotes_gpc’, 1);

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Captcha Garb (1.5)