Emoncms Windows Install Problems

Hi, I’ve been trying to set-up a local instance of Emoncms on my Windows server (WHS2011) for the last few days but can’t seem to get it working just right.

I’ve now re-installed twice but get the same problems. Namely:

  1. I get an error on the home screen of: “Notice: Use of undefined constant FILE - assumed ‘FILE’ in C:\wamp64\www\emoncms\settings.php on line 131”.

This is referring to the log file location on my server as $log_filename = dirname(FILE).’\’ . ‘emoncms.log’;. I believe this is correctly formatted and does appear to work (there are log messages being added to the file).

  1. Whilst I can register a first user, I get an error message in pink when I register stating “Undefined”. Despite this I do appear to be registered as a user as I can then get access to some of the other web setting options. However the error message also appears everytime I log-in… the screen stays as is but the message “undefined” appears.

Examining the browser console I can see an error message of "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/."

  1. Despite the above, I am able to send data to the Emoncms database (I can see it arriving via phpMyAdmin). However I cannot configure the database feeds or input via the EmonCMS interface as when I go to the feeds or inputs page all I see is a message saying “loading…” and nothing happens. The links to Input and Feeds API help do work.

I’ve spent days checking comments on various websites but I cannot figure out what is going wrong with my installation.

Can anyone help?

Thanks,

Kevin

Hi Kevin,
Here’s my settings.php in case there’s anything you can use there:
settings.zip (2.4 KB)
You’ll probably want to turn off redis & email initially (there are some extra php extensions needed to get those going).
I’m running on Win 2012R2, with WAMP 32-bit (just because it was the “recommended” version when I started). But I don’t see that making any difference.
Thanks, Sandy

Thanks Sandy. Your settings and mine are similar. I wasn’t using redis anyway.

I’ve now tried the WAMP 32 bit version instead but get the same errors. There is obviously something else going on that is messing up the install. I think my next step is to just install it on my Raspberry Pi… shame as I’d prefer to use my Windows server for this.

I’m at a complete loss as to why I can’t get this working on my Windows server!

Kevin

Hi Kevin,
One more thought. Your httpd.conf file in
\wamp\bin\apache\apache???\conf
How does it compare with this one:
httpd.zip (6.6 KB)
I remember having problems with the web interface when I wasn’t running the browser on the server machine itself (and I’m not sure you can do that on WHS?). I made some tweaks to this httpd.conf & then could use from a remote client.
Thanks,
Sandy

My gut on reading this issue is UAC. It sounds like some of the files might not have the right permissions for certain activities, e.g. generally reading files is fine but on attempting to write to certain files the process is failing. If the server is not internet facing you could try re-setting the permssions on the C:\Wamp folder so that “Everyone” has full read / write permissions and then reset inheritance. Another approach would be to use Process Monitor to follow the process and see if it fails reading / writing to the registry / file system - Troubleshooting permissions errors with Process Monitor

Paul

You could always create a Linux based virtual machine and run it on that.

I have the same problem maybe has to do with the 32/64 bit instalation ?.

regards Bernhard

$log_filename = dirname(‘FILE’).’\’ . ‘emoncms.log’;
I believe this helps.

regards
bernhard