Bug #14034
closedPHP errors in ``xmlrpc.php`` during configuration synchronization if the target host has an empty XML tag for a given section
100%
Description
There are several cases where xmlrpc is still accessing the config directly. This causes errors in PHP8 when the secondary has an empty, but existing tag.
The case below is when attempting to sync Virtual IPs to a secondary that doesn't have any Virtual IPs, but has a "<virtualip>" tag.
PHP ERROR: Type: 1, File: /usr/local/www/xmlrpc.php, Line: 399, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/xmlrpc.php:399 Stack trace: #0 /usr/local/share/pear/XML/RPC2/Server/CallHandler/Instance.php(141): pfsense_xmlrpc_server->restore_config_section(Array, 900) #1 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Server_Callhandler_Instance->__call('pfsense.restore...', Array) #2 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse() #3 /usr/local/www/xmlrpc.php(988): XML_RPC2_Backend_Php_Server->handleCall() #4 {main}
Updated by Marcos M over 1 year ago
- Related to Bug #14000: PHP error with xmlrpc added
Updated by Jim Pingle over 1 year ago
- Related to deleted (Bug #14000: PHP error with xmlrpc)
Updated by Jim Pingle over 1 year ago
- Subject changed from PHP errors in xmlrpc.php to PHP errors in ``xmlrpc.php`` during HA config sync with empty tag on sync target
- Assignee set to Jim Pingle
- Target version set to 2.7.0
- Plus Target Version set to 23.05
Updated by Danilo Zrenjanin over 1 year ago
If no VIP is defined on the primary, after any XMLRPC action, it will create an empty <virtualip></virtualip> tag on the secondary, and the PHP error will appear.
If there are no <virtualip></virtualip> tags on the primary and secondary and the Virtual IPs checkbox is unchecked under Select options to sync under System/High Availability Sync on primary, the empty <virtualip></virtualip> will not be created on the secondary after XMLRPC actions. And PHP error won't appear.
Updated by Jim Pingle over 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 9bfd89747eba77091ab6e2df5639a33a185342f8.
Updated by Danilo Zrenjanin over 1 year ago
I tested the patch against:
23.01-RELEASE (amd64) built on Fri Feb 10 20:06:33 UTC 2023 FreeBSD 14.0-CURRENT
The patch fixes it. I am marking this ticket resolved.
Updated by Danilo Zrenjanin over 1 year ago
- Status changed from Feedback to Resolved
Updated by Jim Pingle over 1 year ago
- Subject changed from PHP errors in ``xmlrpc.php`` during HA config sync with empty tag on sync target to PHP errors in ``xmlrpc.php`` during configuration synchronization if the target host has an empty XML tag for a given section
Updating subject for release notes.