PHP Errors at upgrade to 23.01
-
Hi,
I got these two PHP Errors ar upgrade to 23.01.
12:58:36 PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 1468, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/pfblockerng/pfblockerng.inc:1468 Stack trace: #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(7253): pfb_build_if_list(true, false) #1 /usr/local/pkg/pfblockerng/pfblockerng.inc(10802): sync_package_pfblockerng() #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): pfblockerng_php_pre_deinstall_command() #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(1093): eval_once('pfblockerng_php...') #5 /etc/rc.packages(80): delete_package_xml('pfBlockerNG-dev...', 'deinstall') #6 {main} thrown
12:57:24 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, 'HOME_NET') #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(715) : eval()'d code(1): sync_snort_package_config() #5 /etc/inc/pkg-utils.inc(715): eval() #6 /etc/rc.start_packages(66): sync_package('snort') #7 {main} thrown
-
@beerman said in PHP Errors at upgrade to 23.01:
/usr/local/pkg/pfblockerng/pfblockerng.inc:1468
Covered in: https://redmine.pfsense.org/issues/13950
@beerman said in PHP Errors at upgrade to 23.01:
/usr/local/pkg/snort/snort.inc:4345
Should have been fixed by: https://redmine.pfsense.org/issues/13515
Note added.Steve
-
The Snort error is likely caused by your box caching an older version of the
snort.inc
file and using that cached version when running the upgrade script. The cached version will not contain the fix for that PHP error you saw.If you had removed the Snort package prior to upgrading pfSense, then when you reinstalled the package it would have used the "new"
snort.inc
file with the PHP fix and not have thrown the error. This kind of situation is why the recommended approach to pfSense version upgrades is to remove all packages, upgrade pfSense, then manually reinstall your packages.But with all of the above said, the error is harmless as now the correct
snort.inc
file is on your system and the next time that particular function is called to build a Pass List it will run correctly. -
OK, thx! :)