Vestacp: Fix the PHPMYADMIN errors

Vestacp is a great free web panel https://vestacp.com/

When you install it from scrath through the installation found here: https://vestacp.com/#install

all looks good, but when you access PHPMYADMIN, you get errors like:

===============================================================================================
Warning in ./libraries/Util.class.php#516
file_exists(): open_basedir restriction in effect. File(doc/html/index.html) is not within the allowed path(s): (/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext)

Backtrace

./libraries/Util.class.php#516: file_exists(string ‘doc/html/index.html’)
./libraries/Util.class.php#540: PMA_Util::getDocuLink(
string ‘index’,
string ”,
)
./libraries/plugins/auth/AuthenticationCookie.class.php#171: PMA_Util::showDocu(string ‘index’)
./libraries/common.inc.php#872: AuthenticationCookie->auth()
./index.php#12: require_once(./libraries/common.inc.php)
===============================================================================================

They have done a script that should fix phpmyadmin issues, and many other things (please run it first): https://forum.vestacp.com/viewtopic.php?f=14&t=10307

But the error above remains, so I fixed it with this:

nano /etc/apache2/conf.d/phpmyadmin.conf

Find this line:
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext

Add /usr/share/doc to it, so it looks like this:
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext:/usr/share/doc

Save and do “service apache2 restart”

Solved 🙂

REMEMBER: Run EVERYTHING with ROOT, SUDO is not near enough 🙂

Leave a Comment

Your email address will not be published.

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

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close