Bug #15026
closedPHP Error since upgrading to 23.09
0%
Description
Hello all,
Since upgrading to 23.09, have the following error messages in my notice area coming up at regular interval (when pfblocker reloads, but also it seems acme too)
PHP errors
PHP ERROR: Type: 1, File: /etc/inc/config.inc, Line: 52, Message: Uncaught Error: Call to undefined function get_php_default_memory() in /etc/inc/config.inc:52
Stack trace:
#0 /etc/inc/gwlb.inc(25): require_once()
#1 /etc/inc/functions.inc(35): require_once('/etc/inc/gwlb.i...')
#2 /usr/local/pkg/acme/acme.inc(153): require_once('/etc/inc/functi...')
#3 /usr/local/pkg/acme/acme_command.sh(6): include_once('/usr/local/pkg/...')
#4 {main}
thrown 2023-11-23 03:16:00
PHP ERROR: Type: 1, File: /etc/inc/config.inc, Line: 52, Message: Uncaught Error: Call to undefined function get_php_default_memory() in /etc/inc/config.inc:52
Stack trace:
#0 /etc/inc/gwlb.inc(25): require_once()
#1 /etc/inc/functions.inc(35): require_once('/etc/inc/gwlb.i...')
#2 /usr/local/www/pfblockerng/pfblockerng.php(55): require_once('/etc/inc/functi...')
#3 {main}
thrown
2023-11-23 03:45:00
I also have the following patches installed if it may help.
Fix DHCP WAN with multiple IP Alias VIPs may leave 0.0.0.0 IP address on interface at boot (Redmine #14966)
Fix interfaces.php not saving PPP or Gateway configuration (Redmine #14949)
Fix PHP Error on interfaces.php when creating a PPP interface (Redmine #14949)
Fix PHP Error in DHCPv6 Server with empty configuration section (Redmine #14978)
Fix incorrect DHCPv6 Relay input validation errors (Redmine #14965)
Eric
Updated by Christopher Cope about 1 year ago
Those patches shouldn't affect it. That function 'get_php_default_memory()' should be defined in /etc/inc/util.inc. If it's not there, it may be an issue with the upgrade.
You can run the following command and see if there is any output:
cat /etc/inc/util.inc | grep "php_default_memory"
Either way I would suggest doing a re-image to 23.09 and testing if you can reproduce it.
Updated by Eric Nguyen about 1 year ago
cat /etc/inc/util.inc | grep "php_default_memory"
it is there and the code as well
function get_php_default_memory($ARCH) {
if ($ARCH == "amd64") {
$default_mem = 512;
} else {
return 128;
}
// Ensure the default isn't taking all of the available RAM with a minimum of 128M
$system_mem = get_memory()[0];
if ($default_mem >= $system_mem) {
$default_mem = $system_mem / 2;
if ($default_mem < 128) {
$default_mem = 128;
}
}
return floor($default_mem);
}
Updated by Jim Pingle about 1 year ago
- Status changed from New to Not a Bug
This isn't a bug, either something didn't complete in your upgrade or something else patched on there is causing it. Either way the best place to figure out what happened on your installation is to discuss it on the forum.