Project

General

Profile

Actions

Regression #13978

closed

PHP errors with squidGuard

Added by Bob Williams about 1 year ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
squidguard
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.7.0
Affected Plus Version:
23.01
Affected Architecture:
All

Description

Receiving the following error when trying to install/uninstall the squidguard package.

codePHP ERROR: Type: 1, File: /usr/local/pkg/squidguard.inc, Line: 1101, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1101
Stack trace:
#0 /usr/local/pkg/squidguard.inc(1044): convert_pfxml_to_sgxml_source(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}_text


Files

PHP_errors.log (436 Bytes) PHP_errors.log mokey fraggle, 02/24/2023 10:15 AM

Related issues

Related to Regression #13984: PHP errors with squidResolvedMarcos M

Actions
Actions #1

Updated by mokey fraggle about 1 year ago

This also impacts pfblocker-ng and squid. I suspect it has to do with what appears to be an incompatibility with php 8.0 and the packages pulled in from FreeBSD.

With Pfblocker-ng it causes a crash and if the widget is active on the dashboard it makes the UI on the dashboard non functional. I worked around this by manually disabling the widget in the config.xml to remove it from the dashboard and disabled the service from starting manually as well.

Actions #2

Updated by mokey fraggle about 1 year ago

see the crash log below...

Actions #3

Updated by Marcos M about 1 year ago

  • Tracker changed from Bug to Regression
  • Subject changed from Squidguard PHP errors when installing/uninstalling package to PHP error with Squidguard

Additional report:

PHP ERROR: Type: 1, File: /usr/local/pkg/squidguard.inc, Line: 1069, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1069
Stack trace:
#0 /usr/local/pkg/squidguard.inc(93): convert_pfxml_to_sgxml()
#1 /etc/inc/pkg-utils.inc(691): require_once('/usr/local/pkg/...')
#2 /etc/rc.start_packages(66): sync_package('squidGuard')
#3 {main}
thrown @ 2023-02-27 08:44:43

Actions #4

Updated by Steve Wheeler about 1 year ago

Also:

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

Actions #5

Updated by Steve Wheeler about 1 year ago

  • Subject changed from PHP error with Squidguard to PHP errors in SquidGuard

Additionally:

PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1124
Stack trace:
#0 /usr/local/pkg/squidguard.inc(1045): convert_pfxml_to_sgxml_destination(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 in /usr/local/pkg/squidguard.inc on line 1124
Actions #6

Updated by EDUARDO RODRIGUEZ ROMERO 11 months ago

I just found the problem and the solution.

Problem:

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

Cause :

The squidguardtime settings it's empty

Solution :

Take a backup configuration (DiagnosticsBackup -> RestoreBackup -> Restore -> Download configuration as XML)

Edit the xml file and search "<squidguardtime>", delete the tag "<squidguardtime></squidguardtime>", save the file with another name, example "config-good.xml".

Restore the new configuration file (DiagnosticsBackup -> RestoreBackup -> Restore -> Configuration file), select the file "config-good.xml" and then press the button "Restore Configuration"

After that, the system will restart, reinstall the packages and everything will be fine. DonĀ“t neeed to do anything else.

Let me know if everything it's fine.

Actions #7

Updated by Marcos M 11 months ago

  • Subject changed from PHP errors in SquidGuard to PHP errors with squidGuard
  • Status changed from New to Feedback
  • Assignee set to Marcos M
  • Target version set to 2.7.0
  • Plus Target Version set to 23.01
  • Affected Version set to 2.7.0

Fixed on squid 0.4.46 and squidGuard 1.16.19; these should be available on the next ports build.

Actions #8

Updated by Marcos M 11 months ago

Actions #9

Updated by Jim Pingle 11 months ago

  • Target version deleted (2.7.0)
  • Plus Target Version deleted (23.01)
Actions #10

Updated by Danilo Zrenjanin 7 months ago

  • Status changed from Feedback to Resolved

Tested installing/uninstalling squid 0.4.46 and squidGuard 1.16.19.

There were no PHP errors.

I am marking this ticket resolved.

Actions

Also available in: Atom PDF