0

It's been long time (almost a year now) since I last run my ubuntu 20.04 server. So the first thing that I've done was global update of everything:

sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

There was a lot of downloading and installing, and after that I rebooted server and repeated process until I get clean record of 0 updates left.

However... after I run my old scripts, connection to database was failing. So I wanted to check in phpmyadmin if everything is as i left it months ago and I get this error:

Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: mysqli

I'm kinda worried now, since everything was running at the moment when I turned off server months ago. Since I have almost no experience in ubuntu/linux/servers things and I installed everything by an step-by-step guide, I'm afraid to touch anything else than regular update-all like above. Yet something went wrong. Is it possible that my php.ini was updated, and somehow mysqli was turned off?

Inside /etc/php I have 2 directories now: 8.0 and 8.1 - I'm not sure how it was before. Perhaps new version of PHP was installed and somehow it does not work with my phpmyadmin? What could happen and how can I repair it?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Zorann
  • 335
  • 2
  • 16
  • 1
    You need to install `php-mysqli`. There may need to be a version number involved, but check your existing PHP libraries for hints on that. – aynber Feb 18 '22 at 16:04
  • @aynber THX for the tip, I'll try to install it. But how is it possible that it is missing? I was using mysqli for a long time before. I'm worried now that more things might be missing. – Zorann Feb 18 '22 at 16:32
  • 1
    It's possible that when you ran upgrade, it automatically installed 8 and 8.1, and changed the default CLI version. Your website is could fine unless you auto-approved changes during the update -- reasons why I try to stay interactive with my updates. https://stackoverflow.com/questions/42619312/switch-php-versions-on-commandline-ubuntu-16-04 has information on how to change the CLI version – aynber Feb 18 '22 at 16:36
  • @aynber turned out that my scripts are running on 8.0.15, and indeed new version is 8.1, after `sudo apt install php8.0-mysql` everything went back to normal. Yet I have to chenge version to 8.1 in this case to stay up to date. But this is a completly different problem ;) – Zorann Feb 18 '22 at 16:56

0 Answers0