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 969 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

      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 Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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 Reply Quote 0
        • S
          siegmarb @jimp
          last edited by siegmarb

          @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
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            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

              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 Reply Quote 1
              • S
                siegmarb @Steve_B
                last edited by

                @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
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.