How to fix Fatal error: Call to undefined function mysqli_connect() with PHP?

Spread the love

Sometimes, we want to fix Fatal error: Call to undefined function mysqli_connect() with PHP.

In this article, we’ll look at how to fix Fatal error: Call to undefined function mysqli_connect() with PHP.

How to fix Fatal error: Call to undefined function mysqli_connect() with PHP?

To fix Fatal error: Call to undefined function mysqli_connect() with PHP, we’ve install and enable the mysqli package.

To install it, we run

sudo apt install php-mysqli

on Ubuntu or its derivatives.

On Windows, we enable the mysqli extension by putting in

extension=php_mysqli.dll 

in php.ini.

Conclusion

To fix Fatal error: Call to undefined function mysqli_connect() with PHP, we’ve install and enable the mysqli package.

Leave a Reply

Your email address will not be published.