当我尝试使用数据库导出选项时,我收到此错误:
Warning in ./libraries/plugins/export/ExportPdf.class.php#16
file_exists(): open_basedir restriction in effect. File(/usr/share/php/tcpdf/tcpdf.php) is not within the allowed path(s): (/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/)
回溯
./libraries/plugins/export/ExportPdf.class.php#16: file_exists(string '/usr/share/php/tcpdf/tcpdf.php')
./libraries/plugin_interface.lib.php#76: include_once(./libraries/plugins/export/ExportPdf.class.php)
./libraries/display_export.inc.php#31: PMA_getPlugins(
string 'export',
string 'libraries/plugins/export/',
array,
)
./server_export.php#27: require_once(./libraries/display_export.inc.php)
这是phpMyAdmin的错误吗?我该怎么做才能解决这个问题?
答案 0 :(得分:2)
我遇到了同样的错误,我通过编辑/usr/share/phpmyadmin/libraries/vendor_config.php
找到这个像
* Path to tcpdf.php file. Useful when you want to use system tcpdf,
* eg. /usr/share/php/tcpdf/tcpdf.php.
*/
define('TCPDF_INC', '/usr/share/php/tcpdf/tcpdf.php');
编辑路径:
define('TCPDF_INC', '/usr/share/phpmyadmin/libraries/tcpdf/tcpdf.php');
另一个选择是禁用open_basedir,但第一个是最安全的:)