Richard
Richard

Reputation: 1259

PHP ignoring config file

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?

Upvotes: 0

Views: 321

Answers (3)

Rakesh Sharma
Rakesh Sharma

Reputation: 13728

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 );

Upvotes: 4

eds
eds

Reputation: 439

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

Upvotes: 0

Keval Domadia
Keval Domadia

Reputation: 4763

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?

Upvotes: 1

Related Questions