Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian/Apache/PHP: Cannot leave Demo Mode #468

Open
jaromic opened this issue Jul 28, 2018 · 5 comments
Open

Debian/Apache/PHP: Cannot leave Demo Mode #468

jaromic opened this issue Jul 28, 2018 · 5 comments

Comments

@jaromic
Copy link

jaromic commented Jul 28, 2018

Summary:

This issue is similar to #428 and #434, but reading those issues has not helped me.

My goal is to run linux-dash in Apache/PHP configuration. I tried pointing apache to both

  • the root of the work tree
  • the app directory (as suggested in the document linked in README.md)
  • the app/server directory (because the js for running the app in node configuration is there)

Either way, the result is the same - demo data is displayed instead of real data.

Steps to reproduce:

  • configure apache with document root /app (relative to the worktree root)
  • request / URL in the browser
  • look at gauges and boxes

Expected behavior:

  • gauges/boxes show data from my system

Actual behavior:

  • "Demo mode" is displayed in the headline
  • gauges/boxes show demo data (users and processes that do not exist on my machine)

Environment:

  • Debian 8.10
  • PHP 5.6.36 (run with mod_fcgid)
  • Apache 2.4.10
  • npm 3.10.10 (local installation in user home)
  • node v6.9.5 (local installation in user home)

Notes:

I also tried running the gulpfile as suggested in the other issues. It seems to block after this output (probably listening):

[13:02:31] Using gulpfile /home/php/environments/monitor.foxcraft.at/data/gulpfile.js
[13:02:31] Starting 'template-cache'...
[13:02:31] Starting 'generate-css-dist'...
[13:02:31] Starting 'watch'...
[13:02:31] Finished 'watch' after 41 ms
[13:02:31] Finished 'template-cache' after 186 ms
[13:02:31] Starting 'generate-js-dist'...
[13:02:31] Finished 'generate-css-dist' after 218 ms
[13:02:31] Finished 'generate-js-dist' after 607 ms
[13:02:31] Starting 'build'...
[13:02:31] Finished 'build' after 6.44 μs
[13:02:31] Starting 'default'...
[13:02:31] Finished 'default' after 2.29 μs

The shell API seems to return the correct JSON data (e.g. users). So the problem must be something rather straightforward somewhere in the JS.

@lastsamurai26
Copy link

Same Problem.
i guess this project is little bit death ?

@r0max
Copy link

r0max commented Apr 23, 2019

Found the solution by carefully reading the docs (https://github.com/afaqurk/linux-dash#if-using-php) again:

...
2. Point your web server to app/ directory under linux-dash
...

So in my case, demo.js was picked up by accessing http://HOSTNAME/linux-dash/. Real data was shown by accessing http://HOSTNAME/linux-dash/app/

@lastsamurai26
Copy link

I know but it doesn't work with PHP 7.2 or 7.3. No data is read.
the Dash version 1 runs ...

@lastsamurai26
Copy link

i found the problem
The app/server/linux_json_api.sh need 744 chmod rights

@Jiab77
Copy link

Jiab77 commented Sep 29, 2019

@r0max solved the issue. I've pointed my webserver to / by accident and it loaded the demo data. changing to /app solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants