librenms-plugins / Weathermap

MIT License
64 stars 51 forks source link

Unable to access editor page #56

Closed smagglo closed 5 years ago

smagglo commented 5 years ago

I use Weathermap as a Librenms plugin and haven't lauch it for a while (about 1 year ago). But it was working. I recently decided to get back into it but i'm unable to access the editor page. As soon as I click on the link, I'm redirected to Librenms home page. I checked all the installation process and I've even removed it and clone it again with the same result. My Apache directives the one recommended in Librenms install instructions and the install validate. I can't figure out what I'm missing. Thank U for any help.

alarig commented 5 years ago

Hi,

I have the same issue, but I use nginx. The rest of my LibreNMS installation works well.

If I comment this block:

if (empty($_SESSION['authenticated']) || !isset($_SESSION['authenticated']))
  {
    header('Location: /');
  }

I can access the editor.

smagglo commented 5 years ago

Hi, Thank U for your comment. I have seen this block in editor.php while trying to figure out what's happening. I'll comment it out to see if it works. If it's the case it means that our session token is not correctly detected. The rest of my installation also works well.

smagglo commented 5 years ago

Amazing ! I was just about to comment the block but wanted to see what Session Cookie are set just before launching the editor, i clicked on the link just to see and to my supefaction ; it works !!! I just don't understand why but it's ok for me as you can see Screenshot-2019-4-1 PHP Weathermap Editor 0 97c