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
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.
Re-downloading did the trick and everything seems to work OK!
Now it is time to start collecting some data..
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?
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.
This can now be done automatically, see upgrading:
Open-source tools for energy monitoring and analysis. This project uses the GNU General Public Licence