VestaCP - Ubuntu - phpmyadmin ошибка - open basedir restriction in effect. File(doc/html/index.html)
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
VestaCP - Ubuntu - phpmyadmin ошибка - open basedir restriction in effect. File(doc/html/index.html)
Если в phpmyadmin Вы получаете ошибку вида:
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)
то решается она добавлением директории /usr/share/doc в open_basedir для директории phpmyadmin:
# vi /etc/apache2/conf.d/phpmyadmin.conf php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/usr/share/doc:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
полный конфиг:
<Directory /usr/share/phpmyadmin> Options FollowSymLinks DirectoryIndex index.php
<IfModule mod_php5.c> AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off php_flag track_vars On php_flag register_globals Off php_admin_flag allow_url_fopen Off php_value include_path . php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/usr/share/doc:/var/lib/phpmyadmin/:/usr/share/php/php-gettext </IfModule> </Directory>
Посмотреть какие файлы установил phpmyadmin можно командой:
# dpkg-query -L phpmyadmin