0

It appears that I am unable to connect to the sqli server. I'm running XAMPP on arch. I've tried uncommenting extension=mysqli under /etc/php/php.ini but that doesn't seem to be doing anything. Here is my code:

<?php
$serverName = "localhost";
$userName = "root";
$userpwd = "";
$dbName = "databaseName";

$conn = mysqli_connect($serverName, $userName, $userpwd, $dbName);

if(mysqli_connect_errno())
{
    die("Connection Failed!" . mysqli_connect_error());
}
3
  • Could you please edit your question to include the full error message and exception stack trace? Commented May 15, 2022 at 4:02
  • 1
    @Phil i don't think it's necessary, the message is already full and the error is thrown from mysqli_connect Commented May 15, 2022 at 5:38
  • @YourCommonSense ah, it's the socket path. I was thinking there was more to this mystery Commented May 15, 2022 at 5:43

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.