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

List Sorting Tool

Welcome to our innovative list ordering and management tool. This next-level platform enables you to sort a list of items in ascending or descending...

Sudoku Solver

Welcome to our free online Sudoku solving tool, an interactive platform for puzzle enthusiasts seeking a break from a Sudoku conundrum. This advanced platform...

Apply Image Filters To Image

Digital imagery in the modern world is all about reinforcing emotions and stories behind each photo we take. To amplify this storytelling, we are...

Add Watermark To Image

As the world is increasingly consumed by digital media, protecting your original images is paramount. We are thrilled to introduce you to our innovative...

CSV To Xml Converter

Welcome to our CSV to XML converter tool, a convenient and user-friendly solution for all your data conversion needs. This versatile tool on our...

RGB Image Splitter

Welcome to our innovative RGB Splitter - a unique image analyzer tool that offers an in-depth peek into the building blocks of your photos....

Latest Posts

Latest Questions