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

Squid Guard PHP error after upgrade to 23.01

Scheduled Pinned Locked Moved Cache/Proxy
14 Posts 6 Posters 2.7k 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.
  • M
    michmoor LAYER 8 Rebel Alliance
    last edited by Apr 18, 2023, 8:26 PM

    I would recommend a complete reset outlined here.

    https://docs.netgate.com/pfsense/en/latest/troubleshooting/squid.html#complete-reset

    Firewall: NetGate,Palo Alto-VM,Juniper SRX
    Routing: Juniper, Arista, Cisco
    Switching: Juniper, Arista, Cisco
    Wireless: Unifi, Aruba IAP
    JNCIP,CCNP Enterprise

    1 Reply Last reply Reply Quote 0
    • H
      hugoeyng @ben-ihelputech
      last edited by Apr 18, 2023, 9:06 PM

      @ben-ihelputech https://forum.netgate.com/topic/177948/the-firewall-encountered-an-error-after-upgrading-to-23-01

      I love pfSense!

      Hugo Eyng
      Datamais Sistemas

      1 Reply Last reply Reply Quote 1
      • B
        ben-ihelputech
        last edited by Apr 18, 2023, 11:01 PM

        I tried updating my boot environment again and still ran into these errors:

        PHP errors
        
            PHP ERROR: Type: 64, File: /usr/local/pkg/squid.inc, Line: 852, Message: Array and string offset access syntax with curly braces is no longer supported @ 2023-04-18 17:02:11
        ...
            PHP ERROR: Type: 1, File: /usr/local/pkg/squidguard.inc, Line: 1150, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1150
            Stack trace:
            #0 /usr/local/pkg/squidguard.inc(1046): convert_pfxml_to_sgxml_rewrite(Array)
            #1 /usr/local/pkg/squidguard.inc(93): convert_pfxml_to_sgxml()
            #2 /etc/inc/pkg-utils.inc(1068): require_once('/usr/local/pkg/...')
            #3 /etc/rc.packages(80): delete_package_xml('squidGuard', 'deinstall')
            #4 {main}
            thrown @ 2023-04-18 17:02:27
            PHP ERROR: Type: 1, File: /usr/local/pkg/squidguard.inc, Line: 1150, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1150
            Stack trace:
            #0 /usr/local/pkg/squidguard.inc(1046): convert_pfxml_to_sgxml_rewrite(Array)
            #1 /usr/local/pkg/squidguard.inc(93): convert_pfxml_to_sgxml()
            #2 /etc/inc/pkg-utils.inc(868): require_once('/usr/local/pkg/...')
            #3 /etc/rc.packages(76): install_package_xml('squidGuard')
            #4 {main}
            thrown @ 2023-04-18 17:02:28
            PHP ERROR: Type: 1, File: /usr/local/pkg/squidguard.inc, Line: 1150, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1150
            Stack trace:
            #0 /usr/local/pkg/squidguard.inc(1046): convert_pfxml_to_sgxml_rewrite(Array)
            #1 /usr/local/pkg/squidguard.inc(93): convert_pfxml_to_sgxml()
            #2 /etc/inc/pkg-utils.inc(691): require_once('/usr/local/pkg/...')
            #3 /etc/rc.start_packages(66): sync_package('squidGuard')
            #4 {main}
            thrown @ 2023-04-18 17:02:45
        

        Seems like the function that parses custom squid integrations is not happy for some reason.

        1 Reply Last reply Reply Quote 0
        • B
          ben-ihelputech
          last edited by Apr 19, 2023, 10:19 PM

          I did more testing today, and the error might be related to XMLRPC Sync. I have been trying to upgrade my secondary firewall before I upgrade my primary firewall. I have a suspicion that the older PHP 7 config from the primary firewall is trying to force itself onto the backup firewall. When I disable XMLRPC sync for Squid and SquidGuard, I am able to reinstall both packages on the backup firewall after upgrading with no issues.

          1 Reply Last reply Reply Quote 0
          • B
            ben-ihelputech
            last edited by Apr 24, 2023, 11:22 PM

            I did a clean install of both firewalls (one at a time to maintain uptime). After reinstallation, when I enable XMLRPC sync, I get an error on SquidGuard, which crashes the service. The solution for right now is to manually sync the settings between both firewalls for SquidGuard, which prevents the error. This is less than ideal and I hope it gets patched soon.

            [24-Apr-2023 11:29:33 America/Chicago] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1150
            Stack trace:
            #0 /usr/local/pkg/squidguard.inc(1046): convert_pfxml_to_sgxml_rewrite(Array)
            #1 /usr/local/pkg/squidguard.inc(93): convert_pfxml_to_sgxml()
            #2 /usr/local/www/xmlrpc.php(147) : eval()'d code(1): require_once('/usr/local/pkg/...')
            #3 /usr/local/www/xmlrpc.php(147): eval()
            #4 /usr/local/share/pear/XML/RPC2/Server/CallHandler/Instance.php(141): pfsense_xmlrpc_server->exec_php('require_once('/...', 0)
            #5 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Server_Callhandler_Instance->__call('pfsense.exec_ph...', Array)
            #6 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
            #7 /usr/local/www/xmlrpc.php(988): XML_RPC2_Backend_Php_Server->handleCall()
            #8 {main}
              thrown in /usr/local/pkg/squidguard.inc on line 1150
            [24-Apr-2023 11:30:43 America/Chicago] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1150
            Stack trace:
            #0 /usr/local/pkg/squidguard.inc(1046): convert_pfxml_to_sgxml_rewrite(Array)
            #1 /usr/local/pkg/squidguard.inc(93): convert_pfxml_to_sgxml()
            #2 /usr/local/www/xmlrpc.php(147) : eval()'d code(1): require_once('/usr/local/pkg/...')
            #3 /usr/local/www/xmlrpc.php(147): eval()
            #4 /usr/local/share/pear/XML/RPC2/Server/CallHandler/Instance.php(141): pfsense_xmlrpc_server->exec_php('require_once('/...', 0)
            #5 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Server_Callhandler_Instance->__call('pfsense.exec_ph...', Array)
            #6 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
            #7 /usr/local/www/xmlrpc.php(988): XML_RPC2_Backend_Php_Server->handleCall()
            #8 {main}
              thrown in /usr/local/pkg/squidguard.inc on line 1150
            [24-Apr-2023 11:31:54 America/Chicago] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1150
            Stack trace:
            #0 /usr/local/pkg/squidguard.inc(1046): convert_pfxml_to_sgxml_rewrite(Array)
            #1 /usr/local/pkg/squidguard.inc(93): convert_pfxml_to_sgxml()
            #2 /usr/local/www/xmlrpc.php(147) : eval()'d code(1): require_once('/usr/local/pkg/...')
            #3 /usr/local/www/xmlrpc.php(147): eval()
            #4 /usr/local/share/pear/XML/RPC2/Server/CallHandler/Instance.php(141): pfsense_xmlrpc_server->exec_php('require_once('/...', 0)
            #5 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Server_Callhandler_Instance->__call('pfsense.exec_ph...', Array)
            #6 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
            #7 /usr/local/www/xmlrpc.php(988): XML_RPC2_Backend_Php_Server->handleCall()
            #8 {main}
              thrown in /usr/local/pkg/squidguard.inc on line 1150
            [24-Apr-2023 11:33:05 America/Chicago] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1150
            Stack trace:
            #0 /usr/local/pkg/squidguard.inc(1046): convert_pfxml_to_sgxml_rewrite(Array)
            #1 /usr/local/pkg/squidguard.inc(93): convert_pfxml_to_sgxml()
            #2 /usr/local/www/xmlrpc.php(147) : eval()'d code(1): require_once('/usr/local/pkg/...')
            #3 /usr/local/www/xmlrpc.php(147): eval()
            #4 /usr/local/share/pear/XML/RPC2/Server/CallHandler/Instance.php(141): pfsense_xmlrpc_server->exec_php('require_once('/...', 0)
            #5 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Server_Callhandler_Instance->__call('pfsense.exec_ph...', Array)
            #6 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
            #7 /usr/local/www/xmlrpc.php(988): XML_RPC2_Backend_Php_Server->handleCall()
            #8 {main}
              thrown in /usr/local/pkg/squidguard.inc on line 1150
            
            
            1 Reply Last reply Reply Quote 1
            • B
              ben-ihelputech
              last edited by May 4, 2023, 3:56 PM

              Solved: Apply patches

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

              S 1 Reply Last reply May 6, 2023, 1:59 PM Reply Quote 1
              • J
                JonathanLee
                last edited by May 6, 2023, 12:18 AM

                Apply both Squid and Squidguard patch files with level 4 per the directions. I have been running them on a 2100 max and it works fine for day and a half now no issues.

                Make sure to upvote

                1 Reply Last reply Reply Quote 0
                • S
                  smnolde @ben-ihelputech
                  last edited by May 6, 2023, 1:59 PM

                  @ben-ihelputech How do I apply the patches on my 2100MAX? I have the same errors and occasional crashes today after upgrading but am a casual home user.

                  Or how long before these appear in the package manager as an upgrade?

                  B 1 Reply Last reply May 6, 2023, 2:34 PM Reply Quote 0
                  • B
                    ben-ihelputech @smnolde
                    last edited by ben-ihelputech May 6, 2023, 2:35 PM May 6, 2023, 2:34 PM

                    @smnolde https://docs.netgate.com/pfsense/en/latest/development/system-patches.html

                    S 1 Reply Last reply May 6, 2023, 2:47 PM Reply Quote 1
                    • S
                      smnolde @ben-ihelputech
                      last edited by May 6, 2023, 2:47 PM

                      @ben-ihelputech Many thanks, that was quite helpful.

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