php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60594 mysqlnd exposes 160 lines of stats in phpinfo
Submitted: 2011-12-22 18:30 UTC Modified: 2017-10-24 04:14 UTC
Votes:3
Avg. Score:3.0 ± 1.6
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jakoch at web dot de Assigned:
Status: Open Package: MySQL related
PHP Version: trunk-SVN-2011-12-22 (SVN) OS:
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jakoch at web dot de
New email:
PHP Version: OS:

 

 [2011-12-22 18:30 UTC] jakoch at web dot de
Description:
------------
hello,

this is a change request: i think that it is not appropriate, that the mysqlnd extension exposes a list of 160 statistical items when calling the phpinfo() function.

i'm suggesting

a) to remove the client statistics from the phpinfo screen,
because phpinfo's focus is a bit more on configuration directives and not so much on statistics; every other extension could expose it there, too;
it's way too long to scroll through that list of stats-items

b) to make these statistics available via an mysqlnd_stats() or mysqlnd_info() function. 

anyway, you got my intention :)

best, jens


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-29 16:22 UTC] rgagnon24 at gmail dot com
I have to agree with jakoch.  This is not a security problem, but a slippery-slope thing.  phpinfo() is not a place to just display random statistics from any module that might feel like doing so.

There are already stats functions within PHP that can be used for this as documented on http://www.php.net/manual/en/mysqlnd.stats.php

IE: 
mysqli_get_client_stats()
mysqli_get_connection_stats()
mysqli_get_cache_stats()
 [2017-10-24 04:14 UTC] kalle@php.net
-Package: mysqlnd_uh +Package: MySQL related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Oct 23 20:01:30 2019 UTC