Req #68984 [NEW]: php.ini: cannot disable persistent connections for PDO_MYSQL
| From: | bugs dot php dot net at register dot conactive dot com | Date: | Wed, 04 Feb 2015 18:01:13 +0000 |
| Subject: | Req #68984 [NEW]: php.ini: cannot disable persistent connections for PDO_MYSQL | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-190465@lists.php.net to get a copy of this message | ||
From: bugs dot php dot net at register dot conactive dot com
Operating system: Linux
PHP version: 5.5.21
Package: PDO MySQL
Bug Type: Feature/Change Request
Bug description:php.ini: cannot disable persistent connections for PDO_MYSQL
Description:
------------
The problem has been mentioned in bug 42665, but not very clearly
articulated.
You can disable persistent connections for (almost?) all database
types/modules, but you can't for PDO_MYSQL (probably not for PDO in
general). If a user or software package uses persistent connections by
default there is no way to enforce and stop the use from admin side.
This is a serious problem for ISPs (and maybe others) as it leaves lots
of MySQL connections open for the default MySQL wait_timeout (which is 8
hours). We encountered this problem for instance with Lepton CMS which
passes a hardcoded PDO::ATTR_PERSISTENT to the PDO object in its
database connection class. Because of this bad practice we need an
option to switch this off from admin side.
We have mitigated the problem now by changing the MySQL wait_timeout to
60 seconds, but this is not a solution and still uses more ressources
than necessary.
Expected result:
----------------
There has to be an option to simply disallow any persistent connections
for *any* database connection type.
Please add an option
pdo_mysql.allow_persistent
or
pdo.allow_persistent
or whereever it may fit best.
Or honor the setting of mysqli.allow_persistent
for pdo_mysql as well.
Thanks!
--
Edit bug report at https://bugs.php.net/bug.php?id=68984&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68984&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68984&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68984&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68984&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68984&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68984&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68984&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68984&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68984&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68984&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68984&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68984&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68984&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68984&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68984&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68984&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68984&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68984&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68984&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68984&r=mysqlcfg