Community
OpenEnergyMonitor

Community

Help: "Fatal error: . . . " after emonPi update


(Jose) #1

I was happy with my emoncms running day after day for 2 years.
Today instead of going to play with my children I had the happy idea of pressing a button that said “Update” in the administration menu of Emoncms.
Since then I can not enter the application; When I put the address in the web browser, I receive the message:
“Fatal error: Call to a member function fetch_row () on boolean in /var/www/emoncms/Modules/user/user_model.php on line 804”
The content of the user_model.php lines is as follows:

801 public function get_number_of_users ()
802 {
803 $ result = $ this-> mysqli-> query (“SELECT COUNT (*) FROM users”);
804 $ row = $ result-> fetch_row ();
805 return $ row [0];
806}

I have no idea of php, or linux, or mysql …
If someone can give me a help for fools I would be very grateful.


Unable to connect EmonCMS
(Greebo) #2

Have you tried clearing your browser cache (or running it from a different browser than you normally do)?
You could also try a “private” or “incognito” window…


(Jose) #3

Hi, Greebo.
Thanks for your interest.
I have tried to clean cache (F5), and to use another browser, normal and in private mode and the result is identical.


(Greebo) #4

That’s not usually sufficient - you actually have to clear your browser cache if the problem is with cached files.

With that said however, if you’ve tried other browsers that have never been used to get to EmonCMS, they shouldn’t have any javascript cached from the previous versions, so maybe someone else has an idea.


(Robert Wall) #5

Did you mean [f5] or [Ctrl]+[f5]

[f5] only refreshes the page, [Ctrl]+[f5] should fetch everything again.


(Jose) #6

Hello, Robert and welcome to my problem.
Certainly the correct thing is [Ctrl] + [F5], I was in an error, but that has not solved my problem either.
I have also tried from a new mobile device, as well as from another computer that has never been in my network, as Greebo has suggested, but the result is the same error.


(Robert Wall) #7

Some modules are now optional, and not included in the update/distribution. Are you using something that is in, or has now been moved into, one of those?

I’m not an emonCMS expert, I don’t know the details, so I can’t help you very much.


(Jose) #8

I do not know that. I only pressed a button on the administrator screen that said “Update”. Nothing else. I have not even had occasion to select anything. After the update, a message appeared saying that I had to re-login and it has never been possible to do so again. I’ve been reading and it seems to be an error of the query to mysql. I have access with Putty to the linux of my emon-base, but I have no idea how to deal with it.


(Robert Wall) #9

I suggest you start looking here - this is the best I can do for you. I don’t know that this is your problem, I am only making a suggestion:


(Jose) #10

Thanks for your help, Robert.
Reinstall is the last step. I probably lose 2 years of information if I do that.
I will wait with the hope that someone else can help me.


(Carlos AG) #11

Hola Pepe,

I have the feeling that the update process has updated your files but not the schema of the database (the tables that hold the data in the database).

The error seems to be that the query to count the number of users in the database (line 803) returns false (instead of a number) and the error is triggered when trying to fetch that number (line 804)

Can you please update the database by login in your emonpi and running
php /home/pi/emonpi/emoncmsdbupdate.php


(Jose) #12

Hi Carlos
I have followed your advice, but the same error continues.
This is the log that I have obtained.

Output


login as: pi
[email protected]'s password:

ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â                                                   ooooooooo.    o8o  â
â                                                   `888   `Y88.  `"'  â
â  .ooooo.  ooo. .oo.  .oo.    .ooooo.  ooo. .oo.    888   .d88' oooo  â
â d88' `88b `888P"Y88bP"Y88b  d88' `88b `888P"Y88b   888ooo88P'  `888  â
â 888ooo888  888   888   888  888   888  888   888   888          888  â
â 888    .o  888   888   888  888   888  888   888   888          888  â
â `Y8bod8P' o888o o888o o888o `Y8bod8P' o888o o888o o888o        o888o â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

The file system is in Read Only (RO) mode. If you need to make changes,
use the command 'rpi-rw' to put the file system in Read Write (RW) mode.
Use 'rpi-ro' to return to RO mode. The /home/pi/data directory is always in RW mode.

