What I did:
- I edited php.ini to include
mysqli.allow_persistent = Off
- restarted php
- php_info -->> shows
mysqli.allow_persistent = On
I even tried:
ini_set('mysqli.allow_persistent', "Off");
- but php_info -->> still shows mysqli.allow_persistent = On
Why and how to fix this?
mysqli.allow_persistent
actually expects an integer value, the default being1
according to the documentation. This can be a bit confusing sincemysql.allow_persistent
(without the i) uses an On/Off toggle, and On/Off also works formysqli
in some older versions of PHP.To disable it, use this in your php.ini:
mysqli.allow_persistent = 0