harmon25 / raspcontrol

Fork of Raspcontrol by Bioshox
78 stars 57 forks source link

issue with Jessie? #5

Open rustimator opened 9 years ago

rustimator commented 9 years ago

I run a number oft raspberries under wheezy. No issues w/ raspcontrol so far. Now I installed Raspbian Jessie and can't get Raspcontrol to work. All I'm getting is a white screen. Could it be that Raspcontrol is incompatible w/ Raspbian Jessie? Or is there something extra to do? Chris

omega180984 commented 8 years ago

Hello,

i have the exact same error with last updated debian jessie and raspcontrol. I try different things but i can't managed this to work.

Thanks in advance Omega

ArnalOMallet commented 8 years ago

Yep same issue. I located the problem in the localhost SSH connection.

enzomerand commented 8 years ago

Hey, i have same. I find the error, from the code :

Fatal error: Uncaught exception 'LogicException' with message 'Class Crypt_Rijndael could not be loaded' in /var/www/raspcontrol/lib/phpseclib/Crypt/AES.php:68 Stack trace:
#0 [internal function]: spl_autoload('Crypt_Rijndael')
#1 /var/www/raspcontrol/lib/phpseclib/Crypt/AES.php(68): class_exists('Crypt_Rijndael')
#2 /var/www/raspcontrol/lib/phpseclib/Net/SSH2.php(1326): require_once('/var/www/raspco...')
#3 /var/www/raspcontrol/lib/phpseclib/Net/SSH2.php(921): Net_SSH2->_key_exchange('\x14\\\xC2\x13\x80%\xFE\xA5F\xAE\x90\xDA\xD7\xB4\x08...')
#4 /var/www/raspcontrol/index.php(14): Net_SSH2->Net_SSH2('localhost')
#5 {main} thrown in /var/www/raspcontrol/lib/phpseclib/Crypt/AES.php on line 68

But I have not found the solution...

magarto commented 8 years ago

It works on my with Jessie but not showing enough system data... just a few parameters...

harmon25 commented 8 years ago

Might need to make sure SSH is listening on localhost/127.0.0.1 by default.... Have not tried on Jessie, will report back if I figure it out.

Dag0d commented 8 years ago

same issue here, just a white page after loading the website

harmon25 commented 8 years ago

looks to be a problem with the phpseclib dependency. If anyone has some PHP skillz, should be a pretty easy fix...just not something I want to dig into...

Would rather build a new, super cool, client-side heavy React/Redux powered RaspControl with a nice websocket connection to the server. This can be used to observe things like temp, cpu and proc changes in real time without refreshing the browser, maybe some neat visualizations...

This will have a Phoenix backend, if anyone is interested in helping out, lemme know!

Have started the new picontrol!

Check out the repo

jessyjones commented 8 years ago

Is there any way to remove the SSH connection part then ? For example, by disabling the need to log in ?

harmon25 commented 8 years ago

It is possible.

I will reiterate that I am not great with PHP, and have little interest in learning it just to fix this repo...

The original author was a bit inconsistent when it comes to gathering system information. This was likely for security reasons. For example, commands requiring root to execute, would be done over SSH so the web application does not need to be running as the root user.

Here for example, you will see at L44 he first reads a file using a php fopen function, then on L48 uses SSH to execute this on the Pi: ps -e -o pcpu,user,args --sort=-pcpu | sed "/^ 0.0 /d" | head -

Logging in is not really the issue, SSH is being used alongside other mechanisms (PHP methods, or reading files) to gather information about the Pi.

There are probably other ways to run commands on the in a shell which do not require SSH. Doing so however would expose some vulnerabilities.

tayfun57 commented 5 years ago

I have an Issue with Raspian 10 . Raspcontrol cant get the memory data. I think the error is in /lib/memory.php on line 17 $out = $ssh->exec_noauth('free -mo'); the -o Parameter doesn't exist in Raspbian 10. If i remove the o Parameter it will work but display false data. I'm not familar with unix commands.