Question

phpmyadmin suddently gives http error 500

Posted November 22, 2020 8.5k views
MySQLUbuntu 18.04

Hi,

I have 3 Droplets all with ubuntu 18.04, Php 7.2.24, phpmyadmin ver. 4.6.6. Until yesterday phpmyadmin worked fine, but now it gives me HTTP Error 500. Otherwise there is nothing wrong with the servers - (not that i know of). Has anyone experienced the same?.

I have no problem using heidisql

Is there a safe solution to fix the problem. One of the servers is in production, and vulnerale to downtime.

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
5 answers

SOLVED!!

After many hours i finally found what was wrong.

In /etc/phpmyadmin/config.inc.php last line there was a “;” missing

$cfg[‘TempDir’] = ’/usr/share/phpmyadmin/tmp’; <– ;

Can anyone tell why is this so that the phpMyAdmin server working perfectly fine yesterday suddenly misses a semicolon in the code? Would be great to know the reason.

  • Hey, arokiaswamyselina

    This is quite odd. Have you made any recent changes on the server and is there anyone else that have access to the droplet?

    You can use the stat command in order to check when was the last time the file was modified and you can use that as cross reference check if you were working at that time.

    The command is used like this:

    stat file.php

    Hope that this helps!
    Regards,
    Alex

Hello, @lcgondellesm

I will recommend to examine the web server (Apache/Nginx) error_log in order to track down what exactly is causing the issue.

You can simply execute this command and then access phpMyAdmin in order to see the logged error message:

Apache on Ubuntu:

tail -f /var/log/apache2/error.log

Apache on On Centos:

tail -f /usr/local/apache/logs/error_log

Nginx on Ubuntu:

tail -f /var/log/nginx/error.log

Feel free to share any logged messages here so we can investigate this further.

Hope that this helps!
Regards,
Alex

Thanks for you answer @alexdo , but there is nothing to see in the error.log . I checked the access log and can see I try to run /phpmyadmin.

Hello there! I am totally new in this world but everything can be done if you are able to search in the web.

I followed the tutorial given here in DO “How To Install phpMyAdmin From Source on Debian 10”, my mistake was to copy the code



$cfg[‘blowfish_secret’] = 'STRINGOFTHIRTYTWORANDOMCHARACTERS’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

First I got an error that xml extension was needed, so I installed it.

sudo apt install php-sml

then I restarted with:

sudo systemctl reload apache2

Then I got the error 500 described in this topic, so I found when I edited the config.inc.php file that the three dots (after “ IN THIS FOR COOKE AUTH! */ ” were copied too. I deleted them and worked right away.

I wish could help others

Kind regards to all!

and happy coding