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: 2024-05-08 21:17 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: dharman (profile)
Status: Closed Package: MySQL related
PHP Version: trunk-SVN-2011-12-22 (SVN) OS:
Private report: No CVE-ID: None
 [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

Pull Requests

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
 [2024-05-08 21:17 UTC] dharman@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: dharman
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC