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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tm8544 at hotmail dot com
New email:
PHP Version: OS:

 

 [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-2025 The PHP Group
All rights reserved.
Last updated: Mon Feb 03 07:01:33 2025 UTC