Can’t Load PhpMyadmin On After Server Update

I always hate running server updates, something is bound to break but it’s better than being hacked I suppose. Anyway, a recent update to Ubuntu went a bit wonky or something and PhPMyadmin stopped working. This is likely something that can happen on any Linux OS so hopefully, this solution helps you out.

Whenever I tried to view PHPMyAdmin in the browser, It would return a 500 error. I checked the error logs for Apache and found the following error.

require_once(): open_basedir restriction in effect. File(/usr/share/php/Williamdes/MariaDBMySQLKBS/autoload.php)

The open_basedir restriction is a limitation that Apache can apply to a virtual host that will prevent it from being able to access files outside of specified directories. Handy if you are hacked and don’t want someone including sensitive files that the app does not need to access.

This appears to have happened with phpmyadmin was updated and the conf was replaced. I don’t remember how the initial exception to the directory made it’s way into the conf but it is gone now. The solution to this was quite simple.

Open up the PhpMyadmin Conf Or Other

Assuming you are just using the default install for phpmyadmin, you should find that it created a conf in the following directory. This may be different depending on the OS but you should have a conf somewhere with the phpmyadmin information in it.

\etc\apache2\conf-enabled\phpmyadmin.conf

Search this file for the following snippet

php_admin_value open_basedir

After this line, you will see a bunch of directory paths separated by a colon. All you gotta do is add the required include path from the original error to this list of allowed directories. So for this example, I added /usr/share/php/Williamdes/MariaDBMySQLKBS/ to the list of directories and saved the file. You may find there are some additional directories you have to add once you resolve this issue.

All you need to do now is reload the config and all is good.

#Check you havnt made a mistake anywhere before restarting
apachectl configtest

#If all is good, reload the config
sudo systemctl reload apache2

If you check phpmyadmin again, you should be able to load it up and work away as normal. Hope this has helped. If you are still having issues, please post a comment below.

 

Related Articles

Related Questions

WordPress Table of Contents Plus Not Working

I have been using this plugin for a while and i really like it. It seems to have completely stopped working recently. I can...

Function Keys Reversing Between Fn Actions And Normal

My keyboard has the usual F1 to F12 keys along the top. I use these for shortcuts in various applications. These keys also have...

Whirlpool Oven F6E6: Appliance Manager 1 Board Communication

I have a brand new Whirlpool oven W11I OM1 4MS2 H or (859991549450). I bought it alongside the microwave combi oven. I have had...

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Tools

Markdown To Html Converter

Welcome to our web-based tool designed to make your life easier by converting Markdown to HTML in a matter of seconds. Our user-friendly interface...

AI Content Detector

We've got this awesome free tool that'll help you figure out if that content you're looking at was written by a human or some...

Image Saturation

Are you looking for an easy-to-use, free app to modify your image saturation levels and make your pictures truly pop? Look no further! Our...

Pixelate Image Tool

Introducing the ultimate free online image pixelator tool that allows you to easily transform your images into stunning pixel art in just a few...

Image RGB Level Adjustment Tool

Introducing the ultimate image color adjustment tool for all your photo editing needs. Our free online tool lets you take full control of your...

Image Color Inverter

Looking for a quick and efficient way to convert your images into negatives? Our Free Image to Negative Converter is the answer! Our online...

Latest Posts

Latest Questions