2

I have installed phpmyadmin but when I try to launch it won't. I have this error :

Fatal error: Call to undefined function PMA_DBI_num_rows() in /usr/share/phpmyadmin/libraries/navigation/Nodes/Node.class.php on line 397

I have installed php5-mysql but it still not working. Which module that contains PMA_DBI_num_rows() function?

Thanks in advance

Hunsu
  • 3,281
  • 7
  • 29
  • 64

2 Answers2

0

Just install the following: apt-get install php5-mysql

iNDicator
  • 534
  • 2
  • 6
  • 15
0

The PMA_DBI_num_rows() function is implemented in one of the dbi libraries, which are located under phpmyadmin/libraries/dbi

They should be part of any phpMyAdmin installation, so I'm wondering if you have an incomplete or damaged installation.

phpMyAdmin will load one of its dbi drivers depending on the value of the extension, in your config file:

$cfg['Servers'][$i]['extension'] = 'mysqli';

Here's where it loads the dbi, from code in libraries/database_interface.lib.php:

include_once './libraries/dbi/'
    . $GLOBALS['cfg']['Server']['extension'] . '.dbi.lib.php';

So either you have misconfigured your config file with an unknown value for extension, or else you are missing the file corresponding to a valid extension.

The valid values for extension are 'mysql', 'mysqli', and 'drizzle'.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
  • where it's located the config file on ubuntu? – Hunsu Jan 20 '14 at 23:14
  • I don't use Ubuntu currently, I use CentOS. But I see in https://help.ubuntu.com/community/phpMyAdmin it looks like the customary location for phpmyadmin is `/var/www/phpmyadmin`. – Bill Karwin Jan 20 '14 at 23:39
  • I have checked the config file and I have the correct value : $cfg['Servers'][$i]['extension'] = 'mysqli'; – Hunsu Jan 20 '14 at 23:40
  • Then check if the file `/var/www/phpmyadmin/libraries/dbi/mysqli.dbi.lib.php` exists and is readable by the www user. – Bill Karwin Jan 20 '14 at 23:41
  • I resolved the problem by installing php-mysqlnd. – Hunsu Jan 21 '14 at 09:46