3

in the first place it seems like I do not have mysqli installed, after running this if:

if (!function_exists('mysqli_init') && !extension_loaded('mysqli')) {
    echo 'We don\'t have mysqli!!!';
} else {
    echo 'Phew we have it!';
}

It returned the "we don't have mysqli!!!".

So after looking on how to install this I couldn't really find a way, after visiting http://php.net/manual/en/mysqli.installation.php, I scrolled down to find the "PHP 5.3.0 and newer" section where it says I wouldn't need to worry about installing it. So what should I do, and if there's a command I should run where should I run it? I'm using XAMPP to run php in case that matters.

Thanks in advance!

Edit: "extension=mysqli" is enabled in php.ini

Edit2: I'm on windows 10.

3
  • stackoverflow.com/questions/666811/… please refer this it may helps you. Commented Mar 5, 2018 at 11:14
  • @Siva I've been to that post ,although it is from 2009, the most voted comment sent me directly to the same site I linked in my post, which didn't really help me. Commented Mar 5, 2018 at 11:27
  • In Windows 10 for mysqli to work in PHP 7.3 you should add PHP directory to the PATH. This behavior was not there in PHP 7.0.27 Commented May 15, 2019 at 3:50

1 Answer 1

4

If your on linux install mysql php extension

sudo apt-get install php7.2-mysql
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the tip but I'm on windows
@Fábio Rodrigues sir do you find any solution for this.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.