View Full Version : Quercus and phpMyAdmin

07-21-2011, 01:57 PM
Hi. Has anyone had success with Quercus and phpMyAdmin?

Specifically, the following versions:

1) Quercus -
2) phpMyAdmin -
3) MySQL Community Server - 5.5.14
4) PHP 5.3.6 - VC9 x86 Thread Safe
5) Windows 7 Professional

These is the error message when I try to bring up the phpMyAdmin Login page:

Error in .\..\libraries\select_lang.lib.php#485
Method call 'translate' is not allowed for a null value.


.\..\libraries\select_lang.lib.php#485: __(string ltr)
.\..\libraries\common.inc.php#567: include()
.\..\index.php#33: require_once()


07-24-2011, 11:09 AM
hmm... I never had these error messages when using phpmyadmin. I always had problems with the mcrypt support, which needs to be enabled like described here http://quercus.caucho.com/mcrypt.xtp

could you please try this and see if your error is still there?

07-30-2011, 04:11 PM
Hi. Thanks for the suggestion. I did try this but am still getting the same error. I did try installing on two different laptops - same error message.

10-06-2011, 05:26 PM
This is still unresolved with phpMyAdmin 3.4.5:

Error in ./libraries/select_lang.lib.php#487
Method call 'translate' is not allowed for a null value.


./libraries/select_lang.lib.php#487: __(string ltr)
./libraries/common.inc.php#567: include()
./index.php#33: require_once()

What's the latest version supported by Quercus at this time? Alternatively, has anyone had any luck with one of the phpMyAdmin competitors under Quercus?

(Also, die spammers! :( )

EDIT: phpMyAdmin - seems to work fine. I expect that somewhere in the 3.x line, they started doing something Quercus doesn't yet support. :(

EDIT#2: Might http://bugs.caucho.com/view.php?id=4059 or http://bugs.caucho.com/view.php?id=4062 be related to this somehow? It seems there are lots of bugs in Mantis with working patches attached that have been stagnant for quite some time. It seems quite possible that someone has already fixed this problem, but those of us not building our own Quercus don't get to benefit. :(

11-06-2011, 11:52 AM
The "error" is in function _get_reader in phpmyadmin code of the gettext.inc.php file.

* Utility function to get a StreamReader for the given text domain.
function _get_reader($domain=null, $category=5, $enable_cache=true) {
global $text_domains, $default_domain, $LC_CATEGORIES;
if (!isset($domain)) $domain = $default_domain;
if (!isset($text_domains[$domain]->l10n)) {
// get the current locale
$locale = _setlocale(LC_MESSAGES, 0);
$bound_path = isset($text_domains[$domain]->path) ?
$text_domains[$domain]->path : './';
$subpath = $LC_CATEGORIES[$category] ."/$domain.mo";

$locale_names = get_list_of_locales($locale);
$input = null;
foreach ($locale_names as $locale) {
$full_path = $bound_path . $locale . "/" . $subpath;
if (file_exists($full_path)) {
$input = new FileReader($full_path);

if (!array_key_exists($domain, $text_domains)) {
// Initialize an empty domain object.
$text_domains[$domain] = new domain();
$text_domains[$domain]->l10n = new gettext_reader($input,

return $text_domains[$domain]->l10n;

For Quercus variable "$text_domains[domain]->l10n" exist, but for php a variable null not exist. (http://www.php.net/manual/en/function.isset.php)

Replace line "if (!isset($text_domains[$domain]->l10n)) {" by "if (!isset($text_domains[$domain]->l10n) || $text_domains[$domain]->l10n == null) {" "solve" the problem.

I also have to comment line 22 of file libraries/dbi/mysqli.dbi.lib.php "mysqli_report (MYSQLI_REPORT_OFF);"

02-02-2012, 11:18 AM
I have create QuercusMyAdmin projet with maven for simplify installation of patch.
Link : https://bitbucket.org/glopinous/quercusmyadmin/overview

03-24-2012, 09:10 AM
Thanks, glopinous. :cool:

I noticed that your web.xml has the <servlet> and <servlet-mapping> tags reversed. This is easily fixed, but a slight annoyance. :)

Also, phpMyAdmin still doesn't work quite "right", alas. (Look at the configuration page, for an obvious fault...) When I have some free time, I might take a look into what might need to be done further to make phpMyAdmin happier in Quercus.

I expect the proper answer will be to submit patches against Quercus, but that doesn't seem too hopeful looking at how the ones other people have done have sat languishing... :(

12-14-2012, 11:28 AM
Sorry for the big delay, but thank you:).
This to prevent the deployment with Jetty :(.
This is now fixed.

12-14-2012, 07:54 PM
Thanks for the update. We fixed a few Quercus bugs for phpMyAdmin about 6 months ago.