• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

PHP ERROR: Type: 64, File: /usr/local/www/firewall_nat.php, Line: 40, Message: require_once(): Failed opening required 'firewall_nat.inc'

Scheduled Pinned Locked Moved General pfSense Questions
6 Posts 3 Posters 1.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    siegmarb
    last edited by Jul 20, 2021, 11:52 AM

    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 2021

    after 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 week

    52 18 * * 7 pkg upgrade -y
    

    Thank you.

    Stefan

    S 1 Reply Last reply Jul 27, 2021, 3:00 PM Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Jul 21, 2021, 3:29 PM

      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.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      S 1 Reply Last reply Jul 26, 2021, 9:45 AM Reply Quote 0
      • S
        siegmarb @jimp
        last edited by siegmarb Jul 26, 2021, 9:50 AM Jul 26, 2021, 9:45 AM

        @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
        
        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Jul 26, 2021, 5:48 PM

          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.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 1
          • S
            Steve_B Netgate @siegmarb
            last edited by Jul 27, 2021, 3:00 PM

            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

            ?

            Als ik kan

            S 1 Reply Last reply Jul 28, 2021, 5:42 AM Reply Quote 1
            • S
              siegmarb @Steve_B
              last edited by Jul 28, 2021, 5:42 AM

              @steve_b

              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!

              1 Reply Last reply Reply Quote 0
              6 out of 6
              • First post
                6/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received