Error undefined constant MYSQLI STORE RESULT

Posted on

ErrorException

Use of undefined constant MYSQLI_STORE_RESULT – assumed ‘MYSQLI STORE_RESULT’ (this will throw an Error in a future version of PHP)

How Fix This:

In this time I using Ubuntu. Open php.ini file at /opt/lamp/etc/php.ini. Open your terminal and use this command:

sudo gedit /opt/lampp/etc/php.ini
  • Find “;extension=php_mysqli.dll“.
  • Remove “;” and save the file.

If you are running codeigniter using spark, please stop it immediately. then run spark again with the command:

php spark serve

Back to browser, reload the page.

If Still Not Working, Try This Command:

To fix this, you have to install the mysqli extension. Open a terminal and use the following command to mysqli install ubuntu:

sudo apt install php8.0-mysqli

For the php version I use is php8.0. Please adjust to what you are using.

I hope this undefined constant MYSQLI article is useful.