Navigation

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

    23.01 Squid issue

    Cache/Proxy
    6
    30
    1062
    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.
    • JonathanLee
      JonathanLee last edited by JonathanLee

      Hello fellow Netgate community members can you please help?

      When I try to make any changes to the Squid configuration this now occurs....

      Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414 Stack trace: #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled() #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array) #2 /usr/local/www/pkg_edit.php(137): eval() #3 {main} thrown in /usr/local/pkg/squid_reverse.inc on line 414 PHP ERROR: Type: 1, File: /usr/local/pkg/squid_reverse.inc, Line: 414, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414 Stack trace: #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled() #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array) #2 /usr/local/www/pkg_edit.php(137): eval() #3 {main} thrown

      4fe04a1e-f6e7-468c-8c67-07cae91cda68-image.png

      PHP_errors.txt

      JonathanLee 1 Reply Last reply Reply Quote 0
      • JonathanLee
        JonathanLee @JonathanLee last edited by

        @jonathanlee
        5bb1549d-38c6-4837-b187-bc0043c0eb74-image.png

        If you reboot everything is fine and works, as soon as I try to change any configuration of squid that is when the errors occur.

        Does anyone know how to fix this issue with 23.01 prior to this I could make squid configuration changes on the fly.

        JonathanLee 1 Reply Last reply Reply Quote 0
        • JonathanLee
          JonathanLee @JonathanLee last edited by

          @jonathanlee Should I open a ticket to do a full reinstall of 23.01 from a USB? or will this result in the same thing?

          1 Reply Last reply Reply Quote 0
          • Referenced by  JonathanLee JonathanLee 
          • Referenced by  JonathanLee JonathanLee 
          • Referenced by  JonathanLee JonathanLee 
          • stephenw10
            stephenw10 Netgate Administrator last edited by

            Are you using Squid Reverse? Is that what you were making changes to?

            That line is:

            	if (is_array($config['installedpackages']['squidreversegeneral']['config'])) {
            

            Do you have that section in your config?

            Steve

            JonathanLee 2 Replies Last reply Reply Quote 0
            • JonathanLee
              JonathanLee @stephenw10 last edited by JonathanLee

              @stephenw10 I just use Squid, this is when I save the general page for 🐙 and this error occurs. It works but I cannot make any changes currently. I have Squid Reverse proxy disabled.

              1 Reply Last reply Reply Quote 0
              • JonathanLee
                JonathanLee @stephenw10 last edited by JonathanLee

                @stephenw10

                bfd72a15-12d7-42f4-b2c2-6915a46e37c1-image.png

                That section is blank, I can check the actual file hold on.

                JonathanLee 1 Reply Last reply Reply Quote 0
                • JonathanLee
                  JonathanLee @JonathanLee last edited by

                  @jonathanlee

                  fa4d3970-12ee-4fec-9c83-625f7caf6051-image.png

                  1 Reply Last reply Reply Quote 0
                  • stephenw10
                    stephenw10 Netgate Administrator last edited by

                    Ok, go to the Reverse Squid setting page and save it without making any changes. That will create the reverse squid config section and you should then be able to make Squid changes.

                    JonathanLee A hugoeyng P 4 Replies Last reply Reply Quote 2
                    • JonathanLee
                      JonathanLee @stephenw10 last edited by

                      @stephenw10 That fixed it!!! thanks, TAC wants me to do a full reinstall of 23.01, I wonder if I have to do it now.

                      M stephenw10 2 Replies Last reply Reply Quote 1
                      • M
                        michmoor @JonathanLee last edited by

                        @jonathanlee
                        @stephenw10 you are awesome !!

                        Firewall: NetGate 6100/7100U, Palo Alto
                        Routing: Juniper MX204 , Arista 7050X3
                        Switching: Juniper EX/QFX. Arista 7050SX
                        Wireless: Unifi, Aruba IAP

                        1 Reply Last reply Reply Quote 1
                        • stephenw10
                          stephenw10 Netgate Administrator @JonathanLee last edited by

                          @jonathanlee said in 23.01 Squid issue:

                          I wonder if I have to do it now.

                          Probably not. That's an actual php bug, you would hit that on a clean install just the same.

                          JonathanLee 1 Reply Last reply Reply Quote 0
                          • JonathanLee
                            JonathanLee @stephenw10 last edited by

                            @stephenw10 I did a full fresh USB install with formatting the old firewall first and that error did not return. It was something that went wrong with the upgrade in place for me.

                            1 Reply Last reply Reply Quote 0
                            • Referenced by  JonathanLee JonathanLee 
                            • stephenw10
                              stephenw10 Netgate Administrator last edited by

                              And you imported the config that didn't have an reverse squid tags present?

                              JonathanLee 1 Reply Last reply Reply Quote 0
                              • JonathanLee
                                JonathanLee @stephenw10 last edited by

                                @stephenw10 yes, this was done with a imported the config, again this was the config after the resave of the reverse proxy being disabled.

                                1 Reply Last reply Reply Quote 0
                                • stephenw10
                                  stephenw10 Netgate Administrator last edited by

                                  Ah, Ok that would have had the Reverse Squid tags in it then. So, yes, that's what I would expect.

                                  1 Reply Last reply Reply Quote 1
                                  • Referenced by  JonathanLee JonathanLee 
                                  • A
                                    Amenophisphp @stephenw10 last edited by

                                    @stephenw10 Thanks a lot

                                    1 Reply Last reply Reply Quote 0
                                    • hugoeyng
                                      hugoeyng @stephenw10 last edited by

                                      @stephenw10 Hello.

                                      I did as you said, but did not work.

                                      Upgrading pfSense-pkg-squidGuard...
                                      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 1 package(s) will be affected (of 0 checked):

                                      Installed packages to be REINSTALLED:
                                      pfSense-pkg-squidGuard-1.16.18_20 [pfSense]

                                      Number of packages to be reinstalled: 1
                                      [1/1] Reinstalling pfSense-pkg-squidGuard-1.16.18_20...
                                      [1/1] Extracting pfSense-pkg-squidGuard-1.16.18_20: .......... done
                                      Removing squidGuard components...
                                      Menu items... done.
                                      Services... done.
                                      Loading package instructions...

                                      Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1193
                                      Stack trace:
                                      #0 /usr/local/pkg/squidguard.inc(1047): convert_pfxml_to_sgxml_time(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 in /usr/local/pkg/squidguard.inc on line 1193
                                      PHP ERROR: Type: 1, File: /usr/local/pkg/squidguard.inc, Line: 1193, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1193
                                      Stack trace:
                                      #0 /usr/local/pkg/squidguard.inc(1047): convert_pfxml_to_sgxml_time(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}
                                      thrownpkg-static: DEINSTALL script failed
                                      Saving updated package information...
                                      overwrite!
                                      Loading package configuration... done.
                                      Configuring package components...
                                      Loading package instructions...

                                      Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1193
                                      Stack trace:
                                      #0 /usr/local/pkg/squidguard.inc(1047): convert_pfxml_to_sgxml_time(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 in /usr/local/pkg/squidguard.inc on line 1193
                                      PHP ERROR: Type: 1, File: /usr/local/pkg/squidguard.inc, Line: 1193, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1193
                                      Stack trace:
                                      #0 /usr/local/pkg/squidguard.inc(1047): convert_pfxml_to_sgxml_time(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}
                                      thrownpkg-static: POST-INSTALL script failed

                                      Cleaning up cache... done.
                                      Success

                                      I love pfSense!

                                      Hugo Eyng
                                      Datamais Sistemas

                                      stephenw10 1 Reply Last reply Reply Quote 0
                                      • stephenw10
                                        stephenw10 Netgate Administrator @hugoeyng last edited by

                                        That's a different error. It's in Squidguard not squid: /usr/local/pkg/squidguard.inc:1193

                                        I added the variation you're seeing to the open bug for this:
                                        https://redmine.pfsense.org/issues/13978

                                        Steve

                                        1 Reply Last reply Reply Quote 1
                                        • P
                                          psUser @stephenw10 last edited by

                                          @stephenw10
                                          didnt help

                                          Ive tried it today, but still the same error

                                          PHP ERROR: Type: 1, File: /usr/local/pkg/squid_reverse.inc, Line: 414, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                          Stack trace:
                                          #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                          #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                          #2 /usr/local/www/pkg_edit.php(137): eval()
                                          #3 {main}
                                          thrown @ 2023-03-20 09:49:44

                                          1 Reply Last reply Reply Quote 1
                                          • stephenw10
                                            stephenw10 Netgate Administrator last edited by

                                            Did it create the reverse squid config section i your config file?

                                            P 2 Replies Last reply Reply Quote 0
                                            • P
                                              psUser @stephenw10 last edited by psUser

                                              This post is deleted!
                                              1 Reply Last reply Reply Quote 0
                                              • P
                                                psUser @stephenw10 last edited by

                                                @stephenw10

                                                # Always allow localhost connections
                                                http_access allow localhost
                                                
                                                request_body_max_size 0 KB
                                                delay_pools 1
                                                delay_class 1 2
                                                delay_parameters 1 -1/-1 -1/-1
                                                delay_initial_bucket_level 100
                                                delay_access 1 allow allsrc
                                                
                                                # Reverse Proxy settings
                                                
                                                
                                                # Custom options before auth
                                                
                                                
                                                # Set YouTube safesearch restriction
                                                (..)
                                                request_header_access YouTube-Restrict deny all
                                                request_header_add YouTube-Restrict none youtubedst
                                                # Setup allowed ACLs
                                                # Allow local network(s) on interface(s)
                                                http_access allow allowed_subnets
                                                http_access allow localnet
                                                # Default block all to be sure
                                                http_access deny allsrc
                                                
                                                

                                                I see something liek that [ this is exactly the end of that config file : /usr/local/etc/squid/squid.conf

                                                1 Reply Last reply Reply Quote 0
                                                • stephenw10
                                                  stephenw10 Netgate Administrator last edited by

                                                  No, I mean in the main pfSense config file (/cfconf/config.xml) did it create a set of tags: <squidreversegeneral>
                                                  The lack of that config section is what causes that error.

                                                  Steve

                                                  P 1 Reply Last reply Reply Quote 0
                                                  • P
                                                    psUser @stephenw10 last edited by

                                                    @stephenw10

                                                                   </patches>
                                                                   <squidreversegeneral></squidreversegeneral>
                                                                   <ntopng>
                                                                           <config>
                                                    
                                                    
                                                    1 Reply Last reply Reply Quote 0
                                                    • stephenw10
                                                      stephenw10 Netgate Administrator last edited by

                                                      Ok, so if you save the settings on the Squid Reverse page does that config get populated?

                                                      Where exactly are you seeing the error?

                                                      P 1 Reply Last reply Reply Quote 0
                                                      • P
                                                        psUser @stephenw10 last edited by

                                                        @stephenw10

                                                        if I do change or with changing anything I press "save" button, I will be "redirected" to some page:

                                                        https://192.168.3.1/pkg_edit.php?xml=squid.xml&id=0

                                                        Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414 Stack trace: #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled() #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array) #2 /usr/local/www/pkg_edit.php(137): eval() #3 {main} thrown in /usr/local/pkg/squid_reverse.inc on line 414 PHP ERROR: Type: 1, File: /usr/local/pkg/squid_reverse.inc, Line: 414, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414 Stack trace: #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled() #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array) #2 /usr/local/www/pkg_edit.php(137): eval() #3 {main} thrown
                                                        

                                                        Zrzut ekranu z 2023-03-20 17-16-35.png

                                                        And then when I refresh GUI:

                                                        Netgate pfSense Plus has detected a crash report or programming bug. Click here for more information.

                                                        Crash report begins.  Anonymous machine information:
                                                        
                                                        amd64
                                                        14.0-CURRENT
                                                        FreeBSD 14.0-CURRENT #0 plus-RELENG_23_01-n256037-6e914874a5e: Fri Feb 10 20:30:29 UTC 2023     root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/obj/amd64/VDZvZksF/var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/sources/FreeBS
                                                        
                                                        Crash report details:
                                                        
                                                        PHP Errors:
                                                        [20-Mar-2023 09:49:44 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        [20-Mar-2023 09:49:56 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        [20-Mar-2023 09:52:16 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        [20-Mar-2023 09:54:43 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        [20-Mar-2023 09:55:49 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        [20-Mar-2023 09:58:46 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        [20-Mar-2023 10:00:46 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        [20-Mar-2023 10:02:10 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        [20-Mar-2023 10:17:19 Europe/Warsaw] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squid_reverse.inc:414
                                                        Stack trace:
                                                        #0 /usr/local/pkg/squid.inc(751): squid_reverse_enabled()
                                                        #1 /usr/local/www/pkg_edit.php(137) : eval()'d code(1): squid_validate_general(Array, Array)
                                                        #2 /usr/local/www/pkg_edit.php(137): eval()
                                                        #3 {main}
                                                          thrown in /usr/local/pkg/squid_reverse.inc on line 414
                                                        
                                                        
                                                        
                                                        No FreeBSD crash data found.```
                                                        
                                                        and any change isnt saved, and as I see doesnt get populated
                                                        P 1 Reply Last reply Reply Quote 0
                                                        • P
                                                          psUser @psUser last edited by psUser

                                                          @stephenw10

                                                          ok I make it works :

                                                          • disabled in GUI - save worked
                                                          • changed interfaces for squid - save button still works

                                                          from now on I wasnt able to enable in GUI squid, so Ive enabled squid by changing cfg file:

                                                          <enable_squid></enable_squid>
                                                          into
                                                          <enable_squid>on</enable_squid>

                                                          opened GUI and started squid, changes for now works

                                                          ofc save button still behave as it was before, so Im not able to make any changes in squid in GUI.

                                                          1 Reply Last reply Reply Quote 0
                                                          • stephenw10
                                                            stephenw10 Netgate Administrator last edited by

                                                            Hmm, and the <squidreversegeneral> section remains empty? You're unable to save the Reverse Squid page?

                                                            P 1 Reply Last reply Reply Quote 0
                                                            • P
                                                              psUser @stephenw10 last edited by psUser

                                                              @stephenw10
                                                              yes empty,

                                                                              </patches>
                                                                              <squidreversegeneral></squidreversegeneral>
                                                                              <ntopng>
                                                                                      <config>
                                                                                              <enable>on</enable>
                                                                                              <keepdata>on</keepdata>
                                                              
                                                              

                                                              and yes Im unable to save the Reverse Squid page with the same error.

                                                              1 Reply Last reply Reply Quote 0
                                                              • stephenw10
                                                                stephenw10 Netgate Administrator last edited by

                                                                And that was the case both with and without Squid enabled?

                                                                Hmm, unclear what could cause that then. We might need to see your config directly to know more.

                                                                You should add your variation to the open bug for this:
                                                                https://redmine.pfsense.org/issues/13984

                                                                Steve

                                                                1 Reply Last reply Reply Quote 0
                                                                • First post
                                                                  Last post