0

Fatal error: Cannot access empty property in /home/public_html/sites/all/modules/dba/database/mysql.report.inc on line 44

I get the above fatal error on a WSD when clicking on /admin/reports/databasereport (using Drupal version 7.22).

Any idea what it means and how to fix it?

1

I haven't used the Database Administration module before but when i looked on the line 44 of that module and I found that:

$value = new stdClass();
$query = db_query('SHOW GLOBAL STATUS');
foreach ($query as $row) {
  $column = $row->variable_name;
  $value->$column = $row->value;
}
return $value;

It means you can't fetch the data from 'SHOW GLOBAL STATUS' SQL statement. So i think maybe your current MYSQL account didn't have right to do that.

4
  • 2
    This is supposed to be a module bug. i.e the above piece of code should check the results of the query before processing it. Oct 7 '13 at 6:59
  • 1
    That's right. They should check the result of db_query before using foreach.
    – Stone Vo
    Oct 7 '13 at 7:23
  • Is it a complicated fix? Sorry, I am really a neophyte with php. :)
    – user14666
    Oct 7 '13 at 20:19
  • Can you go to phpmyadmin and login by username/password MYSQL and after that run the script ''SHOW GLOBAL STATUS' from here. If you can't please go to cpanel and change the permissions for that user. From my view i just have thought like that.
    – Stone Vo
    Oct 8 '13 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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