EmonCMS 3: Undefined index

After successfully using EmonCMS2, I've tried to upgrade to the latest version. I made a complete new install on my synology, new database and a clean directory. Unfortunately i got an error.

Can anyone explain the error(s) or think of a solution? The error appears after the first log-in when (for example) my language is changed, and doesn't dissapear.

Notice: Undefined index: username in /volume1/web/emon/Modules/user/user_model.php on line 59

Notice: Undefined index: apikey_read in /volume1/web/emon/Modules/user/user_model.php on line 61

Notice: Undefined index: apikey_write in /volume1/web/emon/Modules/user/user_model.php on line 62

Notice: Undefined index: lang in /volume1/web/emon/Modules/user/user_model.php on line 63

Notice: Undefined index: timeoffset in /volume1/web/emon/Modules/user/user_model.php on line 64

 

The database check, gave no errors and in PHPmyAdmin I find that all tables are created en filled.

Kind regards Gijs

TrystanLea's picture

Re: EmonCMS 3: Undefined index

Hmm, not sure why that is happening. Do all the fields exist in your user table?: username, apikey_read, apikey_write, lang, timeoffset.

It may be worth running the database setup again. If you cant get to admin tab and then db update and check. Place this:

db_schema_setup(load_db_schema());

on line 29 of index.php and then remove it once you have opened an emoncms page.

 

Gijs's picture

Re: EmonCMS 3: Undefined index

All fields exist, i've checked in phpMyAdmin, and they are all filled with sensible information.

These fields exist: id  username  email  password  salt  apikey_write  apikey_read  lastlogin  uphits  dnhits  admin  lang  timeoffset  settingsarray

The data base check returned no errors. Also tried placing db_schema_update in index.php, it didn't help.

I've experimented a little with de global PHP-settings, but no results

 

 

ukmoose's picture

Re: EmonCMS 3: Undefined index

Is your username an Email address or simply a name?

What happens if you set up a second account?

 

 

Gijs's picture

Re: EmonCMS 3: Undefined index

Hi again!

ukmoose, tried both, first account wit a simple name and an email adres. Also tried the second account. Both with no success.

Are there more suggestions? They are more than welcome!

ukmoose's picture

Re: EmonCMS 3: Undefined index

Its an odd error to see if your new database contains data, as effectively the scripts saying it can't find anydata for the user in the database.

At least we know the issue isn't user specific ;-)

You say that you created a new database.
Is that a new copy of MYSQL i.e. only the emoncms database in it?  
Or is it a new database within your existing MYSQL instance?

What version of php and MYSQL or you running?

 

Gijs's picture

Re: EmonCMS 3: Undefined index

Odd people, Odd Error's :-)

The script can't find the data, but it is there, if I open the fields in the table is find de correct information (username etc.) is stored.

I've created a new database within de Mysql instance

the versions:

Database server

  • Server: Localhost via UNIX socket
  • Software: MySQL
  • Software version: 5.1.49 - Source distribution
  • Protocol version: 10
  • Server charset: UTF-8 Unicode (utf8)

Web server

  • Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.1c-fips PHP/5.3.15
  • Database client version: libmysql - 5.1.49
  • PHP extension: mysql

 

Synology; DSM 4.1 - 2661

 

Gijs's picture

Re: EmonCMS 3: Undefined index

Is there someone who is using the same configuration? 

Synology + emoncms + multinode firmware

some advice, i'm stuck right now.

jb79's picture

Re: EmonCMS 3: Undefined index

Hello!

You're running emoncms on a Synology Diskstation?

The problem might be that emoncms isn't installed in the default directory (/var/www/emoncms).

I had problems similar to yours with my RaspberryPI because I tried to install emoncms to another subdirectory. After deleting this installation and installing it to the default directory everything was ok.

If you are familiar with Linux you can try to modify the apache configuration. I think it should be the one in /usr/syno/apache/conf of your Diskstation.

TrystanLea's picture

Re: EmonCMS 3: Undefined index

You could try ignoring the notices by setting: $display_errors = FALSE in settings.php. Does it log in ok?

Gijs's picture

Re: EmonCMS 3: Undefined index

I've will try $display _errors = FALSE.

But recently i've bought a Raspberry for this purpose.

jonbev's picture

Re: EmonCMS 3: Undefined index

The are only notices. Have you checked the value of error_reporting in your php.ini file?

See - http://php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

You can turn notices off.

You can also do it at runtime with error_reporting() - http://php.net/manual/en/function.error-reporting.php

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

aet's picture

Re: EmonCMS 3: Undefined index

Hi Gijs, were you able to get your clean installation running? And any tips for others going down the same path?

TrystanLea's picture

Re: EmonCMS 3: Undefined index

Have you tried the latest version?, where are you getting stuck?

Comment viewing options

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