即使重新启动php.ini mysqli.allow_persistent也不会关闭 [英] php.ini mysqli.allow_persistent won't turn off even after php restart
本文介绍了即使重新启动php.ini mysqli.allow_persistent也不会关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我做了什么:
- 我编辑了php.ini以包含
mysqli.allow_persistent = Off
- 重新启动php
- php_info->>显示
mysqli.allow_persistent = On
- I edited php.ini to include
mysqli.allow_persistent = Off
- restarted php
- php_info -->> shows
mysqli.allow_persistent = On
我什至尝试:
-
ini_set('mysqli.allow_persistent', "Off");
- 但是php_info->>仍显示mysqli.allow_persistent = On
为什么以及如何解决此问题?
Why and how to fix this?
推荐答案
mysqli.allow_persistent
实际上期望一个整数值,根据文档,默认值为1
.这可能有点令人困惑,因为mysql.allow_persistent
(不带i)使用打开/关闭"切换,并且在某些旧版本的PHP中,mysqli
也可以使用打开/关闭".
mysqli.allow_persistent
actually expects an integer value, the default being 1
according to the documentation. This can be a bit confusing since mysql.allow_persistent
(without the i) uses an On/Off toggle, and On/Off also works for mysqli
in some older versions of PHP.
要禁用它,请在您的php.ini中使用它:
To disable it, use this in your php.ini:
mysqli.allow_persistent = 0
这篇关于即使重新启动php.ini mysqli.allow_persistent也不会关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文