Bug #13515
closedpfSense - Feature #13446: Upgrade PHP from 7.4 to 8.1
Snort with PHP 8.1 - TypeError when saving edits to an interface
100%
Description
Testing the Snort package with the September 22, 2022 snapshot of "PHP 8.1 and FreeBSD Main" in a VMware virtual machine.
The following PHP type error is thrown when adding/editing a Snort interface:
amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #0 devel-main-n255797-d8d104eec65: Thu Sep 22 18:54:16 UTC 2022 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-master-main/obj/amd64/YVYTCXmQ/var/jenkins/workspace/pfSense-CE-snapshots-master-main/sources/FreeBSD-src-dev
Crash report details:
PHP Errors:
[24-Sep-2022 10:05:24 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/snort/snort.inc:4345
Stack trace:
#0 /usr/local/pkg/snort/snort.inc(505): snort_get_vpns_list()
#1 /usr/local/pkg/snort/snort_generate_conf.php(32): snort_build_list(Array, 'default')
#2 /usr/local/pkg/snort/snort.inc(3834): include('/usr/local/pkg/...')
#3 /usr/local/pkg/snort/snort.inc(1023): snort_generate_conf(Array)
#4 /usr/local/www/snort/snort_interfaces_edit.php(522): sync_snort_package_config()
#5 {main}
thrown in /usr/local/pkg/snort/snort.inc on line 4345
Documenting bug here, and I will also add it to my private TODO list for Snort remediations against PHP 8.1.
Updated by Bill Meeks about 2 years ago
This issue has been resolved in the latest Snort GUI package pull request posted here for review and merge: [https://github.com/pfsense/FreeBSD-ports/pull/1191]. When the Pull Request is merged, this issue can be marked RESOLVED.
Updated by Kris Phillips about 2 years ago
- Status changed from New to Confirmed
Tested on September 30th builds of CE. Doesn't appear this has been merged as the error is still present.
Updated by Bill Meeks about 2 years ago
The request is being reviewed by Jim Pingle and is not yet merged.
Updated by Jim Pingle about 2 years ago
- Affected Plus Version changed from 22.11 to 23.01
Updated by Bill Meeks about 2 years ago
This issue has been resolved with the merging of Pull Request 1191 as detailed here: https://github.com/pfsense/FreeBSD-ports/pull/1191.
Updated by Jim Pingle about 2 years ago
- Status changed from Confirmed to Resolved
Updated by Steve Wheeler almost 2 years ago
One report of this still in 23.01-REL:
https://forum.netgate.com/topic/178019/php-errors-at-upgrade-to-23-01/
Updated by Jove Too over 1 year ago
I am still seeing this error in 2.7.0-RELEASE.
22:53:08 Bootup complete 22:53:08 PHP ERROR: Type: 1, File: /usr/local/pkg/snort/snort.inc, Line: 4345, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/snort/snort.inc:4345 Stack trace: #0 /usr/local/pkg/snort/snort.inc(505): snort_get_vpns_list() #1 /usr/local/pkg/snort/snort_generate_conf.php(32): snort_build_list(Array, 'default') #2 /usr/local/pkg/snort/snort.inc(3834): include('/usr/local/pkg/...') #3 /usr/local/pkg/snort/snort.inc(1023): snort_generate_conf(Array) #4 /etc/inc/pkg-utils.inc(709) : eval()'d code(1): sync_snort_package_config() #5 /etc/inc/pkg-utils.inc(709): eval() #6 /etc/rc.start_packages(66): sync_package('snort') #7 {main} thrown