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

    Squid Guard PHP error after upgrade to 23.01

    Cache/Proxy
    6
    14
    2.7k
    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.
    • B
      ben-ihelputech @hugoeyng
      last edited by

      @hugoeyng Could you please link your topic?

      hugoeyngH 1 Reply Last reply Reply Quote 0
      • M
        michmoor LAYER 8 Rebel Alliance
        last edited by

        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
        • hugoeyngH
          hugoeyng @ben-ihelputech
          last edited by

          @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

            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

              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

                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

                  Solved: Apply patches

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

                  S 1 Reply Last reply Reply Quote 1
                  • JonathanLeeJ
                    JonathanLee
                    last edited by

                    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

                      @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 Reply Quote 0
                      • B
                        ben-ihelputech @smnolde
                        last edited by ben-ihelputech

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

                        S 1 Reply Last reply Reply Quote 1
                        • S
                          smnolde @ben-ihelputech
                          last edited by

                          @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.