Regression #13984
openPHP errors with squid
0%
Description
I am not running Squid Reverse proxy, only Squid Proxy for outbound traffic.
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
Files
Related issues
Updated by Jonathan Lee 3 months ago
System was not having issues under prior version of pfSense. After update PHP errors occur when you try to make changes to Squid Proxy configuration under the GUI of pfSense.
Updated by Jonathan Lee 3 months ago
- File 1676770173796-137e899c-1a1c-4e9d-9c05-316f7e445d65-image.png 1676770173796-137e899c-1a1c-4e9d-9c05-316f7e445d65-image.png added
This error displays when any changes are made under Squid
Updated by Jonathan Lee 3 months ago
Resolve for this was found when working with members of the Netgate forum, resave the reverse proxy settings and after Squid settings can be changed again.
https://forum.netgate.com/topic/178036/23-01-squid-issue/4?_=1676779106375
RESOLVED TAC Ticket also 1445820528 stated upgrade did not fully complete for me to reinstall pfsense from USB
Updated by Marcos M 26 days ago
- Tracker changed from Bug to Regression
- Subject changed from Squid 23.01 PHP issues when saving changes to PHP errors with Squid
- Description updated (diff)
- Affected Version set to 2.7.0
- Affected Architecture All added
- Affected Architecture deleted (
SG-2100)
Additional errors:
[29-Apr-2023 11:47:53 America/Barbados] 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 [29-Apr-2023 11:51:46 America/Barbados] 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(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 1124 [29-Apr-2023 11:53:52 America/Barbados] 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(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 1124
Updated by Marcos M 25 days ago
- File patch_squid.txt patch_squid.txt added
- File patch_squidGuard.txt added
- Subject changed from PHP errors with Squid to PHP errors with squid and squidGuard
- Status changed from New to Pull Request Review
https://gitlab.netgate.com/pfSense/FreeBSD-ports/-/merge_requests/337
Patch for both squid and squidGuiard are attached; use the System Patches pacakge to apply it (set Path Strip Count
to 4): https://docs.netgate.com/pfsense/en/latest/development/system-patches.html
Updated by Jonathan Lee 25 days ago
I appreciate all you do. Testing attached patches, I noticed you adjusted clam AV or Squids antivirus to store on the SDD system, that looks awesome. I am running a reboot now.
Updated by Jonathan Lee 25 days ago
- File Error.jpg Error.jpg added
- File error2.jpg error2.jpg added
I ran into an error and had to revert back. Attached is the error.
Updated by Jonathan Lee 25 days ago
Other Patch debug does not show 64 in debug
Updated by Jonathan Lee 25 days ago
- File Screenshot 2023-05-02 231306.jpg Screenshot 2023-05-02 231306.jpg added
- File Screenshot 2023-05-02 231358.jpg Screenshot 2023-05-02 231358.jpg added
It just dawned on me I use both modes on Squid transparently and SSL Intercept is this a problem with me using this patch? It works perfectly fine after I did a firmware reinstall again. Amazon fire is Transparent Xbox is and Imac and Windows 12 have certs and run in SSL intercept.
Updated by Jonathan Lee 25 days ago
- File Screenshot 2023-05-03 at 1.40.44 PM.png Screenshot 2023-05-03 at 1.40.44 PM.png added
- File Screenshot 2023-05-03 at 1.42.22 PM.png Screenshot 2023-05-03 at 1.42.22 PM.png added
- File Screenshot 2023-05-03 at 1.18.24 PM.png Screenshot 2023-05-03 at 1.18.24 PM.png added
Installed and no errors so far. System running.
Thank you. This is with the change you made.
Updated by Jonathan Lee 25 days ago
I got another user https://forum.netgate.com/user/hugoeyng to test with their PHP errors this was his result.
Jonathan Lee The log:
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: [03-May-2023 18:12:49 America/Sao_Paulo] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1184 Stack trace: #0 /usr/local/pkg/squidguard.inc(1038): convert_pfxml_to_sgxml_time(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 1184 [03-May-2023 18:34:31 America/Sao_Paulo] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1184 Stack trace: #0 /usr/local/pkg/squidguard.inc(1038): convert_pfxml_to_sgxml_time(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 1184 [03-May-2023 18:34:41 America/Sao_Paulo] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/squidguard.inc:1184 Stack trace: #0 /usr/local/pkg/squidguard.inc(1038): 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 1184 [03-May-2023 18:34:42 America/Sao_Paulo] PHP 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 No FreeBSD crash data found.
Updated by Marcos M 25 days ago
- File patch_squidGuard.txt patch_squidGuard.txt added
This should resolve the error, thanks!
Updated by Jonathan Lee 25 days ago
Thanks, I appreciate you. I posted the information about this to the Netgate forum again.
Updated by Jonathan Lee 23 days ago
This patch fixed the issue with the other user ben and the HA use, but the other user Hugo still has issues reinstalling Squidguard. It has been running for me for a couple days no issues. I appreciate you fixing this. Squidguard works great once it's running.
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
Install log:
Installing 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.
The following 3 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
db5: 5.3.28_9 [pfSense]
pfSense-pkg-squidGuard: 1.16.18_20 [pfSense]
squidGuard: 1.4_15 [pfSense]
Number of packages to be installed: 3
The process will require 15 MiB more space.
41 KiB to be downloaded.
[1/1] Fetching squidGuard-1.4_15.pkg: ...... done
Checking integrity... done (0 conflicting)
[1/3] Installing db5-5.3.28_9...
[1/3] Extracting db5-5.3.28_9: .......... done
[2/3] Installing squidGuard-1.4_15...
[2/3] Extracting squidGuard-1.4_15: ...... done
[3/3] Installing pfSense-pkg-squidGuard-1.16.18_20...
[3/3] Extracting pfSense-pkg-squidGuard-1.16.18_20: .......... done
Saving updated package information...
done.
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(870): 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(870): require_once('/usr/local/pkg/...')
#3 /etc/rc.packages(76): install_package_xml('squidGuard')
#4 {main}
thrownpkg-static: POST-INSTALL script failed
=====
Message from db5-5.3.28_9:
--
===> NOTICE:
The db5 port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be removed in
the future. To volunteer to maintain this port, please create an issue at:
https://bugs.freebsd.org/bugzilla
More information about port maintainership is available at:
https://docs.freebsd.org/en/articles/contributing/#ports-contributing
--
===> NOTICE:
This port is deprecated; you may wish to reconsider installing it:
EOLd, potential security issues, maybe use db18 instead.
It is scheduled to be removed on or after 2022-06-30.
=====
Message from squidGuard-1.4_15:
Updated by Jonathan Lee 22 days ago
Thanks for your reply.
For those logs you reviewed the user could not reinstall the package as it would not fully install because of the PHP errors start to surface during the package reinstall on his system. Therefore I added this Remine # to github https://github.com/pfsense/FreeBSD-ports/commits/devel/www/pfSense-pkg-squidGuard so that it is added to the package that is pulled. Again, I do not really know where to add in the comments on that side for requests so I added it to the https://github.com/pfsense/FreeBSD-ports/commit/830696d2248aede2a021d02917931b77b94ebfbb "fix dependency package" area, I am hoping that helps fix the package with your patch so that it is added to it. Or to bring some visibility to the issues.
Updated by EDUARDO RODRIGUEZ ROMERO 7 days ago
I have the same problem with the squidguard package, i try to reinstall the squidguard package and i received the error:
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
Updated by EDUARDO RODRIGUEZ ROMERO 7 days ago
Can please somebody help me. This is really important for me because at this moment i dont have any restriction for the user internet navigation.
Thanks a lot
Updated by EDUARDO RODRIGUEZ ROMERO 7 days ago
I just found the problem and the solution.
Problem:
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.
Updated by Marcos M 6 days ago
- Related to Regression #13978: PHP errors with squidGuard added
Updated by Jim Pingle 6 days ago
- Target version deleted (
2.7.0) - Plus Target Version deleted (
23.01)