ubuntu22.04


https://stackoverflow.com/questions/73707303/phpmyadmin-not-working-after-upgrade-to-22-04-and-cannot-be-uninstalled

First switch back to php7.4

sudo a2dismod php8.1

sudo a2enmod php7.4

sudo systemctl restart apache2

Now phpmyadmin5.0.2 works again Then you can remove the old version and install the new one. First download it from the phpmyadmin website and extract it - say to ~/Downloads/phpMyAdmin-5.2.0-english/

sudo rm -rf /usr/share/phpmyadmin/

sudo mkdir /usr/share/phpmyadmin/

sudo mv ~/Downloads/phpMyAdmin-5.2.0-english/* /usr/share/phpmyadmin/

sudo chown -R root:root /usr/share/phpmyadmin

You'll probably have to also create a file /usr/share/phpmyadmin/config.in.phpcontaining a 'secret' passphrase 32 chars long eg:

<?php // use here a value of your choice 32 chars long or just copy this if you are on your own localhost $cfg['blowfish_secret'] = '12345678901234567890123456789012'; $i=0; $i++; $cfg['Servers'][$i]['auth_type'] = 'cookie';

and you may also need to create a temp dir

sudo mkdir /usr/share/phpmyadmin/tmp && sudo chmod 777 /usr/share/phpmyadmin/tmp

and finally switch back to php8

sudo a2dismod php7.4

sudo a2enmod php8.1

sudo systemctl restart apache2


You can install a LAMP (Linux, Apache, Mysql, PHP) server with this command under Ubuntu:

sudo apt install lamp-server^

However, Ubuntu 22.04 doesn't contain PHP 7.4 any longer. Only PHP 8.1 is supported. Tiki versions before 25 need PHP 7.4, Tiki 25 possibly too. But there's a good PPA for PHP 7.4 available. So you install the LAMP server and then the PHP 7.4 packages from this PPA.

Use these commands to integrate the PPA in the system:

sudo apt-get update

sudo apt -y install software-properties-common

sudo add-apt-repository ppa:ondrej/php

sudo apt-get update


You should then be able to install all the PHP 7.4 packages with this command:

sudo apt install libapache2-mod-php7.4 memcached php7.4 php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-common php7.4-curl php7.4-gd php7.4-intl php7.4-ldap php7.4-mbstring php7.4-memcache php7.4-memcached php7.4-mysql php7.4-opcache php7.4-pspell php7.4-soap php7.4-sqlite3 php7.4-tidy php7.4-xml php7.4-xmlrpc php7.4-zip php-apcu php-bcmath php-common php-curl php-gd php-intl php-mbstring php-memcache php-memcached php-mysql php-pear php-pspell php-sqlite3 php-tidy php-xmlrpc php-zip


You might also want to install some extra packages:

sudo apt install bsdmainutils catdoc composer curl elinks git man-db memcached odt2txt phpmyadmin poppler-utils postfix pstotext

Set php 7.4 as default

In case you have other php versions newer than 7.4 (such as php 8.0.x), you may set the default php version at 7.4 with these commands:

sudo a2dismod php8.1

sudo a2enmod php7.4

sudo service apache2 restart

sudo update-alternatives --set php /usr/bin/php7.4