Problems with Squidguard after updating to CE 2.9.0
-
After updating to CE 2.9.0, Squidguard won't install or launch properly.
The logs:
PHP ERROR: Type: 1, File: /usr/local/pkg/squidguard_configurator.inc, Line: 1004, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard_configurator.inc:1004 Stack trace: #0 /usr/local/pkg/squidguard_configurator.inc(392): sg_create_config() #1 /usr/local/pkg/squidguard.inc(329): sg_reconfigure() #2 /etc/inc/pkg-utils.inc(789) : eval()'d code(2): squidguard_resync() #3 /etc/inc/pkg-utils.inc(789): eval() #4 /etc/inc/pkg-utils.inc(905): eval_once() #5 /etc/rc.packages(76): install_package_xml() #6 {main}Whatever anyone says, I like this expansion. It's old-school and vanilla. :)
I'm not ready to part with it.Fixe in file change:
/usr/local/pkg/squidguard_configurator.inc
squidguard_configurator.zipYou need to re-register the package:
php -r 'require_once("/usr/local/pkg/squidguard.inc"); squidguard_resync();'php -r 'require_once("/etc/inc/config.inc"); require_once("/etc/inc/pkg-utils.inc"); install_package_xml("squidGuard");'
-
works, thank you!
for those who like to know the changes and apply with a patch:
--- /usr/local/pkg/squidguard_configurator.inc.orig 2026-08-26 23:00:42.333449000 +0200 +++ /usr/local/pkg/squidguard_configurator.inc 2026-08-21 21:55:15.000000000 +0200 @@ -1001,7 +1001,7 @@ $adv_pos = strpos($ent,'_adv'); $ads_pos = strpos($ent, '_ads'); if (($ads_pos > 0 || $adv_pos > 0) && $squidguard_config[F_ADV_BLANKIMG] == 'on') { - $sg_tag->items[] = "redirect " . sg_redirector_base_url($ent[F_REDIRECT], RMOD_INT_BLANKIMG); + $sg_tag->items[] = "redirect " . sg_redirector_base_url($ent, RMOD_INT_BLANKIMG); } if ($squidguard_config[F_ENABLELOG] == 'on' ) { -
One more:
ERROR
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: https://127.0.0.1/sgerror.php?Unable to forward this request at this time.
Fix:
Services → Squid Proxy Server → General → Custom Options (Integrations);url_rewrite_access deny CONNECT;url_rewrite_access allow all -
@Tolian said in Problems with Squidguard after updating to CE 2.9.0:
;url_rewrite_access deny CONNECT;url_rewrite_access allow allok, what exactly is that for?
for me, filtering seems to also work without these extra lines... -
@dneuhaeuser Sometimes works as need, but simetimes got:
ERROR
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: https://127.0.0.1/sgerror.php?;url_rewrite_access deny CONNECT;url_rewrite_access allow allhelps to fix.
My experience.
If you have no problem, you don't need to fix it :)
Privacy Policy · Cookie Policy