Thursday, April 28, 2011

How to turn off magic quotes in PHP configuration file? I am using XAMPP.

What is the file? I have php.ini and php.ini-dist on my computer.

From stackoverflow
  • php.ini-dist is the sample config file that comes with PHP, php.ini is the live config so you will need to set in this file

    magic_quotes_gpc = off
    magic_quotes_runtime = off
    magic_quotes_sybase = off
    
    middaparka : Depending our your configuration, you'll also most likely need to restart your webserver for these changes to take effect. :-)
    Steven : I changed the three equations to "off" and I restarted my web server, but the change doesn't take effect.
    middaparka : OK, it sounds like you'll need to check that PHP is reading the ini file you've updated. Simply output a page with on it and this will list both the ini file in use and the magic quotes related settings.
    Steven : Good suggestion. Thank Middaparka and Tim.
    Steven : I have resolved the problem with the help of you both.

0 comments:

Post a Comment