-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost "wan" interface in the JSON output. #4
Comments
Looks like the "$gateways_status" variable is just an empty array. |
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():
Try adding that first line and see if it works for you. If so, I'll update the repo. Thanks! |
Nope, still only get the "lan" interface in the json. :( |
from their code, really the only other line from pfsense's "status_gateways.php" there is testgateways.php:
|
Nope, just an empty array... :( |
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? |
ok great, glad you finally solved it! hopefully this thread will at least help others who also run into the same issue! 👍 |
Hi, I updated to latest version of pfSense 2.3.4-RELEASE (amd64)
Then I lost my "wan" interface in the JSON output.
If I print the "$a_gateways" I get this:
Array (
[VPN_VPNV4] => Array (
[interface] => bge1
[gateway] => dynamic
[name] => VPN_VPNV4
[weight] => 1
[ipprotocol] => inet
[interval] =>
[descr] => Interface VPN_VPNV4 Gateway
[dynamic] => 1
[monitor] => dynamic
[friendlyiface] => lan
[attribute] => 0
)
[WAN_DHCP] => Array (
[interface] => bge0
[gateway] => 81.233.82.1
[name] => WAN_DHCP
[weight] => 1
[ipprotocol] => inet
[interval] =>
[descr] => Interface WAN_DHCP Gateway
[defaultgw] => 1
[dynamic] => 1
[monitor] => 81.233.82.1
[friendlyiface] => wan
[attribute] => 1
)
)
But the JSON output is:
{"lan":{"inKbps":3864.2620418484,"outKbps":5268.2221868671,"interface":"bge1"}}
Not sure why this happens... Any ideas? :)
Best regards Snille
The text was updated successfully, but these errors were encountered: