0

phpMyAdmin is giving the following warning on the login page:

Warning in ./libraries/Util.class.php#521 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/:/usr/share/javascript/)

Backtrace ./libraries/Util.class.php#521: file_exists(string 'doc/html/index.html') ./libraries/Util.class.php#545: PMA_Util::getDocuLink( string 'index', string '', ) ./libraries/plugins/auth/AuthenticationCookie.class.php#175: PMA_Util::showDocu(string 'index') ./libraries/common.inc.php#880: AuthenticationCookie->auth() ./index.php#12: require_once(./libraries/common.inc.php)

This suggests /etc/phpmyadmin/apache.conf may not be configured correctly. I hence checked the php_admin_value:

php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/

This looks right, so what am I missing?

Community
  • 1
  • 1
Huey
  • 5,110
  • 6
  • 32
  • 44
  • What's the installation path of your phpmyadmin? PHP is trying to check if /doc/html/index.html exists relative to your phpmyadmin installation path. So that path must be in the open_basedir config value. – Dan H Jan 03 '16 at 00:28
  • It's `/usr/share/phpmyadmin`. `/usr/share/phpmyadmin/doc/html/index.html` is there. Since it's specified above, that should be it, right? – Huey Jan 03 '16 at 00:32

1 Answers1

0

As it turns out, I was editing the wrong Apache configuration file. Instead of /etc/phpmyadmin/apache.conf, I should have been editing the one in /etc/apache2/sites-available.

Huey
  • 5,110
  • 6
  • 32
  • 44