3

So i updated my version of php to the new version (8.0). And everything works fine, except for my adminer.

It's caused by my version of adminer being out of date because php8.0 doesn't have the function magic_quotes.

And the only command i have find to get adminer is this one: sudo apt-get install adminer

But it doesn't work...

The-Evil-Fox
  • 111
  • 1
  • 8
  • 2
    The problem isn't that it needs to be enabled. The problem is the function got *removed entirely* in PHP 8. You need a more recent Adminer version. https://www.php.net/get_magic_quotes_gpc – ceejayoz Nov 28 '20 at 19:01
  • Well on php.net they seed the function was already outdate for php 7.4 but i was using php 7.4 with adminer and it was working fine... Weird. I'll try to get a more recent version of adminer then. – The-Evil-Fox Nov 28 '20 at 19:04
  • 1
    Yes, it was *deprecated* but still there in PHP 7.4. It was removed completely in 8.0. – ceejayoz Nov 28 '20 at 19:05
  • @ceejayoz Do you know where i can find the console command to install the latest version of adminer ? Everywhere i go they use "apt install adminer" but it's the exact same version than im using... :/ – The-Evil-Fox Nov 28 '20 at 19:12
  • Actually, it looks like Adminer doesn't currently work with PHP8. There's a pull request at https://github.com/vrana/adminer/pull/401 to fix this issue and some others. – ceejayoz Nov 29 '20 at 01:42
  • 1
    Is there any error message you can share? Also, how is this related to programming? – Nico Haase Oct 07 '21 at 09:41

1 Answers1

4

Support was added in December 2020, unfortunately only weeks after your question @The-Evil-Fox. The only problem is it seems the Ubuntu repo is not up to date so if you install via apt install adminer you'll still be on a version that doesn't support PHP 8.

The easiest way I found to update is to still install it that way, but then use wget to download the latest version of adminer.php. So do something like this:

  • Go to the adminer director cd /usr/share/adminer
  • Download the latest version of adminer: sudo wget https://www.adminer.org/latest.php
  • Delete adminer.php
  • Then rename latest.php to adminer.php -> sudo mv latest.php adminer.php

Done! That worked for me anyway... I'm not a Ubuntu pro though, so no idea why repo is so out of date.

Trevor
  • 2,511
  • 1
  • 14
  • 25