PHPMyAdmin 500 Internal Server Error in Apache due to PHP Version || New Problem

Viewed 189

Version:

  • OS lsb_release -a : Ubuntu 18.04.5 LTS
  • PHP php -v : 8.0.5 Apache
  • pache2 -v : 2.4.29 (Ubuntu)
  • mysql --version : mysql Ver 14.14 Distrib 5.7.32

Problem:

I'm trying to install LAMP Stack using following article. However, I was getting HTTP 500 Error while accessing phpmyadmin from browser.

And installed phpmyadmin using below command.

sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl

Tried:

So, I checked with Error Log tail -f /var/log/apache2/error.log and found that Phpmyadmin was running on depreciated version of PHP.

[Sun May 16 21:11:57.057418 2021] [core:notice] [pid 2711] AH00094: Command line: '/usr/sbin/apache2' [Sun May 16 21:12:49.262658 2021] [mpm_prefork:notice] [pid 2711] AH00171: Graceful restart requested, doing restart [Sun May 16 21:12:49.280421 2021] [alias:warn] [pid 2711] AH00671: The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias. [Sun May 16 21:12:49.307986 2021] [mpm_prefork:notice] [pid 2711] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations [Sun May 16 21:12:49.308000 2021] [core:notice] [pid 2711] AH00094: Command line: '/usr/sbin/apache2' [Sun May 16 21:24:43.439480 2021] [mpm_prefork:notice] [pid 2711] AH00169: caught SIGTERM, shutting down PHP Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/20200930/json.so (/usr/lib/php/20200930/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/json.so.so (/usr/lib/php/20200930/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 [Sun May 16 21:24:43.547262 2021] [mpm_prefork:notice] [pid 2888] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations [Sun May 16 21:24:43.547290 2021] [core:notice] [pid 2888] AH00094: Command line: '/usr/sbin/apache2' [Sun May 16 21:24:47.635162 2021] [php:error] [pid 2895] [client 84.251.85.6:56332] PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/phpmyadmin/libraries/url_generating.lib.php on line 231

1 Answers

If you have installed php mysql and apache directly on your system. Uninstall them and install only lamp. By so doing there will be no conflict and you stop having internal server error due too deprecated php version.

Related