Anita
Anita

Reputation: 159

Export option gives strange errors in 4.3.2deb0.1 version for Ubuntu

When I try to use database export option I get this error:

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

Backtrace

./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)

Is this phpMyAdmin bug? What do I have to do to fix this?

Upvotes: 1

Views: 1649

Answers (1)

demlasjr
demlasjr

Reputation: 121

I had the same error and I fixed it by editing /usr/share/phpmyadmin/libraries/vendor_config.php

Find this like

     * 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');

Edit the path to:

define('TCPDF_INC', '/usr/share/phpmyadmin/libraries/tcpdf/tcpdf.php');

Another option is to disable open_basedir, but the first one is the safest :)

Upvotes: 3

Related Questions