23.01 Squid issue
-
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
-
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 Should I open a ticket to do a full reinstall of 23.01 from a USB? or will this result in the same thing?
-
-
-
-
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
-
@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.
-
That section is blank, I can check the actual file hold on.
-
-
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.
-
@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.
-
@jonathanlee
@stephenw10 you are awesome !! -
@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.
-
@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.
-
-
And you imported the config that didn't have an reverse squid tags present?
-
@stephenw10 yes, this was done with a imported the config, again this was the config after the resave of the reverse proxy being disabled.
-
Ah, Ok that would have had the Reverse Squid tags in it then. So, yes, that's what I would expect.
-
-
@stephenw10 Thanks a lot
-
@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 failedCleaning up cache... done.
Success -
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/13978Steve
-
@stephenw10
didnt helpIve 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 -
Did it create the reverse squid config section i your config file?