简体   繁体   中英

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?

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

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

Secondly, Check

Loaded Configuration File

Under phpinfo()

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM