DEV Community

Dendi Handian
Dendi Handian

Posted on • Updated on

Updating Adminer in Laragon for PHP 8

In Laragon, when you switching to PHP 8 and accessing adminer at http://localhost/adminer, you will find this error:

adminer error in php 8 laragon

the errors are because of the existing adminer app only supported in PHP 7. If you're currently using PHP 8 for now and the future, We need to update the adminer.

Downloading the latest Adminer app

Go to https://www.adminer.org/#download, and find the download link for the latest adminer app. Adminer is a single-file php application, so you will find a single php file like adminer-4.8.1.php downloaded for example.

Updating the existing Adminer to the latest

Go to C:\laragon\etc\apps\adminer (or adjust to your laragon directory path) and you will find a single php file index.php. You may want to delete or backup this file and replace it with adminer-4.8.1.php and rename it into index.php

Accessing the new Adminer

With PHP 8 running, now the new adminer app will be accessible in the same url and you can start to login into a database.

adminer 4.8.1 login page

as per adminer 4.6.3 or newer, you cannot login into a database with a blank password (ref), unlike the phpMyAdmin. So to use adminer, maybe you need to create a new database admin user with a password through mysql cli or phpmyadmin.

Good thing when you switch back to PHP 7.4, the latest adminer 4.8.1 still supported.

Top comments (0)