[英]PHP ignoring config file
I'm trying to turn off magic_quotes_gpc in PHP. 我正在尝试在PHP中关闭magic_quotes_gpc。 I'm running PHP with Apache and Ubuntu.
我正在用Apache和Ubuntu运行PHP。
I have in my config file (/etc/php5/apache2/php.ini): 我的配置文件中有(/etc/php5/apache2/php.ini):
magic_quotes_gpc Off
Where I create a page with phpinfo() it shows magic_quotes_gpc as on. 在我用phpinfo()创建页面的地方,它显示了magic_quotes_gpc。 I've also looked in Additional .ini files parsed and there is no setting for it.
我还查看了已解析的其他.ini文件,但没有设置。
Why is PHP ignoring this? 为什么PHP会忽略这一点?
try to add/edit in php.ini 尝试在php.ini中添加/编辑
magic_quotes_gpc = Off
after adding restart your apache services for taking effect this 添加后重新启动您的apache服务以使其生效
You can turn them off using .htaccess with: 您可以使用.htaccess将它们关闭:
php_flag magic_quotes_gpc Off
and also using php if writable php.ini 如果可写的php.ini也使用php
ini_set('magic_quotes_gpc' , 0 );
Firstly, it is deprecated so, don't rely on it. 首先,它已被弃用,所以不要依赖它。 Mmmmmmmkay?
Mmmmmmmkay?
Secondly, Check 其次,检查
Loaded Configuration File
加载的配置文件
Under phpinfo()
在
phpinfo()
Also Add : 还添加:
php_flag magic_quotes_gpc Off
to your .htaccess
file. php_flag magic_quotes_gpc Off
到您的.htaccess
文件。
Cool? 凉?
Did you recently make this change? 您最近进行过此更改吗? If so, you have to restart PHP for it to take effect.
如果是这样,则必须重新启动PHP才能使其生效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.