3

After installing phpMyAdmin on my Ubuntu server from PPA

https://launchpad.net/~nijel/+archive/ubuntu/phpmyadmin

I get a series of warnings. Thanks in advance!

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): (/tmp/:/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/)

Backtrace

./libraries/Util.class.php#521: file_exists(string 'doc/html/index.html') ./libraries/sanitizing.lib.php#92: PMA_Util::getDocuLink( string 'faq', string 'faq3-11', ) PMA_replaceDocLink(array) ./libraries/sanitizing.lib.php#152: preg_replace_callback( string '/\[doc@([a-zA-Z0-9_-]+)\]/', string 'PMA_replaceDocLink', string 'Podría ser aproximado. Pulse en el número para obtener la cantidad exacta. Ver [doc@faq3-11]FAQ 3.11.', ) ./templates/database/structure/table_header.phtml#43: PMA_sanitize(string 'Podría ser aproximado. Pulse en el número para obtener la cantidad exacta. Ver [doc@faq3-11]FAQ 3.11[/doc].') ./libraries/Template.class.php#80: include(./templates/database/structure/table_header.phtml) ./libraries/controllers/DatabaseStructureController.class.php#224: PMA\Template->render(array) ./db_structure.php#54: PMA\Controllers\DatabaseStructureController->indexAction()

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
razor7
  • 2,165
  • 2
  • 19
  • 32

1 Answers1

8

Forget it, I found the answer!

In my Ubuntu Server 14.04, I edited the file /etc/phpmyadmin/apache.conf, and searched for the following line:

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/

And added :/usr/share/doc/phpmyadmin/ at the end and the warning went away!

Huey
  • 5,110
  • 6
  • 32
  • 44
razor7
  • 2,165
  • 2
  • 19
  • 32
  • 1
    Hmm, but this is already included in the package, so most likely you're using outdated version of the config file... – Michal Čihař Dec 14 '15 at 12:07
  • @ Michal | yes, usually when you create a backup file and move to a new server, to cut through with shortcuts old configs no longer work 100% – dev101 Feb 16 '17 at 01:50
  • The main addition is this: **Please restart apache after any configurations to any config file.** I know this goes without saying but it cost me almost a day I'll never get back before I realized this. Goodluck – Richard Jun 22 '18 at 18:28