Score:0

Ubuntu 22.04 -- phpmyadmin error: mysqli extension missing

ru flag
jwk

I can't get phpmyadmin to run, it reports The mysqli extension is missing. I have been running MySQL using MariaDB for a while, through multiple versions of Ubuntu. Currently running 22.04. After not using phpmyadmin for a while, I found recently that it is no longer working. I have read through various search results on this problem, but most or all of what I have found is not recent and does not fix my problem. This is a list of versions of php that I have installed on my system: There are 3 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
---------------------------------------------
* 0            /usr/bin/php8.2   82        auto mode
  1            /usr/bin/php7.4   74        manual mode
  2            /usr/bin/php8.1   81        manual mode
  3            /usr/bin/php8.2   82        manual mode

Press <enter> to keep the current choice[*], or type selection number:

<?php phpinfo(); ?> tells me that apache2 is running php 8.1.18. After modifying /etc/php/8.1/apache2/php.ini and /etc/php/8.2/apache2/php.ini with

extension=/usr/lib/php/20220829/mysqli.so

phpinfo includes /etc/php/8.1/apache2/conf.d/20-mysqli.ini in its list of ini files parsed. But I am still getting the error message that mysqli extension is missing.

phpmyadmin has been running previously, but I have not used it for a while, so I can't pinpoint what system change triggered this problem. Any help resolving this problem would be much appreciated. Thank you!

Score:0
ru flag

I am not saying these commands will fix your issue (you may need to adjust versions for your case or it may be something completely different) but in my case, on update to Ubuntu 21.10 (PHP 8.0) I found the mysqli extension was missing/disabled so I had to do this:

sudo apt-get install php8.0-mysql

And:

sudo apt-get install php8.0-mbstring

And on a subsequent update to 22.04 I had to disable php8.0 module and enable php8.1 module:

sudo a2dismod php8.0

sudo a2enmod php8.1

jwk avatar
ru flag
jwk
Thanks, that did it!
jwk avatar
ru flag
jwk
sudo a2dismod php8.1; sudo a2enmod php8.2
Score:0
vi flag

I experienced the same error and solved it in the following way:

  • I checked the /etc/phpmyadmin directory to see which php version in apache.conf is working. Then I setted this:

<FilesMatch .php$> # Apache 2.4.10+ can proxy to unix socket SetHandler "proxy:unix:/var/run/php/php8.2-fpm.sock|fcgi://localhost"

Since then everything is fine again. I hope this information will help you.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.