php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72701 MYSQLI_GET_HOST_INFO
Submitted: 2016-07-28 19:40 UTC Modified: -
From: tm8544 at hotmail dot com Assigned:
Status: Closed Package: MySQLi related
PHP Version: 7.1.0beta1 OS: Windows 10 x64
Private report: No CVE-ID: None
 [2016-07-28 19:40 UTC] tm8544 at hotmail dot com
Description:
------------
Function mysqli_get_host_info() gives random string for the ip-part of the returned string.


Test script:
---------------
<?php
 $con=mysqli_connect("127.0.0.1,"my_user","my_password","my_db");
 // Check connection
 if (mysqli_connect_errno())
   {
   echo "Failed to connect to MySQL: " . mysqli_connect_error();
   }

echo mysqli_get_host_info($con);

mysqli_close($con);
?> 

Expected result:
----------------
127.0.0.1 via TCP/IP

Actual result:
--------------
changes every time I refresh the browser, for example
00@üp via TCP/IP
0PFüp via TCP/IP
0Pæûp via TCP/IP

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-29 15:02 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8033fb4044f1f7de0e8303098e19e2cfceee4014
Log: Fixed bug #72701 mysqli_get_host_info() wrong output
 [2016-07-29 15:02 UTC] ab@php.net
-Status: Open +Status: Closed
 [2016-10-17 10:10 UTC] bwoebi@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8033fb4044f1f7de0e8303098e19e2cfceee4014
Log: Fixed bug #72701 mysqli_get_host_info() wrong output
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC