Running Emoncms on plesk web hosting server

Hello everyone!
I am trying to run emoncms on a web hosting server running plesk.
After lots and lots of changes in settings.ini and endless hours, i have managed to have it running with its database and have 1 input and 1 feed working fine.
However i can not seem to make any module (dashboard, graph) run or load when i login on the site.
All the modules appear in components section in admin.
when i try to view the feed i get this message:
image

What am i missing?

Server is running MariaDB and PHP 7.3.30
Emoncms stable 10.7.7 (also tried release 10.5.5)

Directory structure is:
emoncms: /var/www/vhosts/emoncms.test.com
modules: /var/www/vhosts/emoncms.test.com/Modules
openenergymonitor: /var/www/vhosts/openenergymonitor
data: /var/www/vhosts/emoncmsdata

Thank you for your input, it is greatly appreciated!

Hello @sententia I cant see immediately what is causing this, the line number of the error does not seem to link to the error mentioned. Have you updated the mysql database since installing the graph and dashboard modules? Admin > Update > Update database

Hello, Thank you for your response!
I don’t think it has to do with the module itself or the code, as non of the modules “load” or appear in the menu. Dashboard does not seem to load as well.
Yes database updates correctly, but on the plesk environment i don’t “install” the modules i just copy the module folder in Modules folder of the site. Modules appear in the component section in Admin.
Graph will show correctly if i use: feedviewpath = “vis/auto?feedid=” in settings.ini
There are no errors in the plesk log or the emoncms log.
However i get this in “System Info” in Admin: (version 10.7.7)
Warning : Invalid argument supplied for foreach() in /var/www/vhosts/mysite.com/Modules/admin/admin_model.php on line 127
Notice : Undefined variable: exec in /var/www/vhosts/mysite.com/Modules/admin/admin_model.php on line 127

I don’t know if i have missed a setting or somthing i should alter or include in order for it to work…

Hello @sententia is looks like the issues may be system level to do with compatibility between the plesk environment and emoncms. The error that you see there is resulting from emoncms trying to check a service status and it’s likely that the service command that it’s trying to call is not available on plesk, it looks like exec is not available, that’s a command in php that allows php to run bash commands.

That error should only be present on the admin page and should not affect the reason the graph and dashboard modules are not loading.

If you are looking for a simple way of creating a small vm to run emoncms, it might be worth trying a digital ocean droplet running Ubuntu and using the EmonScripts installation process to install the emoncms stack: EmonScripts/readme.md at master · openenergymonitor/EmonScripts · GitHub. The cheapest digital ocean droplet plan is $5/month which looks a little cheaper too.

It may be that the issue is compatibility between emoncms and the underlying web hosting service rather than plesk itself which looks like more a service admin tool?

Hello @TrystanLea !!
Yes plesk is used as a service admin tool by the provider.
Thanks for the suggestion of digital ocean droplet (i wasn’t aware of the service) it does looks promising, however i am trying to avoid further costs as i already have the web hosting service for a different purpose.
Actually the sensors are currently at emoncms.org which serves me well, but now i need to use the email event notification (and a notification if the feed goes offline) which the .org version does not support.

I am busting my head thinking it might just be couple of settings that may keep it from working correctly. emoncms only needed some openbasedir settings in order to start… also I think i have read online people making the 9.* version work on web hosting services…

Anyway, yes exec is disabled along with these functions:

Also i have not mention that the Apache server is running nginx, if i say that correctly… Sorry its really not my expertise so i am struggling … (another rabit hole went down as i found that synology used nginx but never found what to do with the settings…)

These are the modules as they appear in system info:

Which PHP version should be selected on to run on the site?

Once more thank you @TrystanLea for the input and support, it is greatly appreciated!

P.S. These are the apache nginx settings available:

Hello @sententia Nothing stands out on the settings, all looks fine… does it make any difference as FPM served by Apache?

Would you be able to give me a temporary login to site, I can try to see what is and what isnt working and use the browser developer tools to debug the errors? Feel free to send me the details on a private message.

sooo… Trystan pinpointed the problem!
I had installed all the modules using “stable” or “releases” branches which resulted in using old versions of the modules which were not compatible with the latest version of emoncms.

Downloaded the master branch versions and everything is working hunky dory!

Your commitment to this project is invaluable!

Thank you!

2 Likes