guys. I have been few days trying to access MariaDB from php script, but I have not succeeded.This is the code (I copied it from w3schools)
<?php
$servername = "localhost";
$username = "";
$password = "";
//Se crea la coneccion con la Base de Datos
$conn = new mysqli($servername,$username,$password);
//Se asegura que todo este correcto
function conectar(){
if (mysqli_connect_error()){
die ("Coneccion a Base de Datos fallida: ".mysqli_connect_error());
}
}?>
When I try to execute it, this is the result:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mysqli.so'- /usr/lib/php/20151012/mysqli.so: undefined symbol: mysqlnd_connect in Unknown on line 0
PHP Fatal error: Uncaught Error: Class 'mysqli' not found in /var/www/html/lisa.php:7
Stack trace:
#0 {main}
thrown in /var/www/html/lisa.php on line 7