Page 1 of 1

phpmyadmin error Call to undefined function_() [Solved]

PostPosted: 24. July 2012 22:04
by lucFX
Whwn I try to launch phpmyadmin I get the following error:
Fatal error: Call to undefined function __() in /opt/lampp/phpmyadmin/libraries/Config.class.php on line 755
I am ussing XAMPP 1.8 on Ubuntu 12.04
The lines should be:
/**
* verifies the permissions on config file (if asked by configuration)
* (must be called after config.inc.php has been merged)
*
* @return nothing
*/
function checkPermissions()
{
// Check for permissions (on platforms that support it):
if ($this->get('CheckConfigurationPermissions')) {
$perms = @fileperms($this->getSource());
if (!($perms === false) && ($perms & 2)) {
// This check is normally done after loading configuration
$this->checkWebServerOs();
if ($this->get('PMA_IS_WINDOWS') == 0) {
$this->source_mtime = 0;
die(__('Wrong permissions on configuration file, should not be world writable!')); //I guess this is the line that generate the error
}
}
}
}

/**
* returns specific config setting
*
* @param string $setting config setting
*
* @return mixed value
*/

Please I need help..Thank you!

Re: getting this phpmyadmin error Call to undefined function

PostPosted: 25. July 2012 00:12
by JonB
Two questions -

A. is this a LAMPP install that was upgraded?

B. Does the XAMPP Welcome Page (http://localhost/xampp) work correctly?

Thanks
8)

Re: getting this phpmyadmin error Call to undefined function

PostPosted: 25. July 2012 12:13
by lucFX
A. No. I did a clean install.
B.Yes . The only service that is broken is phpmyadmin

Re: getting this phpmyadmin error Call to undefined function

PostPosted: 25. July 2012 19:47
by JonB
OK thanks

It seems to be a conditional (meaning it only occurs when certain other things are true) phpMyAdmin error/bug. You can apparently edit your 'code' (Config.classes.php) to fix.

http://sourceforge.net/mailarchive/mess ... d=29567707

Please test and let me know if that is a fix

Good Luck
8)

Re: getting this phpmyadmin error Call to undefined function

PostPosted: 26. July 2012 14:05
by lucFX
I've added the line from sourceforge.
Now I am getting this message: Wrong permissions on configuration file, should not be world writable!
And I can't enter to login page.

Re: getting this phpmyadmin error Call to undefined function

PostPosted: 26. July 2012 15:22
by JonB
that is because the configuration file cannot have permissions set to '777' as ANYONE can change your file, therefore phpMyAdmin won't run (because it is a very smart program, LOL)

the 'most correct' permissions setting for config.inc.php is 600, meaning only the 'owner' can read and write the file (this can trip you if you are not careful about ownership.

The method for making it 'right' is this syntax from phpMyAdmins devloper docs ->> # remove world read and write permissions (it leaves the current group and users settings intact)
as root -

Code: Select all
cd /opt/lampp/phpmyadmin
chmod o-rw config.inc.php         


Source: http://www.phpmyadmin.net/documentation/

Good Luck

Re: getting this phpmyadmin error Call to undefined function

PostPosted: 26. July 2012 19:10
by lucFX
Thank you very much for your help JonB now it works.
So for others that have same problem to fix it follow the steps :
1. Open Config.class.php
2.Replace this line:
die(__('Wrong permissions on configuration file, should not be world writable!'));
with this one :
die(('Wrong permissions on configuration file, should not be world writable!'));
3. Save the changes in Config.class.php
4.Open terminal and insert these commands:
cd /opt/lampp/phpmyadmin
chmod o-rw config.inc.php

Re: phpmyadmin error Call to undefined function_() [Solved]

PostPosted: 26. July 2012 20:22
by JonB
OK, Great!

You are very welcome and thank you for summarizing the fix.

Good Luck with XAMPP/lampp

Re: phpmyadmin error Call to undefined function_() [Solved]

PostPosted: 27. November 2012 07:05
by refaelgold
tnx,i register for post you a big thank :-)


even stackoverflow cant figure it out

Re: phpmyadmin error Call to undefined function_() [Solved]

PostPosted: 27. November 2012 11:42
by JonB
Heh - thank you - its good to be appreciated.

:mrgreen: