Laragon Adminer warning continue

1k Views Asked by At

I get an error when I try to access my own Adminer 4.8.0 in the localhost/adminer route with my browser. It works without Laragon.

Using:

  • Laragon 4.0.16 (which has the Adminer 4.6.3 app)
  • PHP 8.0.3

I get the following error:

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\Programs\Laragon\etc\apps\adminer\index.php on line 1170

Warning: Undefined array key "script" in C:\Programs\Laragon\etc\apps\adminer\index.php on line 169

Warning: Undefined array key "HTTP_X_FORWARDED_PREFIX" in C:\Programs\Laragon\etc\apps\adminer\index.php on line 169

Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in C:\Programs\Laragon\etc\apps\adminer\index.php:20 Stack trace: #0 C:\Programs\Laragon\etc\apps\adminer\index.php(169): remove_slashes(Array, false) #1 {main} thrown in C:\Programs\Laragon\etc\apps\adminer\index.php on line 20
1

There are 1 best solutions below

0
On

The problem is that Laragon has default apps, which also override your routes.

Laragon has Adminer installed by default. The default Laragon Adminer route is /adminer, so if you set up your Adminer in the same route, it will use the Laragon Adminer instead of your own.

The other part of the problem is that the Adminer version in Laragon is not the latest. Older Adminer versions produce an error in newer PHP versions.


There are two solutions:

a) Replace the Laragon Adminer with a new version in: C:\Programs\Laragon\etc\apps\adminer\index.php

b) Remove Adminer app from Laragon: C:\Programs\Laragon\etc\apache2\alias\adminer.conf (make a backup if you do this), so that your Adminer can be reached.


I chose b), as that allows me to control the /adminer route. I also removed the other aliases from C:\Programs\Laragon\etc\apache2\alias\ (make a backup if you do this) to remove the magic route pollution that Laragon creates.