emoncms error

Hello!

I just installed a emoncms v3 first time on my lamp-server. Login/register window works fine, but when I try to register or login I will get the error message: Fatal error: Call to a member function fetch_array() on a non-object in /var/www/Includes/db.php on line 50

Greetings

Pasi

TrystanLea's picture

Re: emoncms error

Hello Pasi

It may be that I missed out a line in the database setup.php script when I last updated. I have changed the file, could you re-downloading it? you will need to start with a new database.

Trystan

pasjus's picture

Re: emoncms error

Hello Trystan!

Re-downloading did the trick and everything seems to work OK!

Now it is time to start collecting some data..

Pasi

aceone's picture

Re: emoncms error

I have the some simular problem.

I tryed to upgrade my aprox 6 month old version (still v3) of emoncms to todays snap shot.

 

While im trying to log in ii get the following error message:

Fatal error: Call to a member function fetch_array() on a non-object in C:\xampp\htdocs\emon\Includes\db.php on line 50

If i login with the old version and then upgrade, everything seams so  work fine.

So does this mean that I cant upgrade and I have to migrate all my data to the new database?

 

Henrik

TrystanLea's picture

Re: emoncms error

There are a couple of new tables, it is possible to upgrade without migrating data, these are the steps:

1) Open index.php

2) copy require "Includes/setup.php"; on line 46 paste in line 47. 

3) Run emoncms3 in the browser as normal. The new tables will get created.

4) Remove the line, restore to how it was before.

If there is still an error, check if you have the admin field in the users table, if you dont, add a field called admin holding integers.

It would be great to have a script to do all this automatically. Will try and put some time aside to do it soon.

 

TrystanLea's picture

Re: emoncms error

This can now be done automatically, see upgrading: 

http://openenergymonitor.org/emon/emoncms/upgrading

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.