Public bug reported:
Hi, I hit an issue with phpMyAdmin and submitted it as an issue with
them on github (https://github.com/phpmyadmin/phpmyadmin/issues/13117)
however it concluded the problem lies with PHP and its mysql interface.
My server uses all stock packages from the ubuntu repositories:
phpmyadmin ver 4.5.4.1deb2ubuntu2.
Apache/2.4.18 (Ubuntu)
PHP version: 7.0.15-0ubuntu0.16.04.4
Using the below code:
<?php
error_reporting(E_ALL);
$link = mysqli_connect("localhost", "my_user", "my_password");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = "SHOW SLAVE HOSTS";
$result = mysqli_query($link, $query);
/* get associative array */
while (($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) !== null) {
print_r($row);
}
/* free result set */
mysqli_free_result($result);
/* close connection */
mysqli_close($link);
?>
I get the following output:
PHP Warning: mysqli_fetch_array(): Malformed server packet. Field length
pointing 0 bytes after end of packet in /home/xxx/mysql_test on line 16
PHP Warning: mysqli_fetch_array(): Error while reading a row in
/home/xxx/mysql_test on line 16
Array
(
[Server_id] => 2
[Host] => blacknas
[Port] => 3306
[Master_id] => 1
)
The PHP Warnings are the item i'm trying to get support with but I'm
finding little out in the ether.
** Affects: php-defaults (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1675117
Title:
php mysqli fetch warning
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php-defaults/+bug/1675117/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs