phpmyadmin getting HTTP 500 error

Discussion in 'Systems Administration' started by BearCup, May 17, 2018.

  1. Hey!

    Yesterday phpmyadmin was working fine in my server, but today it's getting a 500 error.

    Code (Text):
    [Thu May 17 20:15:17.277309 2018] [:error] [pid 27295] [client] PHP Fatal error:  Uncaught Error: Call to undefined function __() in /usr/share/phpmyadmin/libraries/core.lib.php:245\nStack trace:\n#0 /usr/share/phpmyadmin/libraries/ PMA_fatalError('Error during se...')\n#1 /usr/share/phpmyadmin/libraries/ require('/usr/share/phpm...')\n#2 /usr/share/phpmyadmin/index.php(12): require_once('/usr/share/phpm...')\n#3 {main}\n  thrown in /usr/share/phpmyadmin/libraries/core.lib.php on line 245
    [Thu May 17 20:16:34.564414 2018] [auth_basic:error] [pid 27288] [client] AH01618: user  not found: /phpmyadmin/
    Not sure what happened, but I'm having issues after I installed dynmap.

    Using Apache2 and Ubuntu 16.04

    Any help is appreciated! Thank you!
  2. Do you get an error when you go to the phpmyadmin login page? Or does it just say Error HTTP 500?

    Also what version of phpmyadmin do you use?
    Which version your php is also important to, to check your php version do this command: php -v to check if all required dependencies are installed for phpmyadmin do: php -m
  3. This happens on chrome if I reload twice:



    This happens on Edge:


    On firefox is just a blank page. but I suppose that's just cache.
  4. alright apply the following permissions if you have installed in from a repository, first check if this is the path to your phpmyadmin before applying these permissions:

    chmod 755 -R /usr/share/phpmyadmin
    chmod 644 /usr/share/phpmyadmin/
  5. Check that your session directory is writable by the webserver process.

    The best way to do so is to create your own phpinfo file; in any web accessible folder create a file (you can call it test.php or phpinfo.php or whatever you'd like) with the following content:

    Open that file in your browser (http://localhost/test.php or similar) and look for the line session.save_path. That's your session folder; make sure the permissions are suitable and see if that helps.
  6. No luck for the first command :(
    Although I don't have a, only a

    I did find this when googling the issue, but didn't solve it.
  7. Sudo apt-get remove --purge phpmyadmin
    sudo apt-get autoremove
    sudo apt-get install phpmyadmin

    Should fix any errors DynMap made....
  8. I was thinking of that, but that doesn't mess with the database right?
  9. No won't hurt DB at all 2 separate things (phpmyadmin is just a web interface for your sql database) Be sure to allow it to remove the phpmyadmin database entry though. It will ask sometime in that process...

    (Not from inside mysql but from command prompt)
    Code (Text):
    Backing up MySql
    mysqldump -u root -p Tutorials > tut_backup.sql
    Restoring MySql
    mysql -u root -p Tutorials < tut_backup.sql
    #9 EODSteven, May 17, 2018
    Last edited: May 17, 2018
  10. Code (Text):

    sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
    sudo a2enconf phpmyadmin
    sudo service apache2 reload
  11. Delete the 'sample' part from that should fix it. Dont try to purge it or whatever. Because sometimes it can mess up with other applications within the machine as
  12. "ln: failed to create symbolic link '/etc/apache2/conf-available/phpmyadmin.conf': File exists"
    "Conf phpmyadmin already enabled"

    Still no luck :/ I guess I'll try re-install it.
    #12 BearCup, May 18, 2018
    Last edited: May 18, 2018
    • Agree Agree x 1
  13. If Purging phpmyadmin effects anything besides phpmyadmin, then something is seriously wrong with your Ubuntu system, Like I said, phpmyadmin is just a php web interface for the mysql database.
    #13 EODSteven, May 18, 2018
    Last edited: May 18, 2018
  14. Try to troubleshoot your problem, otherwise you won't learn anything from this mistake. It may be happening again in the future, so it is better to troubleshoot it now than later.
  15. Simply purging a service is just not the solution to a problem, it is making it easier but it is better to troubleshoot first before you purge an service like phpmyadmin. Most of the time the problem is in a small corner. reinstalling can always be used as a last resort option.
  16. Which PhP version do you have?
  17. PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )
  18. electronicboy

    IRC Staff

    from that php error, version is a non-issue, your configuration file for PMA has the wrong permissions set on it; You need to chmod the config file to something like 644; No idea what file it is off the top of my head (and I generally don't suggest installing something like PMA on your servers if you care about security, at the bare minimum, password protect that entire area of your web server)
    • Like Like x 1
    • Agree Agree x 1
  19. Do you have php7.0-mbstring php7.0-gettext installed on it? (php7.0-gettext is not a requirement though)
  20. Why wouldnt the version of php not be the issue? I was referring to maybe he/she doesn't have the right php packages installed. Or maybe PMA has a conflict with php7.0 which it does, but can still use PMA.

Share This Page