Giter Site home page Giter Site logo

Comments (8)

Snille avatar Snille commented on June 23, 2024

Looks like the "$gateways_status" variable is just an empty array.
Maybe that's why it does not work?

from pfsense-status-gateways-json.

alexpmorris avatar alexpmorris commented on June 23, 2024

It's possible it's something with a newer version of PHP they're using. I haven't upgraded to the latest pfSense yet so can't check myself right now. But from looking at the latest code, they seem to initialize the variable with array() before calling return_gateways_status():

$gateways_status = array();
$gateways_status = return_gateways_status(true);

Try adding that first line and see if it works for you. If so, I'll update the repo. Thanks!

Reference: https://github.com/pfsense/pfsense/blob/7cdb1ff98361bd352134d78732fb519957803728/src/usr/local/www/status_gateways.php

from pfsense-status-gateways-json.

Snille avatar Snille commented on June 23, 2024

Nope, still only get the "lan" interface in the json. :(

from pfsense-status-gateways-json.

alexpmorris avatar alexpmorris commented on June 23, 2024

from their code, really the only other line from pfsense's "status_gateways.php" there is require_once("guiconfig.inc");. Perhaps they changed something that requires that first. Maybe try dropping the following php file into that directory to see if that gives you anything.

testgateways.php:

require_once("guiconfig.inc");
//define('COLOR', true);
$a_gateways = return_gateways_array();
$gateways_status = array();
$gateways_status = return_gateways_status(true);
print_r($gateways_status);

from pfsense-status-gateways-json.

Snille avatar Snille commented on June 23, 2024

Nope, just an empty array... :(
Array ( )

from pfsense-status-gateways-json.

alexpmorris avatar alexpmorris commented on June 23, 2024

That's really strange then, possible something else is going on then with your setup, because that's the exact code from the pfsense interface! how about when you visit your router's "Status: Gateways" page. Does that show the information, or is it blank too? http://routerip/status_gateways.php

from pfsense-status-gateways-json.

Snille avatar Snille commented on June 23, 2024

Oh, that gave a hint! :)
First I got this when entering the URL:
image
Then I wounder, is that really right.... So I "restarted" the gateways? (clicked the circle arrow at the top right corner) and then I got this:
image
And now it works! :)

Sorry for all your troubles... I actually did not know you could restart the "gateways". :)

from pfsense-status-gateways-json.

alexpmorris avatar alexpmorris commented on June 23, 2024

ok great, glad you finally solved it! hopefully this thread will at least help others who also run into the same issue! 👍

from pfsense-status-gateways-json.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.