Open dkraklan opened 6 years ago
Refer to:
https://github.com/telephone/LookingGlass/issues/44#issuecomment-333401402
Edit ajax.php and replace:
$output = $lg->$_GET['cmd']($_GET['host']);
with
$output = $lg->{$_GET['cmd']}$_GET['host']);
This works on all new PHP builds for me.
Thank you! Are you able to explain what adding the curly braces does ?
http://php.net/manual/en/migration70.incompatible.php
Changes to the handling of indirect variables, properties, and methods Indirect access to variables, properties, and methods will now be evaluated strictly in left-to-right order, as opposed to the previous mix of special cases.
Refer to: #44 (comment)
Edit ajax.php and replace:
$output = $lg->$_GET['cmd']($_GET['host']);
with
$output = $lg->{$_GET['cmd']}$_GET['host']);
This works on all new PHP builds for me.
You have to correct the 44th line as follows.
$output = $lg->{$_GET['cmd']}($_GET['host']);
Putting this here for my future self, and likely for other people: if mtr returns an empty box, but ping, traceroute, etc work, it's likely because mtr is suid:
root@lg:/var/www/html# chsh -s /bin/bash www-data root@lg:/var/www/html# su www-data www-data@lg:/html$ mtr mtr: mtr should not run suid: No such file or directory www-data@lg:/html$
chmod u-s /usr/sbin/mtr fixed it.
I replaced that line but doesnt work
Refer to:
https://github.com/telephone/LookingGlass/issues/44#issuecomment-333401402Edit ajax.php and replace:
$output = $lg->$_GET['cmd']($_GET['host']);
with
$output = $lg->{$_GET['cmd']}$_GET['host']);
This works on all new PHP builds for me.
Working on Ubuntu 20.04 and php7.4.3
hello,
I've installed LookingGlass and installation went smooth, however when ever I input an IP and click run test it says loading for a half a second then goes back to run test and never provides any results.
I found an old issue suggesting to change to php 5.4 which i did. I've also tried php 7. I'm not sure what I'm missing any help would be greatly appreciated.