jaredhendrickson13 / pfsense-api

The missing REST API package for pfSense
https://pfrest.org/
Apache License 2.0
674 stars 104 forks source link

Netgate pfSense plus 21.02.2-RELASE #131

Closed caspertl closed 3 years ago

caspertl commented 3 years ago

Hi there I have some trouble with your API. Im trying to install it on a XG-1537-HA. Version: Netgate pfSense plus 21.02.2-RELASE.

The instllation is going okay everything is good at first glance. But when i go to Status/system logs/system/general i get this error: Fatal error: Uncaught Error: Call to undefined function has_hw_watchdog() in /usr/local/www/status_logs_common.inc:118 Stack trace: #0 /usr/local/www/status_logs.php(130): tab_array_logs_common() #1 {main} thrown in /usr/local/www/status_logs_common.inc on line 118 PHP ERROR: Type: 1, File: /usr/local/www/status_logs_common.inc, Line: 118, Message: Uncaught Error: Call to undefined function has_hw_watchdog() in /usr/local/www/status_logs_common.inc:118 Stack trace: #0 /usr/local/www/status_logs.php(130): tab_array_logs_common() #1 {main} thrown. If i reboot the device i dont get a WAN ip adress either.

I have tried to install 2 versions of the API same result. pkg add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-2.5-pkg-API.txz && /etc/rc.restart_webgui pkg add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-2.6-pkg-API.txz && /etc/rc.restart_webgui

here is the crashreport: Crash report begins. Anonymous machine information:

amd64 12.2-STABLE FreeBSD 12.2-STABLE c1120650645f(plus-RELENG_21_02) pfSense

Crash report details:

PHP Errors: [27-Apr-2021 12:20:51 Europe/Copenhagen] PHP Fatal error: Uncaught Error: Call to undefined function has_hw_watchdog() in /usr/local/www/status_logs_common.inc:118 Stack trace:

0 /usr/local/www/status_logs.php(130): tab_array_logs_common()

1 {main}

thrown in /usr/local/www/status_logs_common.inc on line 118

No FreeBSD crash data found.

I hope you are able to help me with this :)

jaredhendrickson13 commented 3 years ago

Hey!

Unfortunately, this API has been developed for pfSense CE and will not work on pfSense Plus. There are small fundamental differences between pfSense CE and pfSense Plus that prevent the package from working correctly. Since pfSense Plus is closed source and currently only runs on proprietary equipment, I don't have the ability to develop, maintain or test the package on pfSense Plus at this time.

Thanks!

teridon commented 2 years ago

@caspertl How did you recover your pfsense after installing this API on the system? Removing it didn't fix the error!

caspertl commented 2 years ago

@caspertl How did you recover your pfsense after installing this API on the system? Removing it didn't fix the error!

@teridon We were in the early stages of implementing this so we ended up restoring to factory.. Instead of the API we use SSH to run our own PHP-scripts located on the server to get/update/create/delete aliases and adresses. I can share these scripts with you if you need.

teridon commented 2 years ago

@caspertl Thanks, but I found a fix. It seems that php-fpm was caching something, because restarting it (via the script /etc/rc.php-fpm_restart ) restored the Web UI functions.

sherif-fanous commented 2 years ago

I just ran into this issue and thankfully @teridon comment helped.

I really think the home page should have a clear warning about this package not being compatible with pfsense plus.