when im running php –ini on command line it seems like php.ini file is not getting loaded
cmd
php
hi everybody i have been using php for a week now and im currently trying to connect php with sql database using xampp by doing so im getting this error
out put of the code
<?php
echo "this is a test ";
error_reporting(E_ALL);
ini_set('display_errors', 1);
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$con = mysqli_connect($dbhost, $dbuser, $dbpass);
if (!$con) {
echo "MySQL Error: " . mysqli_connect_errno() . " - " . mysqli_connect_error();
} else {
echo "Connection successful";
}
?>
i tried lots of method to solve this issue even tried updating my php.ini file
php.ini file
even though extensions=mysqli is uncommented the error seems to be there
so i tried to run php –ini on command line and but i see this
php –ini output
output
i think that php.ini file is not getting loaded if thats the issue can you help mee solve it i am stuck here for days now thankyou!!
shuvradeep chatterjee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.