phpmyadmin error Call to undefined function_() [Solved]

Problems with the Linux version of XAMPP, questions, comments, and anything related.

phpmyadmin error Call to undefined function_() [Solved]

Postby lucFX » 24. July 2012 22:04

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!
lucFX
 
Posts: 4
Joined: 24. July 2012 21:54
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04

Re: getting this phpmyadmin error Call to undefined function

Postby JonB » 25. July 2012 00:12

Two questions -

A. is this a LAMPP install that was upgraded?

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

Thanks
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: getting this phpmyadmin error Call to undefined function

Postby lucFX » 25. July 2012 12:13

A. No. I did a clean install.
B.Yes . The only service that is broken is phpmyadmin
lucFX
 
Posts: 4
Joined: 24. July 2012 21:54
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04

Re: getting this phpmyadmin error Call to undefined function

Postby JonB » 25. July 2012 19:47

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)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: getting this phpmyadmin error Call to undefined function

Postby lucFX » 26. July 2012 14:05

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.
lucFX
 
Posts: 4
Joined: 24. July 2012 21:54
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04

Re: getting this phpmyadmin error Call to undefined function

Postby JonB » 26. July 2012 15:22

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
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: getting this phpmyadmin error Call to undefined function

Postby lucFX » 26. July 2012 19:10

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
lucFX
 
Posts: 4
Joined: 24. July 2012 21:54
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04

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

Postby JonB » 26. July 2012 20:22

OK, Great!

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

Good Luck with XAMPP/lampp
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

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

Postby refaelgold » 27. November 2012 07:05

tnx,i register for post you a big thank :-)


even stackoverflow cant figure it out
refaelgold
 
Posts: 1
Joined: 27. November 2012 07:04
XAMPP Version: 5.6.3
Operating System: UbUnTu 12.10

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

Postby JonB » 27. November 2012 11:42

Heh - thank you - its good to be appreciated.

:mrgreen:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 2 guests