Question

I'm trying to turn off magic_quotes_gpc in PHP. I'm running PHP with Apache and Ubuntu.

I have in my config file (/etc/php5/apache2/php.ini):

magic_quotes_gpc Off 

Where I create a page with phpinfo() it shows magic_quotes_gpc as on. I've also looked in Additional .ini files parsed and there is no setting for it.

Why is PHP ignoring this?

Was it helpful?

Solution

try to add/edit in php.ini

magic_quotes_gpc = Off 

after adding restart your apache services for taking effect this

You can turn them off using .htaccess with:

php_flag magic_quotes_gpc Off

and also using php if writable php.ini

ini_set('magic_quotes_gpc' , 0 );

OTHER TIPS

Firstly, it is deprecated so, don't rely on it. Mmmmmmmkay?

Secondly, Check

Loaded Configuration File

Under phpinfo()

enter image description here

Also Add :

php_flag magic_quotes_gpc Off to your .htaccess file.

Cool?

Did you recently make this change? If so, you have to restart PHP for it to take effect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top