Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to a member function fetch_array() on boolean #6

Closed
arthurlutz opened this issue Oct 10, 2016 · 11 comments
Closed

Call to a member function fetch_array() on boolean #6

arthurlutz opened this issue Oct 10, 2016 · 11 comments

Comments

@arthurlutz
Copy link

on my self-hosted emoncms after an upgrade to emoncms 9.7.3 I get the following on dashboard view /emoncms/dashboard/view/elec

Fatal error: Call to a member function fetch_array() on boolean in /var/www/arthur/emoncms/Modules/graph/graph_model.php on line 91

moving graph out of modules fixes the bug and the dashboards appear ok.

When graph is there the "graph" section seems to work fine.

@JosefKrieglstein
Copy link

Hi,

Same Fatal error, clean install from git, Debian.
Error is displayed instead of:

  1. Any Dashboard,
  2. Dashboard edit.

Cannot save graph - without error, without warning ... just nothing happend.

http://.../dashboard/edit?id=1
Fatal error: Call to a member function fetch_array() on boolean in /var/www/users/emoncms
/www/emoncms/Modules/graph/graph_model.php on line 91

http://.../dashboard/view&id=1
Fatal error: Call to a member function fetch_array() on boolean in /var/www/users/emoncms/www/emoncms/Modules/graph/graph_model.php on line 91

In Apache log file is same information, nothing more.

Josef Krieglstein

@glynhudson
Copy link
Member

glynhudson commented Oct 24, 2016

Sorry to hear your having trouble.

What version PHP are you running?

Could you post your Emoncms Admin page?

Here is the mysql fetch_array function that's causing the error for you: http://php.net/manual/en/mysqli-result.fetch-array.php

@JosefKrieglstein
Copy link

Hi,

admin page:
Emoncms Version 9.7.3 | 2016.09.28
Server OS Linux 3.2.0-4-amd64
Host apache1 (127.0.1.1)
Date 2016-11-03 20:38:38 CET
Uptime 20:38:38 up 249 days, 7:29, 0 users, load average: 0.00, 0.01, 0.05
HTTP Server Apache/2.4.10 (Debian) HTTP/1.1 CGI/1.1 80
Database Version MySQL 5.5.52-0+deb8u1
Host localhost (127.0.0.1)
Date 2016-11-03 20:38:38 (UTC 01:00‌​)
Stats Uptime: 994770 Threads: 1 Questions: 24899378 Slow queries: 0 Opens: 338 Flush tables: 1 Open tables: 186 Queries per second avg: 25.030
Memory RAM
Used 98.23%
Total: 495.52 MB Used: 486.77 MB Free: 8.75 MB
Disk Mount Stats
/
Used 7.35%
Total: 38.01 GB Used: 2.79 GB Free: 33.28 GB
PHP Version 5.6.26-0+deb8u1 (Zend Version 2.6.0)
Modules Core date ereg libxml openssl pcre zlib bcmath bz2 calendar ctype dba dom hash fileinfo filter ftp gettext SPL iconv mbstring session posix Reflection standard shmop SimpleXML soap sockets Phar exif sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip apache2handler PDO curl dio gd json mcrypt mysql mysqli pdo_mysql readline redis mhash Zend OPcache

@JosefKrieglstein
Copy link

Hi,

I again go into admin page, update & check button found something with graph, by executing it, it is OK now.
I think, I was there before, because i found that solution for Version 7 in 2014, I have no idea, why I didn't see it on admin page some time ago. (emoncms/event_archived#26)

This issue is closed from my side.
Thanks a lot.

@Paul-Reed Paul-Reed reopened this Nov 9, 2016
@Paul-Reed
Copy link
Member

@arthurlutz Have you any further information or update please.

Paul

@pm-cz
Copy link

pm-cz commented Jan 18, 2017

I have encountered the same problem (adding the graph to existing installation later) and the cause was that the graph table has not been created (i.e. query like CREATE TABLE graph(idint(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,useridint(11) DEFAULT NULL,data text ) was not executed).

After creating the table manually the problem ceased to exist.

So the URL to use will be http://yoursite/emoncms/admin/db

@Paul-Reed
Copy link
Member

That URL will take you to the update database function, alternatively you can update via the menu;
Setup > Administration > Update Database
@arthurlutz did you update your database?

Paul

@arthurlutz
Copy link
Author

I'm not having this bug anymore, I don't remember exactly how I fixed it though.

@pm-cz
Copy link

pm-cz commented Jan 19, 2017

Maybe it would be better to make it clear in README.md and instead of the text "Check database updates in Admin" add the information to not forget to visit

Setup > Administration > Update Database

and commit the changes. BTW it was not so straightforward, because I did not have this entry in menu and accessing the URL directly ended with page requesting reauthentication (I logged out/in under the same account and after that it worked).

@Paul-Reed
Copy link
Member

Yes, the page by design is only accessible on first login, therefore it's sometimes necessary to reauthenticate.
I'll have a look at the documentation later and see if I can make it clearer.

Thanks.

Paul

Paul-Reed added a commit to emoncms/emoncms that referenced this issue Jan 19, 2017
Further explain the MYSQL db update process for Modules, to fix emoncms/graph#6
@kevteden
Copy link

I need help in php

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants