PMA 4.5.2.0 file_exists():open_basedir 限制生效

PMA 4.5.2.0 file_exists(): open_basedir restriction in effect

从 PPA

在我的 Ubuntu 服务器上安装 phpMyAdmin 后

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

我收到一系列警告。提前致谢!

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()

算了,我找到答案了!

在我的 Ubuntu 服务器 14.04 中,我编辑了文件 /etc/phpmyadmin/apache.conf,并搜索了以下行:

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/,警告消失了!