Comments (8)
Looks like the "$gateways_status" variable is just an empty array.
Maybe that's why it does not work?
from pfsense-status-gateways-json.
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!
from pfsense-status-gateways-json.
Nope, still only get the "lan" interface in the json. :(
from pfsense-status-gateways-json.
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.
Nope, just an empty array... :(
Array ( )
from pfsense-status-gateways-json.
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.
Oh, that gave a hint! :)
First I got this when entering the URL:
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:
And now it works! :)
Sorry for all your troubles... I actually did not know you could restart the "gateways". :)
from pfsense-status-gateways-json.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pfsense-status-gateways-json.