Your PHP configuration has magic quotes , which is an obsolete parameter that no one else should use. It was removed in PHP 5.4. Disconnect now , or you risk writing code that will not work correctly when upgrading to PHP 5.4.
If this is not possible, use the stripslashes() value before doing anything else with it. Do this only if you really cannot turn off magic quotes. Developing PHP software with magic quotes included is a very, very bad idea.
If you are trying to write good code and be reliable in the future, place it as the top of each file or some common include file that is used everywhere:
if (get_magic_quotes_gpc()) { trigger_error("Magic quotes are enabled; please disable them.", E_USER_ERROR); }
This will make your application simply refuse to start if magic quotes are included.
If you have the option, send the .htaccess file with your application, which contains the following:
php_flag magic_quotes_gpc Off
This will, if possible, disable magic quotes for your entire application when it is depoluted on Apache. If the Apache configuration does not allow php_flag directives in .htaccess , then this will result in an HTTP 500 error, which is much better than letting your application run magic quotes.
source share