Skip to content

Error running phpmyadmin on Ubuntu 22.04 server #17523

@wnunezc

Description

@wnunezc

Describe the bug

I tried to open phpmyadmin and got a 500 server error:

image

When trying to find out what happened to the server I see this error in the log:

sudo tail -n 2 /var/log/apache2/error.log
[Fri May 13 14:44:11.929538 2022] [php7:error] [pid 1334] [client 192.168.160.1:30449] PHP Parse error: syntax error, unexpected 'static' (T_STATIC) in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 272
[Fri May 13 14:44:13.206921 2022] [php7:error] [pid 1331] [client 192.168.160.1:30459] PHP Parse error: syntax error, unexpected 'static' (T_STATIC) in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 272

To Reproduce

having installed Apache, MySQL and php 7.4

I have installed phpmyadmin using the following command:

sudo add-apt-repository ppa:phpmyadmin/ppa
sudo apt-get update
sudo apt -y install phpmyadmin

when the installation is done it has added a new version of php, to be more specific system add version 8.1
at the end of the installation and past the configuration dialog:

image

imager

I'm going to try the phpmyadmin portal. and get the error/bug described above.

Expected behavior

that the phpmyadmin open normally without server problem error 500 related to dependencies.
How can we solve the problem of the package that is installed with apt?

Server configuration

  • Operating system: Ubuntu 22.04 Server
  • Web server: Apache
  • Database version: MySQL
  • PHP version: 7.4/8.1
  • phpMyAdmin version:

apt show phpmyadmin
Package: phpmyadmin
Version: 4:5.1.1+dfsg1-5ubuntu1
Priority: optional
Section: universe/web
Origin: Ubuntu
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Original-Maintainer: phpMyAdmin Packaging Team team+phpmyadmin@tracker.debian.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 36.5 MB
Depends: dbconfig-mysql | dbconfig-no-thanks | dbconfig-common (<< 2.0.0), libjs-bootstrap4, libjs-codemirror, libjs-jquery, libjs-jquery-mousewheel, libjs-jquery-timepicker, libjs-jquery-ui, php-cli, sensible-utils, ucf, debconf (>= 0.5) | debconf-2.0, php-common, php-json, php-mysql, php-xml, php-google-recaptcha (>= 1.1), php-google-recaptcha (<< 2~~), php-nikic-fast-route (>= 1.3), php-nikic-fast-route (<< 2~~), php-phpmyadmin-motranslator (>= 5.0), php-phpmyadmin-motranslator (<< 6~~), php-phpmyadmin-shapefile (>= 2.0), php-phpmyadmin-shapefile (<< 3~~), php-phpmyadmin-sql-parser (>= 5.0), php-phpmyadmin-sql-parser (<< 6~~), php-twig-i18n-extension (>= 3.0), php-twig-i18n-extension (<< 4~~), php-phpseclib (>= 2.0), php-phpseclib (<< 3~~), php-symfony-config (>= 4.4.9), php-symfony-config (<< 6~~), php-symfony-dependency-injection (>= 4.4.9), php-symfony-dependency-injection (<< 6~~), php-symfony-expression-language (>= 4.4.9), php-symfony-expression-language (<< 6~~), php-mbstring, php-twig (>= 2.9), php-twig (<< 4~~), php-mariadb-mysql-kbs (>= 1.2), php-mariadb-mysql-kbs (<< 2~~), libjs-sphinxdoc (>= 4.3)
Recommends: apache2 | lighttpd | httpd, php-bz2, php-curl, php-gd, php-tcpdf, php-zip
Suggests: default-mysql-server | virtual-mysql-server, php-recode, www-browser, php-opcache, php-gd2, php-pragmarx-google2fa-qrcode, php-samyoul-u2f-php-server
Homepage: https://www.phpmyadmin.net/
Download-Size: 4,937 kB
APT-Manual-Installed: yes
APT-Sources: http://pa.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: MySQL web administration tool

Client configuration

  • Browser: Google Chrome lastes version
  • Operating system: Windows 11 Pro

Additional context

How can we solve the problem of the package that is installed with apt?

Metadata

Metadata

Assignees

Labels

BugA problem or regression with an existing featureduplicatepackagingAn issue that affect Debian, Ubuntu or another form of packaging

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions