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

    Error after package update

    Scheduled Pinned Locked Moved pfBlockerNG
    24 Posts 5 Posters 1.2k 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.
    • E
      elexir
      last edited by

      Just updated a number of packages on my pfSense where pfBlockerNG-Dev is one of them. After updating them the GUI stopped working. The crash report from the GUI gives me the following information which points at pfBlocker:

      [04-Jan-2025 16:38:29 Europe/Stockholm] PHP Fatal error:  Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
      Stack trace:
      #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
      #1 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
      #2 /usr/local/www/index.php(539): include('/usr/local/www/...')
      #3 {main}
        thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
      

      When reading the update log I see an error listed at the end of the update which also makes me beleve that pfBlocker has something to do with the issue I'm seeing:

      [24.03-RELEASE][admin@***]/cf/conf: cat pkg_log_pfSense-pkg-pfBlockerNG-devel.txt
      >>> Upgrading pfSense-pkg-pfBlockerNG-devel...
      Updating pfSense-core repository catalogue...
      pfSense-core repository is up to date.
      Updating pfSense repository catalogue...
      pfSense repository is up to date.
      All repositories are up to date.
      The following 26 package(s) will be affected (of 0 checked):
      
      Installed packages to be UPGRADED:
              gettext-runtime: 0.22.3 -> 0.22.5 [pfSense]
              grepcidr: 2.0 -> 2.0_1 [pfSense]
              iprange: 1.0.4 -> 1.0.4_2 [pfSense]
              jq: 1.7_2 -> 1.7.1 [pfSense]
              libargon2: 20190702 -> 20190702_1 [pfSense]
              libffi: 3.4.4 -> 3.4.6 [pfSense]
              libiconv: 1.17 -> 1.17_1 [pfSense]
              liblz4: 1.9.4,1 -> 1.10.0,1 [pfSense]
              libmaxminddb: 1.8.0 -> 1.11.0 [pfSense]
              libxml2: 2.10.4_2 -> 2.11.9 [pfSense]
              lighttpd: 1.4.73 -> 1.4.76 [pfSense]
              lua54: 5.4.6 -> 5.4.7 [pfSense]
              mpdecimal: 2.5.1 -> 4.0.0 [pfSense]
              nettle: 3.9.1 -> 3.10_1 [pfSense]
              pcre2: 10.42 -> 10.43 [pfSense]
              pfSense-pkg-pfBlockerNG-devel: 3.2.0_10 -> 3.2.1_20 [pfSense]
              php83: 8.3.1 -> 8.3.12 [pfSense]
              php83-intl: 8.3.1_1 -> 8.3.12 [pfSense]
              py311-maxminddb: 2.5.1 -> 2.6.2 [pfSense]
              py311-sqlite3: 3.11.7_8 -> 3.11.10_8 [pfSense]
              python311: 3.11.7 -> 3.11.10 [pfSense]
              readline: 8.2.7 -> 8.2.13_2 [pfSense]
              rsync: 3.2.7 -> 3.3.0 [pfSense]
              sqlite3: 3.44.0_1,1 -> 3.46.1,1 [pfSense]
              xxhash: 0.8.2 -> 0.8.2_1 [pfSense]
              zstd: 1.5.5 -> 1.5.6 [pfSense]
      
      Number of packages to be upgraded: 26
      
      The operation will free 22 MiB.
      41 MiB to be downloaded.
      [1/26] Fetching py311-sqlite3-3.11.10_8.pkg: .. done
      [2/26] Fetching mpdecimal-4.0.0.pkg: ....... done
      [3/26] Fetching lighttpd-1.4.76.pkg: ......... done
      [4/26] Fetching nettle-3.10_1.pkg: .......... done
      [5/26] Fetching lua54-5.4.7.pkg: ..... done
      [6/26] Fetching libiconv-1.17_1.pkg: .......... done
      [7/26] Fetching jq-1.7.1.pkg: .... done
      [8/26] Fetching libxml2-2.11.9.pkg: ......... done
      [9/26] Fetching grepcidr-2.0_1.pkg: . done
      [10/26] Fetching libargon2-20190702_1.pkg: .. done
      [11/26] Fetching xxhash-0.8.2_1.pkg: ..... done
      [12/26] Fetching iprange-1.0.4_2.pkg: . done
      [13/26] Fetching python311-3.11.10.pkg: .......... done
      [14/26] Fetching rsync-3.3.0.pkg: .......... done
      [15/26] Fetching liblz4-1.10.0,1.pkg: .... done
      [16/26] Fetching zstd-1.5.6.pkg: .......... done
      [17/26] Fetching pcre2-10.43.pkg: .......... done
      [18/26] Fetching gettext-runtime-0.22.5.pkg: ....... done
      [19/26] Fetching php83-8.3.12.pkg: .......... done
      [20/26] Fetching pfSense-pkg-pfBlockerNG-devel-3.2.1_20.pkg: ......... done
      [21/26] Fetching sqlite3-3.46.1,1.pkg: .......... done
      [22/26] Fetching php83-intl-8.3.12.pkg: .... done
      [23/26] Fetching libmaxminddb-1.11.0.pkg: . done
      [24/26] Fetching libffi-3.4.6.pkg: . done
      [25/26] Fetching readline-8.2.13_2.pkg: ...... done
      [26/26] Fetching py311-maxminddb-2.6.2.pkg: . done
      Checking integrity... done (0 conflicting)
      [1/26] Upgrading mpdecimal from 2.5.1 to 4.0.0...
      [1/26] Extracting mpdecimal-4.0.0: .......... done
      [2/26] Upgrading gettext-runtime from 0.22.3 to 0.22.5...
      [2/26] Extracting gettext-runtime-0.22.5: .......... done
      [3/26] Upgrading libffi from 3.4.4 to 3.4.6...
      [3/26] Extracting libffi-3.4.6: .......... done
      [4/26] Upgrading readline from 8.2.7 to 8.2.13_2...
      [4/26] Extracting readline-8.2.13_2: .......... done
      [5/26] Upgrading libxml2 from 2.10.4_2 to 2.11.9...
      [5/26] Extracting libxml2-2.11.9: .......... done
      [6/26] Upgrading libargon2 from 20190702 to 20190702_1...
      [6/26] Extracting libargon2-20190702_1: .......... done
      [7/26] Upgrading python311 from 3.11.7 to 3.11.10...
      [7/26] Extracting python311-3.11.10: .......... done
      [8/26] Upgrading liblz4 from 1.9.4,1 to 1.10.0,1...
      [8/26] Extracting liblz4-1.10.0,1: .......... done
      [9/26] Upgrading pcre2 from 10.42 to 10.43...
      [9/26] Extracting pcre2-10.43: .......... done
      [10/26] Upgrading nettle from 3.9.1 to 3.10_1...
      [10/26] Extracting nettle-3.10_1: .......... done
      [11/26] Upgrading lua54 from 5.4.6 to 5.4.7...
      [11/26] Extracting lua54-5.4.7: ......... done
      [12/26] Upgrading libiconv from 1.17 to 1.17_1...
      [12/26] Extracting libiconv-1.17_1: .......... done
      [13/26] Upgrading xxhash from 0.8.2 to 0.8.2_1...
      [13/26] Extracting xxhash-0.8.2_1: .......... done
      [14/26] Upgrading zstd from 1.5.5 to 1.5.6...
      [14/26] Extracting zstd-1.5.6: .......... done
      [15/26] Upgrading php83 from 8.3.1 to 8.3.12...
      [15/26] Extracting php83-8.3.12: .......... done
      [16/26] Upgrading sqlite3 from 3.44.0_1,1 to 3.46.1,1...
      [16/26] Extracting sqlite3-3.46.1,1: .......... done
      [17/26] Upgrading libmaxminddb from 1.8.0 to 1.11.0...
      [17/26] Extracting libmaxminddb-1.11.0: .......... done
      [18/26] Upgrading py311-sqlite3 from 3.11.7_8 to 3.11.10_8...
      [18/26] Extracting py311-sqlite3-3.11.10_8: ........ done
      [19/26] Upgrading lighttpd from 1.4.73 to 1.4.76...
      ===> Creating groups
      Using existing group 'www'
      ===> Creating users
      Using existing user 'www'
      [19/26] Extracting lighttpd-1.4.76: .......... done
      [20/26] Upgrading jq from 1.7_2 to 1.7.1...
      [20/26] Extracting jq-1.7.1: .......... done
      [21/26] Upgrading grepcidr from 2.0 to 2.0_1...
      [21/26] Extracting grepcidr-2.0_1: ..... done
      [22/26] Upgrading iprange from 1.0.4 to 1.0.4_2...
      [22/26] Extracting iprange-1.0.4_2: ..... done
      [23/26] Upgrading rsync from 3.2.7 to 3.3.0...
      [23/26] Extracting rsync-3.3.0: .......... done
      [24/26] Upgrading php83-intl from 8.3.1_1 to 8.3.12...
      [24/26] Extracting php83-intl-8.3.12: .......... done
      [25/26] Upgrading py311-maxminddb from 2.5.1 to 2.6.2...
      [25/26] Extracting py311-maxminddb-2.6.2: .......... done
      [26/26] Upgrading pfSense-pkg-pfBlockerNG-devel from 3.2.0_10 to 3.2.1_20...
      [26/26] Extracting pfSense-pkg-pfBlockerNG-devel-3.2.1_20: .......... done
      Removing pfBlockerNG-devel components...
      Menu items... done.
      Services... done.
      Loading package instructions...
      Removing pfBlockerNG... All customizations/data will be retained... done.
      Saving updated package information...
      overwrite!
      Loading package configuration... done.
      Configuring package components...
      Loading package instructions...
      <pre style="white-space: pre-wrap;">PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
      Stack trace:
      #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
      #1 /etc/inc/pkg-utils.inc(888): require_once(&#039;/usr/local/pkg/...&#039;)
      #2 /etc/rc.packages(76): install_package_xml()
      #3 {main}
        thrown</pre>=====
      Message from grepcidr-2.0_1:
      
      --
      ===>   NOTICE:
      
      The grepcidr port currently does not have a maintainer. As a result, it is
      more likely to have unresolved issues, not be up-to-date, or even be removed in
      the future. To volunteer to maintain this port, please create an issue at:
      
      https://bugs.freebsd.org/bugzilla
      
      More information about port maintainership is available at:
      
      https://docs.freebsd.org/en/articles/contributing/#ports-contributing
      >>> Cleaning up cache...done.
      __RC=0
      
      

      Anyone have a good suggestion on what I should do to make everything work again? I only have cli access at the moment. Tried to restore a backup from the main menu but it hags. I have config backups uploaded to the builtin Netgate cloud service if that helps. Can I restore them manually from cli?

      Thanks!

      GertjanG 1 Reply Last reply Reply Quote 0
      • E
        elexir
        last edited by

        Small update, when trying to restore an old configuration from cli I get the following error message:

        Enter an option: 15
        
        <pre style="white-space: pre-wrap;">PHP ERROR: Type: 1, File: /etc/inc/xmlparse.inc, Line: 133, Message: Maximum execution time of 900 seconds exceeded</pre>PC Engines APU2 Platform ("apu4" model) - Netgate Device ID: *********************
        
        
        1 Reply Last reply Reply Quote 0
        • E
          elexir
          last edited by

          I ended up with reinstalling the box and then restoring an old backup to get everything up and running again. Do love the auto backup feature available in pfSense ♥ ♥ ♥

          S 1 Reply Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @elexir
            last edited by

            Just to ask, did you have the 24.03 update branch selected when you updated packages? If you were set to 24.11 for example it would install the wrong package and could break pfSense.

            Since you have Plus, if you had made a boot environment before the package updates that can be reverted at the loader menu:
            https://docs.netgate.com/pfsense/en/latest/backup/zfsbe/loader.html
            (if that would work in your situation)

            or a fallback via https://docs.netgate.com/pfsense/en/latest/backup/zfsbe/tips.html

            I'm not in the habit yet of making a boot env. before package updates but I guess that's not a bad idea!

            Packages can be manually reinstalled at the command line: https://forum.netgate.com/topic/176044/force-reinstall-of-packages-os-from-the-command-line/2

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote 👍 helpful posts!

            1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan @elexir
              last edited by Gertjan

              @elexir said in Error after package update:

              pfBlockerNG-Dev

              The latest version, or development version, is written with the latest version of pfSense in mind.
              That not 24.03, but 24.11.
              Next time : always start by checking what the latest pfSense version is and if needed, update pfSense first.
              Then, start to think about upgrading packages.

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • GertjanG Gertjan referenced this topic on
              • J
                JHplusUser
                last edited by JHplusUser

                New to forum
                Got the same problem here.
                First updated PFsense to 24.11
                Then updated my packages.
                After this got same crash with PFBlockerNG
                After deinstalling problem disappeared
                Installed pfBlockerNG-devel -> same problem
                De-installend pfBlockerNG-devel -> problem disappeared.
                Unfortunately I'm a low-level experienced user...
                Hope I don't have to do a backward install or even worse a new install of my pfsense.
                Do want to use pfblocker again, but without some help I wont be able to without crashing my system.
                Is there any solution?
                I'm using pfsense AND pfblockerng already for 10+ years, without much trouble. Hope to keep doing so.
                Thanks for any assistance!

                GertjanG 1 Reply Last reply Reply Quote 0
                • GertjanG
                  Gertjan @JHplusUser
                  last edited by

                  @JHplusUser said in Error after package update:

                  After this got same crash with PFBlockerNG

                  pfSense PLus 24.11
                  and the latest 'dev' pfBlockerng version ?

                  You saw :

                  Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc
                  

                  ?

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    JHplusUser @Gertjan
                    last edited by

                    @Gertjan I tried again: Installing the pfblockerng dev (3.2.1_20).
                    Now got an error saying it couldn't finish the install properly and also got this error:
                    PHP {$errortype}s
                    PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(888): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.packages(76): install_package_xml()
                    #3 {main}
                    thrown @ 2025-01-21 11:15:42

                    It has however installed the pf Blocker NG-devel version.
                    now tried do de-install and do a re-install again...succesfull de-install of version 3.2.1_20 (dev version)
                    However I get this error now:

                    PHP {$errortype}s
                    PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(1088): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.packages(80): delete_package_xml()
                    #3 {main}
                    thrown @ 2025-01-21 11:20:42

                    Tried installing it again: know got succes at the end, but in the log also an php error:
                    This is the install log:

                    Installing pfSense-pkg-pfBlockerNG-devel...
                    Updating pfSense-core repository catalogue...
                    pfSense-core repository is up to date.
                    Updating pfSense repository catalogue...
                    pfSense repository is up to date.
                    All repositories are up to date.
                    Checking integrity... done (0 conflicting)
                    The following 13 package(s) will be affected (of 0 checked):

                    New packages to be INSTALLED:
                    gnugrep: 3.11 [pfSense]
                    grepcidr: 2.0_1 [pfSense]
                    iprange: 1.0.4_2 [pfSense]
                    jq: 1.7.1 [pfSense]
                    libmaxminddb: 1.11.0 [pfSense]
                    lighttpd: 1.4.76 [pfSense]
                    lua54: 5.4.7 [pfSense]
                    nettle: 3.10_1 [pfSense]
                    pfSense-pkg-pfBlockerNG-devel: 3.2.1_20 [pfSense]
                    py311-maxminddb: 2.6.2 [pfSense]
                    py311-sqlite3: 3.11.10_8 [pfSense]
                    rsync: 3.3.0 [pfSense]
                    xxhash: 0.8.2_1 [pfSense]

                    Number of packages to be installed: 13

                    The process will require 17 MiB more space.
                    [1/13] Installing nettle-3.10_1...
                    [1/13] Extracting nettle-3.10_1: .......... done
                    [2/13] Installing lua54-5.4.7...
                    [2/13] Extracting lua54-5.4.7: ......... done
                    [3/13] Installing xxhash-0.8.2_1...
                    [3/13] Extracting xxhash-0.8.2_1: .......... done
                    [4/13] Installing libmaxminddb-1.11.0...
                    [4/13] Extracting libmaxminddb-1.11.0: .......... done
                    [5/13] Installing py311-sqlite3-3.11.10_8...
                    [5/13] Extracting py311-sqlite3-3.11.10_8: ........ done
                    [6/13] Installing lighttpd-1.4.76...
                    ===> Creating groups
                    Using existing group 'www'
                    ===> Creating users
                    Using existing user 'www'
                    [6/13] Extracting lighttpd-1.4.76: .......... done
                    [7/13] Installing gnugrep-3.11...
                    [7/13] Extracting gnugrep-3.11: .......... done
                    [8/13] Installing jq-1.7.1...
                    [8/13] Extracting jq-1.7.1: .......... done
                    [9/13] Installing grepcidr-2.0_1...
                    [9/13] Extracting grepcidr-2.0_1: ..... done
                    [10/13] Installing iprange-1.0.4_2...
                    [10/13] Extracting iprange-1.0.4_2: ..... done
                    [11/13] Installing rsync-3.3.0...
                    [11/13] Extracting rsync-3.3.0: .......... done
                    [12/13] Installing py311-maxminddb-2.6.2...
                    [12/13] Extracting py311-maxminddb-2.6.2: .......... done
                    [13/13] Installing pfSense-pkg-pfBlockerNG-devel-3.2.1_20...
                    [13/13] Extracting pfSense-pkg-pfBlockerNG-devel-3.2.1_20: .......... done
                    Saving updated package information...
                    done.
                    Loading package configuration... done.
                    Configuring package components...
                    Loading package instructions...
                    <pre style="white-space: pre-wrap;">PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(888): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.packages(76): install_package_xml()
                    #3 {main}
                    thrown</pre>=====
                    Message from grepcidr-2.0_1:

                    --
                    ===> NOTICE:

                    The grepcidr port currently does not have a maintainer. As a result, it is
                    more likely to have unresolved issues, not be up-to-date, or even be removed in
                    the future. To volunteer to maintain this port, please create an issue at:

                    https://bugs.freebsd.org/bugzilla

                    More information about port maintainership is available at:

                    https://docs.freebsd.org/en/articles/contributing/#ports-contributing

                    Message from rsync-3.3.0:

                    --
                    Some scripts provided by rsync, such as rrsync,
                    require Python, which is not installed by default.

                    Cleaning up cache...done.
                    Success

                    This is the error i'm gettingin the upper right corner:
                    PHP {$errortype}s
                    PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(888): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.packages(76): install_package_xml()
                    #3 {main}
                    thrown @ 2025-01-21 11:22:24

                    When I keep the install i get this error when i return to my dashboard:
                    9186400d-2f5b-4e16-9398-a7edb2876cbf-image.png

                    This is the crash report: Crash report begins. Anonymous machine information:

                    amd64
                    15.0-CURRENT
                    FreeBSD 15.0-CURRENT #0 plus-RELENG_24_11-n256407-1bbb3194162: Fri Nov 22 05:08:46 UTC 2024 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/obj/amd64/AKWlAIiM/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/sources/FreeBS

                    Crash report details:

                    PHP Errors:
                    [21-Jan-2025 11:15:42 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(888): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.packages(76): install_package_xml()
                    #3 {main}
                    thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
                    [21-Jan-2025 11:20:42 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(1088): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.packages(80): delete_package_xml()
                    #3 {main}
                    thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
                    [21-Jan-2025 11:22:24 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(888): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.packages(76): install_package_xml()
                    #3 {main}
                    thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
                    [21-Jan-2025 11:22:38 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(711): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.start_packages(66): sync_package()
                    #3 {main}
                    thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
                    [21-Jan-2025 11:24:51 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
                    #2 /usr/local/www/index.php(539): include('/usr/local/www/...')
                    #3 {main}
                    thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
                    [21-Jan-2025 11:26:22 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
                    #2 /usr/local/www/index.php(539): include('/usr/local/www/...')
                    #3 {main}
                    thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693

                    No FreeBSD crash data found.

                    And in right upper corner it says: PHP {$errortype}s
                    PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
                    #2 /usr/local/www/index.php(539): include('/usr/local/www/...')
                    #3 {main}
                    thrown @ 2025-01-21 11:24:51
                    PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
                    #2 /usr/local/www/index.php(539): include('/usr/local/www/...')
                    #3 {main}
                    thrown @ 2025-01-21 11:26:22

                    This problem only disappears after a de-install of the pfBlockerNG-devel leaving me without a working version of pfBlockerNG.

                    After the deinstall i get this message in the right upper corner:
                    PHP {$errortype}s
                    PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                    Stack trace:
                    #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                    #1 /etc/inc/pkg-utils.inc(1088): require_once('/usr/local/pkg/...')
                    #2 /etc/rc.packages(80): delete_package_xml()
                    #3 {main}
                    thrown @ 2025-01-21 11:28:26

                    **A lot of information, but I hope i helps us find a solution.

                    Thanks!!!**

                    GertjanG 1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan @JHplusUser
                      last edited by Gertjan

                      @JHplusUser said in Error after package update:

                      Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693

                      [24.11-RELEASE][root@pfSense.bhf.tld]/etc: grep -R 'function config_read_file' *
                      inc/config.lib.inc:function config_read_file(bool $use_backup = false, bool $use_cache = false) {
                      

                      This function is pretty 'core' as pfSense can't start without it. It's this function that read the "config.xml" that contains ALL the pfSense configuration.

                      Yet your /usr/local/pkg/pfblockerng/pfblockerng.inc at line 693 wants to call it, and can't find it.
                      Oh yeah ?
                      Go look at very first line of the same file, /usr/local/pkg/pfblockerng/pfblockerng.inc, right after the comment section, line 23 !

                      719942e4-391c-4139-aa85-51edc2e2a9a0-image.png

                      so /etc/inc/config.lib.inc is included there. That files contains the function that it can't find !!
                      Check this ( close to line 2361 ).

                      For me, this error doesn't make sense.
                      I'm short of other suggestions, except one sledgehammer solution :
                      Backup your config.xml.
                      Re install pfSense from scratch.
                      That will take care of it for sure.

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      J 2 Replies Last reply Reply Quote 0
                      • J
                        JHplusUser @Gertjan
                        last edited by

                        @Gertjan currently, after de-install i cant find /etc/inc/config.lib.inc;

                        I was hoping to prevent a full re-install

                        Would reinstalling a older backup help? I have one een configuration XML for feb 2024... What will reinstalling that do with all the packages en the pfsense version?
                        After that what would be the best way to preceed in updating?

                        Can I just update the pfsense core first to the newest version or would you recommend 24.03 and then the packages?
                        Thats what I did an how I get in this mess ... what did I do wrong?
                        What would be the best approach?

                        Thanks!

                        S GertjanG 2 Replies Last reply Reply Quote 0
                        • S
                          SteveITS Galactic Empire @JHplusUser
                          last edited by

                          @JHplusUser Restoring a backup just uploads the .xml file so no it will not help.

                          Possibly you might be encountering disk problems or file system corruption.
                          https://docs.netgate.com/pfsense/en/latest/troubleshooting/filesystem-check.html

                          If you can't easily recover files I would just reinstall and then restore because other files may be missing or damaged.
                          https://docs.netgate.com/pfsense/en/latest/backup/restore-during-install.html

                          @JHplusUser said in Error after package update:

                          Can I just update the pfsense core first to the newest version or would you recommend 24.03 and then the packages

                          What version of pfSense do you have?

                          Always, ALWAYS install packages only for the version you have. If you are not on the current version ensure the correct version is selected for your update branch in System/Update. Otherwise if you install packages for a later version it may install dependencies such as a later PHP version, and that may break pfSense.

                          Recent versions are supposed to handle this by forcing the admin to select the new version in order to upgrade.

                          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                          Upvote 👍 helpful posts!

                          J 1 Reply Last reply Reply Quote 0
                          • J
                            JHplusUser @SteveITS
                            last edited by

                            @SteveITS said in Error after package update:

                            What version of pfSense do you have?

                            currently I run 24.11
                            problems arose when I first updated tot 24.11 and then updated all the packages as well.

                            thanks for your advice

                            1 Reply Last reply Reply Quote 0
                            • GertjanG
                              Gertjan @JHplusUser
                              last edited by Gertjan

                              @JHplusUser said in Error after package update:

                              currently, after de-install i cant find /etc/inc/config.lib.inc;

                              ? 😢
                              /etc/inc/config.lib.inc isn't a "pfBlockerng" file.
                              It'a a core pfSense file, as every other file in /etc/inc/
                              Without it, pfSense won't start. You'll see massive errors on the pfSense console access - the GUI wouldn't be able to start. Etc.

                              @JHplusUser said in Error after package update:

                              What will reinstalling that do with all the packages en the pfsense version?

                              That's a non question.
                              Get a clean 24.11 from TAC.
                              Install it.

                              Now, if you have 5 second : do nothing .... but one thing : intstall pfBlockerng.
                              It works - right ?
                              Then, let the magic happen : import your config.xml.
                              Your packages will get installed, set up.
                              One extra reboot afterwards (maybe not needed) and done.

                              @JHplusUser said in Error after package update:

                              I was hoping to prevent a full re-install

                              1. Check that the pfSense device is powered down.
                              2. Insert the USB drive with the pfSense 24.11 firm ware.
                              3. Connect the "most important interface ... nope, non an a RJ45 .... the console cable ! The one you got with your device.
                              4. Connect with your favorite 'telnet' client (Putty will do just fine, and select the right COM port - The pfSense doc tells you all about how to use the console access)
                              5. Power up your pfSense.
                              6. Flow what happens on the screen.
                                ....
                                When the install is done, and you are asked to remove the USB drive, remove the drive.
                                The device will reboot.
                                pfSense will boot.

                              Again : the full official steps are documented in the official Netgate Documentation support site.

                              You should do it anyways one, so you know what to do when there is a plain catastrophe situation, as these are never the good moment to "learn "' stuff.

                              @JHplusUser said in Error after package update:

                              would you recommend 24.03 and then the packages?

                              You can't get 24.03 anymore.
                              24.11 is what everybody is using these days.

                              No "help me" PM's please. Use the forum, the community will thank you.
                              Edit : and where are the logs ??

                              J 2 Replies Last reply Reply Quote 0
                              • J
                                JHplusUser @Gertjan
                                last edited by

                                @Gertjan said in Error after package update:

                                /etc/inc/config.lib.inc isn't a "pfBlockerng" file.
                                It'a a core pfSense file, as every other file in /etc/inc/
                                Without it, pfSense won't start. You'll see massive errors on the pfSense console access - the GUI wouldn't be able to start. Etc

                                I have no such problems; without pfblockerng installed pfsense seems to work fine
                                problems arrise when i instal pflockerng dev or previous.

                                currently i do find the file config.lib.inc... i would swear I previously couldn't .... but as you said that would have been strange

                                1 Reply Last reply Reply Quote 0
                                • J
                                  JHplusUser @Gertjan
                                  last edited by JHplusUser

                                  @Gertjan said in Error after package update:

                                  [24.11-RELEASE][root@pfSense.bhf.tld]/etc: grep -R 'function config_read_file' *
                                  inc/config.lib.inc:function config_read_file(bool $use_backup = false, bool $use_cache = false) {

                                  I was able to locate the file config.lib.inc and it seems the function config_read_file is indeed missing somehow?\

                                  On the other hand it seems in most of the errors that is calling the function with the same name from /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                                  e.g. PHP {$errortype}s
                                  PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                                  Stack trace:
                                  #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                                  #1 /etc/inc/pkg-utils.inc(1088): require_once('/usr/local/pkg/...')
                                  #2 /etc/rc.packages(80): delete_package_xml()
                                  #3 {main}

                                  Please also note that I have no problem what soever with pfsense without pfblockerng installed.

                                  If no real solution exist I will start preparing myself for a reinstall...

                                  S GertjanG 2 Replies Last reply Reply Quote 0
                                  • S
                                    SteveITS Galactic Empire @JHplusUser
                                    last edited by

                                    @JHplusUser said in Error after package update:

                                    Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng

                                    these may help:
                                    https://redmine.pfsense.org/issues/15933
                                    https://forum.netgate.com/topic/195242/pfblockerng-3-2-0_16-causes-gui-crash-with-24-03/

                                    Can you double check your update branch is set to 24.11 if that's your pfSense version?

                                    "undefined function" may mean the PHP file containing that function isn't loading fully due to an error condition above that point. We were going with your comment that the file didn't exist on disk.

                                    Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                                    When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                                    Upvote 👍 helpful posts!

                                    J 2 Replies Last reply Reply Quote 0
                                    • J
                                      JHplusUser @SteveITS
                                      last edited by

                                      @SteveITS said in Error after package update:

                                      Can you double check your update branch is set to 24.11 if that's your pfSense version?

                                      45d93c0c-ee86-4bcf-94a9-d0f5a218da56-image.png

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        JHplusUser @SteveITS
                                        last edited by JHplusUser

                                        @SteveITS said in Error after package update:

                                        https://redmine.pfsense.org/issues/15933

                                        indeed same problem, unfortunately now simple solution

                                        @SteveITS said in Error after package update:

                                        https://forum.netgate.com/topic/195242/pfblockerng-3-2-0_16-causes-gui-crash-with-24-03/

                                        Solution here seems to be:
                                        "I upgraded to 24.11 RC from command line, and now all is working in GUI again."
                                        but I already run 24.11

                                        @SteveITS said in Error after package update:

                                        "undefined function" may mean the PHP file containing that function isn't loading fully due to an error condition above that point. We were going with your comment that the file didn't exist on disk.

                                        Currently I am able to locate the file, but wasn't able to locate the function in it...

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          marcosm Netgate
                                          last edited by

                                          The function config_read_file() was introduced in 24.11. If pfSense actually reports version 24.11, then it's best re-install, install the System Patches package to apply the recommended patches, then restore.

                                          1 Reply Last reply Reply Quote 1
                                          • J
                                            JHplusUser @Gertjan
                                            last edited by JHplusUser

                                            @Gertjan said in Error after package update:

                                            Insert the USB drive with the pfSense 24.11 firm ware.

                                            This seems to be the right one to download for my netgate 7100, am I wright?
                                            a897acee-2e82-48be-a16b-d6cd36606737-image.png

                                            S 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.