Bug #79638 [NEW]: persistent connection with mysqli log as no password

From: Date: Tue, 26 May 2020 23:36:29 +0000
Subject: Bug #79638 [NEW]: persistent connection with mysqli log as no password
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227190@lists.php.net to get a copy of this message
From: radek at pinkbike dot com Operating system: debian PHP version: 7.4.6 Package: MySQLi related Bug Type: Bug Bug description:persistent connection with mysqli log as no password Description: ------------ Mysql error log is filled with this when using a persistent connection. 2020-05-26T23:15:40.279047Z 281924791 [Note] Access denied for user 'root'@'10.0.0.2' (using password: NO) The connection succeeds so I'm assuming internally there are multiple attempts to connect, one of which is without the pass. This error is logged in the mysql log not on the first connect, but on subsequent requests to a process with a persistent connection. Switching to non persistent connection ( removing the p: form host), connection also succeeds but no such error is logged. Also reverting to php 7.1.33 with exactly the same configuration does not log the error when using persistent connection. (expected behaviour) All test using production Server version: 5.7.28-31-log Percona Server Test script: --------------- <?php $link = mysqli_connect("p:10.0.0.2", "root", "password"); if (!$link) { echo "Debugging errno: " . mysqli_connect_errno(); } else { echo "Success"; } ?> Expected result: ---------------- No error log message in mysql. Actual result: -------------- 2020-05-26T23:15:40.279047Z 281924791 [Note] Access denied for user 'root'@'10.0.0.2' (using password: NO) -- Edit bug report at https://bugs.php.net/bug.php?id=79638&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79638&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79638&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79638&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79638&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79638&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79638&r=support Expected behavior: https://bugs.php.net/fix.php?id=79638&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79638&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79638&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79638&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79638&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79638&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79638&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79638&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79638&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79638&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79638&r=mysqlcfg

« previous php.bugs (#227190) next »