PHP ERROR: Type: 64, File: /usr/local/www/firewall_nat.php, Line: 40, Message: require_once(): Failed opening required 'firewall_nat.inc'
-
Hi folks,
for unknown reasons some of my pfsense-systems (virtual and physical systems) show the following error after latest update to
2.5.2-RELEASE (amd64)
built on Fri Jul 02 15:33:00 EDT 2021after clicking firewall_nat.php (FIREWALL -> NAT) via GUI.
PHP ERROR: Type: 64, File: /usr/local/www/firewall_nat.php, Line: 40, Message: require_once(): Failed opening required 'firewall_nat.inc' (include_path='.:/etc/inc:/etc/inc/web:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg:/usr/local/www/classes:/usr/local/www/classes/Form:/usr/local/share/pear:/usr/local/share/openssl_x509_crl/')
How can i fix that?
Update was done via System - > Update...
Additionally i run via cron, once a week52 18 * * 7 pkg upgrade -y
Thank you.
Stefan
-
Is the
firewall_nat.inc
file anywhere on the system?: find / -name firewall_nat.inc
It should be in
/usr/local/pfSense/include/www/firewall_nat.inc
Running a
pkg upgrade
from cron is a bad idea. I don't think it would be related to this, but it's possible that doing so messed up the upgrade process if that triggered between the time the update was available and when you triggered an upgrade in the GUI. -
@jimp thank you for your time.
The file is there:
# find / -name firewall_nat.inc /usr/local/pfSense/include/www/firewall_nat.inc
File look sane:
# ls -alh /usr/local/pfSense/include/www/firewall_nat.inc -rw-r--r-- 1 root wheel 27K May 28 13:35 /usr/local/pfSense/include/www/firewall_nat.inc
Md5 checksum is same as on other "sane" systems:
# /sbin/md5 /usr/local/pfSense/include/www/firewall_nat.inc MD5 (/usr/local/pfSense/include/www/firewall_nat.inc) = a67dcbad4c6a687d6bc6af6c8827c67a
-
Try a forced browser refresh (ctrl+F5 or shift+click reload) and see if the browser cached the error.
If that doesn't work, reboot the firewall and see if the error persists after that (and another forced page reload).
If the file is there and OK, especially if the checksum matches, then it almost has to be something temporary that needs a small kick like the above.
-
If you still encounter this problem. please navigate to Diagnostics->Command prompt and paste this into the "Execute PHP Commands" box:
echo get_include_path();
then click "Execute". Does the resulting output contain the path:
/usr/local/pfSense/include/www
?
-
PHP Response .:/etc/inc:/etc/inc/web:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg:/usr/local/www/classes:/usr/local/www/classes/Form:/usr/local/share/pear:/usr/local/share/openssl_x509_crl/
The path was indeed missing. A reboot fixed the problem.
Thank you all for your time!