I'm facing a weird trouble.
I just installed a new virtual server with apache / php 7.1 in order to prepare the migration of my old virtual webserver running php 5.3.3. The reason is I need to install prestashop that requires php 5.4 (minimum requirement).
Both virtual servers are running centos 6 on the same HN.
PHP 7.1 comes from remi repos.
I ran this code on both VMs (CLI):
<?php
$mysql = new mysqli($mysql_adress, $mysql_login, $mysql_pwd, $mysql_database);
if($mysql->connect_error){
echo 'connect error : '.$mysql->connect_error;
} else {
$return = $mysql->query("SELECT DATABASE()");
$row = mysqli_fetch_array($return, MYSQL_ASSOC);
var_dump($row);
}
?>
My 'old' server returns the name of the database i am connected to (it is the expected result) but the new server returns NULL !
I suspect the mysqlnd client to be responsible for this behaviour but not sure.
Any idea appreciated !