Bug #78870 [NEW]: Connection errors appear in error.log
| From: | hhsnakeg at gmail dot com | Date: | Tue, 26 Nov 2019 13:13:50 +0000 |
| Subject: | Bug #78870 [NEW]: Connection errors appear in error.log | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-223896@lists.php.net to get a copy of this message | ||
From: hhsnakeg at gmail dot com
Operating system:
PHP version: 7.2.25
Package: MySQLi related
Bug Type: Bug
Bug description:Connection errors appear in error.log
Description:
------------
When I use persist connection on PHP use call mysqli_real_connect with
parameter host 'p:localhost' causes error connection when I call the
connection second time.
After that, a new database connection is created with a new id.
When we connect to the database for the first time we see a message in
the general log:
454 Connect dbuser@localhost on dbscheme using Socket
When we reuse connection (connect second time) we see a message in the
general log:
454 Connect Access denied for user 'dbuser'@'localhost' (using
password: NO)
455 Connect dbuser@localhost on dbscheme using Socket
and in the error log we see the same message:
454 [Note] Access denied for user 'dbuser'@'localhost' (using password:
NO)
I think this error appeared after changes in version 7.2.24 (Fixed bug
#76809 (SSL settings aren't respected when persistent connections are
used).
Test script:
---------------
<?php
function connect()
{
$connectionID = mysqli_init();
$ok = mysqli_real_connect($connectionID,
'p:localhost',
'dbuser',
'dbpass',
'dbscheme',
3306,
"",
0);
mysqli_select_db($connectionID, 'dbsheme');
}
connect();
connect();
--
Edit bug report at https://bugs.php.net/bug.php?id=78870&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78870&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78870&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78870&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78870&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78870&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78870&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78870&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78870&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78870&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78870&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78870&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78870&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78870&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78870&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78870&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78870&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78870&r=mysqlcfg