[email protected](rw):~$ php /home/pi/emonpi/emoncmsdbupdate.php
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
{"0":"ALTER TABLE `dashboard` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","1":"ALTER TABLE `dashboard` ADD `userid` int(11)","2":"ALTER TABLE `dashboard` ADD `content` text","3":"ALTER TABLE `dashboard` ADD `height` int(11) DEFAULT '600'","4":"ALTER TABLE `dashboard` ADD `name` varchar(30) DEFAULT 'no name'","5":"ALTER TABLE `dashboard` ADD `alias` varchar(20) DEFAULT ''","6":"ALTER TABLE `dashboard` ADD `description` varchar(255) DEFAULT 'no description'","7":"ALTER TABLE `dashboard` ADD `main` tinyint(1) DEFAULT '0'","8":"ALTER TABLE `dashboard` ADD `public` tinyint(1) DEFAULT '0'","9":"ALTER TABLE `dashboard` ADD `published` tinyint(1) DEFAULT '0'","10":"ALTER TABLE `dashboard` ADD `showdescription` tinyint(1) DEFAULT '0'","11":"ALTER TABLE `dashboard` ADD `backgroundcolor` varchar(6) DEFAULT 'EDF7FC'","12":"ALTER TABLE `dashboard` ADD `gridsize` tinyint(1) DEFAULT '20'","13":"ALTER TABLE `dashboard` ADD `feedmode` varchar(8) DEFAULT 'feedid'","14":"ALTER TABLE `device` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","15":"ALTER TABLE `device` ADD `userid` int(11)","16":"ALTER TABLE `device` ADD `nodeid` text","17":"ALTER TABLE `device` ADD `name` text","18":"ALTER TABLE `device` ADD `description` text","19":"ALTER TABLE `device` ADD `type` varchar(32)","20":"ALTER TABLE `device` ADD `devicekey` varchar(64)","21":"ALTER TABLE `device` ADD `time` int(10)","22":"ALTER TABLE `feeds` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","23":"ALTER TABLE `feeds` ADD `name` text","24":"ALTER TABLE `feeds` ADD `userid` int(11)","25":"ALTER TABLE `feeds` ADD `tag` text","26":"ALTER TABLE `feeds` ADD `time` int(10)","27":"ALTER TABLE `feeds` ADD `value` double","28":"ALTER TABLE `feeds` ADD `datatype` int(11) NOT NULL","29":"ALTER TABLE `feeds` ADD `public` tinyint(1) DEFAULT '0'","30":"ALTER TABLE `feeds` ADD `size` int(11)","31":"ALTER TABLE `feeds` ADD `engine` int(11) DEFAULT '0' NOT NULL","32":"ALTER TABLE `feeds` ADD `server` int(11) DEFAULT '0' NOT NULL","33":"ALTER TABLE `feeds` ADD `processList` text","34":"ALTER TABLE `feeds` ADD `unit` varchar(10) DEFAULT ''","35":"ALTER TABLE `graph` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","36":"ALTER TABLE `graph` ADD `userid` int(11)","37":"ALTER TABLE `graph` ADD `groupid` int(11) DEFAULT '0'","38":"ALTER TABLE `graph` ADD `data` text","39":"ALTER TABLE `postprocess` ADD `userid` int(11)","40":"ALTER TABLE `postprocess` ADD `data` text","41":"ALTER TABLE `setup` ADD `state` varchar(32) DEFAULT 'unconfigured'","42":"ALTER TABLE `setup` ADD `wifi` varchar(32) DEFAULT 'unconfigured'","43":"ALTER TABLE `sync` ADD `userid` int(11)","44":"ALTER TABLE `sync` ADD `host` varchar(64)","45":"ALTER TABLE `sync` ADD `username` varchar(30)","46":"ALTER TABLE `sync` ADD `apikey_read` varchar(64)","47":"ALTER TABLE `sync` ADD `apikey_write` varchar(64)","48":"ALTER TABLE `users` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","49":"ALTER TABLE `users` ADD `username` varchar(30)","50":"ALTER TABLE `users` ADD `email` varchar(64)","51":"ALTER TABLE `users` ADD `password` varchar(64)","52":"ALTER TABLE `users` ADD `salt` varchar(32)","53":"ALTER TABLE `users` ADD `apikey_write` varchar(64)","54":"ALTER TABLE `users` ADD `apikey_read` varchar(64)","55":"ALTER TABLE `users` ADD `lastlogin` datetime","56":"ALTER TABLE `users` ADD `admin` int(11) NOT NULL","57":"ALTER TABLE `users` ADD `gravatar` varchar(30) DEFAULT ''","58":"ALTER TABLE `users` ADD `name` varchar(30) DEFAULT ''","59":"ALTER TABLE `users` ADD `location` varchar(30) DEFAULT ''","60":"ALTER TABLE `users` ADD `timezone` varchar(64) DEFAULT 'UTC'","61":"ALTER TABLE `users` ADD `language` varchar(5) DEFAULT 'en_EN'","62":"ALTER TABLE `users` ADD `bio` text","63":"ALTER TABLE `users` ADD `tags` text","64":"ALTER TABLE `users` ADD `startingpage` varchar(64) DEFAULT 'feed\/list'","65":"ALTER TABLE `users` ADD `email_verified` int(11) DEFAULT '0'","66":"ALTER TABLE `users` ADD `verification_key` varchar(64) DEFAULT ''","67":"ALTER TABLE `users` ADD `preferences` varchar(255)","68":"ALTER TABLE `rememberme` ADD `persistentToken` varchar(40)","error":"Can't find file: 'dashboard' (errno: 2)"}
[email protected](rw):~$


