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

  • Possible duplicate of stackoverflow.com/questions/1846882/… Error is similar – ThatGuy Nov 11 '16 at 0: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 0: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 :) – ThatGuy Nov 12 '16 at 0:18
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/

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.