|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67637 mysqli::ping() should not send E_NOTICE
Submitted: 2014-07-17 07:39 UTC Modified: 2017-04-26 11:15 UTC
Avg. Score:4.3 ± 0.9
Reproduced:0 of 0 (0.0%)
From: php dot net at dzubak dot sk Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.5.14 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php dot net at dzubak dot sk
New email:
PHP Version: OS:


 [2014-07-17 07:39 UTC] php dot net at dzubak dot sk
I use mysqli::ping() to test whether MySQL connection is still alive (scripts waits long before using MySQL again).

On FALSE, it also sends E_NOTICE which is not (IMO) appropriate, since function returns TRUE/FALSE on success/failure.

Expected result:
I expect mysqli::ping() just to return TRUE/FALSE.

When I use $variable without initialisation, I get E_NOTICE and so if I want to avoid getting E_NOTICE, I use isset($variable) before using $variable itself.

I expected same behaviour from mysqli::ping() - just let me know if connection is dead or alive and do not mess with my logs too, it is redundant without advantage.

Actual result:
mysqli::ping() returns TRUE/FALSE, but it also sends E_NOTICE "mysqli::ping(): send of 5 bytes failed with errno=32 Broken pipe".


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-26 11:15 UTC]
-Status: Open +Status: Not a bug
 [2017-04-26 11:15 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 26 03:03:35 2021 UTC