(Brian Orpin) #13

Try the following commands

cd /var/www/emoncms/Modules/dashboard
git pull

Then run the first command again, might fix it.


(Brian Orpin) #14

@cagabi - does that file get updated? Could it be out of date?

Can’t remember where the source for this file is.


(Jose) #15

Hi, Brian, and wellcome to “my” problem.
Error persist.
here’s the log.

login as: pi
[email protected]'s password:

ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â                                                   ooooooooo.    o8o  â
â                                                   `888   `Y88.  `"'  â
â  .ooooo.  ooo. .oo.  .oo.    .ooooo.  ooo. .oo.    888   .d88' oooo  â
â d88' `88b `888P"Y88bP"Y88b  d88' `88b `888P"Y88b   888ooo88P'  `888  â
â 888ooo888  888   888   888  888   888  888   888   888          888  â
â 888    .o  888   888   888  888   888  888   888   888          888  â
â `Y8bod8P' o888o o888o o888o `Y8bod8P' o888o o888o o888o        o888o â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

The file system is in Read Only (RO) mode. If you need to make changes,
use the command 'rpi-rw' to put the file system in Read Write (RW) mode.
Use 'rpi-ro' to return to RO mode. The /home/pi/data directory is always in RW mode.

[email protected](rw):~$ cd /var/www/emoncms/Modules/dashboard/
[email protected](rw):dashboard$ git pull
Already up-to-date.
[email protected](rw):dashboard$ php /home/pi/emonpi/emoncmsdbupdate.php
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
PHP Notice:  Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226

Notice: Trying to get property of non-object in /var/www/emoncms/Lib/dbschemasetup.php on line 226
{"0":"ALTER TABLE `dashboard` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","1":"ALTER TABLE `dashboard` ADD `userid` int(11)","2":"ALTER TABLE `dashboard` ADD `content` text","3":"ALTER TABLE `dashboard` ADD `height` int(11) DEFAULT '600'","4":"ALTER TABLE `dashboard` ADD `name` varchar(30) DEFAULT 'no name'","5":"ALTER TABLE `dashboard` ADD `alias` varchar(20) DEFAULT ''","6":"ALTER TABLE `dashboard` ADD `description` varchar(255) DEFAULT 'no description'","7":"ALTER TABLE `dashboard` ADD `main` tinyint(1) DEFAULT '0'","8":"ALTER TABLE `dashboard` ADD `public` tinyint(1) DEFAULT '0'","9":"ALTER TABLE `dashboard` ADD `published` tinyint(1) DEFAULT '0'","10":"ALTER TABLE `dashboard` ADD `showdescription` tinyint(1) DEFAULT '0'","11":"ALTER TABLE `dashboard` ADD `backgroundcolor` varchar(6) DEFAULT 'EDF7FC'","12":"ALTER TABLE `dashboard` ADD `gridsize` tinyint(1) DEFAULT '20'","13":"ALTER TABLE `dashboard` ADD `feedmode` varchar(8) DEFAULT 'feedid'","14":"ALTER TABLE `device` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","15":"ALTER TABLE `device` ADD `userid` int(11)","16":"ALTER TABLE `device` ADD `nodeid` text","17":"ALTER TABLE `device` ADD `name` text","18":"ALTER TABLE `device` ADD `description` text","19":"ALTER TABLE `device` ADD `type` varchar(32)","20":"ALTER TABLE `device` ADD `devicekey` varchar(64)","21":"ALTER TABLE `device` ADD `time` int(10)","22":"ALTER TABLE `feeds` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","23":"ALTER TABLE `feeds` ADD `name` text","24":"ALTER TABLE `feeds` ADD `userid` int(11)","25":"ALTER TABLE `feeds` ADD `tag` text","26":"ALTER TABLE `feeds` ADD `time` int(10)","27":"ALTER TABLE `feeds` ADD `value` double","28":"ALTER TABLE `feeds` ADD `datatype` int(11) NOT NULL","29":"ALTER TABLE `feeds` ADD `public` tinyint(1) DEFAULT '0'","30":"ALTER TABLE `feeds` ADD `size` int(11)","31":"ALTER TABLE `feeds` ADD `engine` int(11) DEFAULT '0' NOT NULL","32":"ALTER TABLE `feeds` ADD `server` int(11) DEFAULT '0' NOT NULL","33":"ALTER TABLE `feeds` ADD `processList` text","34":"ALTER TABLE `feeds` ADD `unit` varchar(10) DEFAULT ''","35":"ALTER TABLE `graph` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","36":"ALTER TABLE `graph` ADD `userid` int(11)","37":"ALTER TABLE `graph` ADD `groupid` int(11) DEFAULT '0'","38":"ALTER TABLE `graph` ADD `data` text","39":"ALTER TABLE `postprocess` ADD `userid` int(11)","40":"ALTER TABLE `postprocess` ADD `data` text","41":"ALTER TABLE `setup` ADD `state` varchar(32) DEFAULT 'unconfigured'","42":"ALTER TABLE `setup` ADD `wifi` varchar(32) DEFAULT 'unconfigured'","43":"ALTER TABLE `sync` ADD `userid` int(11)","44":"ALTER TABLE `sync` ADD `host` varchar(64)","45":"ALTER TABLE `sync` ADD `username` varchar(30)","46":"ALTER TABLE `sync` ADD `apikey_read` varchar(64)","47":"ALTER TABLE `sync` ADD `apikey_write` varchar(64)","48":"ALTER TABLE `users` ADD `id` int(11) NOT NULL auto_increment PRIMARY KEY","49":"ALTER TABLE `users` ADD `username` varchar(30)","50":"ALTER TABLE `users` ADD `email` varchar(64)","51":"ALTER TABLE `users` ADD `password` varchar(64)","52":"ALTER TABLE `users` ADD `salt` varchar(32)","53":"ALTER TABLE `users` ADD `apikey_write` varchar(64)","54":"ALTER TABLE `users` ADD `apikey_read` varchar(64)","55":"ALTER TABLE `users` ADD `lastlogin` datetime","56":"ALTER TABLE `users` ADD `admin` int(11) NOT NULL","57":"ALTER TABLE `users` ADD `gravatar` varchar(30) DEFAULT ''","58":"ALTER TABLE `users` ADD `name` varchar(30) DEFAULT ''","59":"ALTER TABLE `users` ADD `location` varchar(30) DEFAULT ''","60":"ALTER TABLE `users` ADD `timezone` varchar(64) DEFAULT 'UTC'","61":"ALTER TABLE `users` ADD `language` varchar(5) DEFAULT 'en_EN'","62":"ALTER TABLE `users` ADD `bio` text","63":"ALTER TABLE `users` ADD `tags` text","64":"ALTER TABLE `users` ADD `startingpage` varchar(64) DEFAULT 'feed\/list'","65":"ALTER TABLE `users` ADD `email_verified` int(11) DEFAULT '0'","66":"ALTER TABLE `users` ADD `verification_key` varchar(64) DEFAULT ''","67":"ALTER TABLE `users` ADD `preferences` varchar(255)","68":"ALTER TABLE `rememberme` ADD `persistentToken` varchar(40)","error":"Can't find file: 'dashboard' (errno: 2)"}
[email protected](rw):dashboard$

