2

The problem seems to be with this:

phpmyadmin not working due to missing extensions

But I have php-gettext installed, still it's not working. The log says this:

[Fri Nov 11 00:22:06.899944 2016] [:error] [pid 19641] [client 93...:53244] PHP Warning: require_once(): open_basedir restriction in effect. File(/usr/share/php/php-php-gettext/gettext.inc) 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/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/) in /usr/share/phpmyadmin/libraries/common.inc.php on line 77 [Fri Nov 11 00:22:06.900007 2016] [:error] [pid 19641] [client 93...:53244] PHP Warning: require_once(/usr/share/php/php-php-gettext/gettext.inc): failed to open stream: Operation not permitted in /usr/share/phpmyadmin/libraries/common.inc.php on line 77 [Fri Nov 11 00:22:06.900027 2016] [:error] [pid 19641] [client 93...:53244] PHP Fatal error: require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.') in /usr/share/phpmyadmin/libraries/common.inc.php on line 77

M. H.
  • 21
  • Possible duplicate of http://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-the-allowed-paths Error is similar – AnotherKiwiGuy Nov 11 '16 at 00:34
  • No it is not. I was able to solve the issue by myself now. For whatever reason, the path is wrong and the directory is named php-php-gettext instead of php-gettext. I don't know whos fault it is, but this seems like a bug. – M. H. Nov 12 '16 at 00:07
  • 1
    Nice. You can answer your own question. It's a great way to show how you worked it out for others who have similar issues :) – AnotherKiwiGuy Nov 12 '16 at 00:18

2 Answers2

1

I had the same problem after doing some updates.

I tried editing the vendor_config.php file but kept complaining, so I reverted the changes and went for the easy approach and just created a link to php-gettext with the expected name:

cd /usr/share/php

sudo ln -s /usr/share/php/php-gettext php-php-gettext

This solved the problem for me.

0

I had the same problem and solved it like this:

For some reason the path /usr/share/php/php-gettext is renamed (or wrong?) in the PHPMyAdmin files.

You have to change to files for this:

/usr/share/phpmyadmin/libraries/vendor_config.php:

Change this block:

/**
 * Path to gettext.inc file. Useful when you want php-gettext somewhere else,
 * eg. /usr/share/php/gettext/gettext.inc.
 */
if (is_dir('/usr/share/php/php-php-gettext/')) {
    define('GETTEXT_INC', '/usr/share/php/php-php-gettext/gettext.inc');
} else {
    define('GETTEXT_INC', '/usr/share/php/php-php-gettext/gettext.inc');
}

to this:

/**
 * Path to gettext.inc file. Useful when you want php-gettext somewhere else,
 * eg. /usr/share/php/gettext/gettext.inc.
 */
if (is_dir('/usr/share/php/php-gettext/')) {
    define('GETTEXT_INC', '/usr/share/php/php-gettext/gettext.inc');
} else {
    define('GETTEXT_INC', '/usr/share/php/php-gettext/gettext.inc');
}

And the configuration for the open_basedir in /etc/apache2/conf-enabled/phpmyadmin.conf to:

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/:/usr/share/php/phpseclib/

Alternatively (I didn't try it), you could copy or link the path /usr/share/php/php-gettext/ to /usr/share/php/php-php-gettext/

TIIUNDER
  • 1,203