(Carlos AG) #16

This is the file: https://github.com/openenergymonitor/emonpi/blob/master/emoncmsdbupdate.php

Last update was 3 years ago but I am sure the script works ok as it is used by the emonpi updater


(Carlos AG) #17

I think the key is this error:

That is a mysql error that means that the file for the “dashboard” table of the database is missing. I think in the update process your database got corrupted.

Apart of that, those notices in this line are a bad sign, they tell us again there is something wrong with the database, i see in line 224 we try to fetch some data from the database but what we get is in the wrong format (the notice in your log is telling us that), then the query that gets build because of that (via line 228) to update the database is totally wrong. In fact we can see it in your log that the query is trying to add every single field to every single table in the database and that doesn’t make any sense. Sorry if it doesn’t make very much sense but it’s good to keep these as notes.

So, what to do now???

Let me think


(Jose) #18

If you want, I have no problem in attaching a copy of my corrupt databases. I can not help but be grateful for the help, but you have to tell me how to do it.
The fault has been mine for having updated without having made a backup copy. I guess I’ll have my punishment losing 2 years of data.


(Paul Reed) #19

@Pepe_Asustado Have you tried what Brian suggested earlier?
Does the path /var/www/emoncms/Modules/dashboard actually exist?


(Jose) #20

Yes.

Output

[email protected](ro):dashboard$ ls
AntiXSS    Dashboard2.JPG            dashboard.js          dashboard_menu.php   dashboard.png         LICENSE.txt  module.json  Views
dashboard  dashboard_controller.php  dashboard_langjs.php  dashboard_model.php  dashboard_schema.php  locale       Readme.md    widget
[email protected](ro):dashboard$

I was tried Brian’s suggestion with no result.

Output

[email protected](ro):dashboard$ git pull
error: cannot open .git/FETCH_HEAD: Read-only file system

[email protected](ro):dashboard$ rpi-rw
Filesystem is unlocked - Write access
type ' rpi-ro ' to lock
[email protected](rw):dashboard$ git pull
Already up-to-date.