Bug #8079
closedXMLRPC Issues with Captive Portal Vouchers
100%
Description
Multiple issues with Captive Portal vouchers:
1. Sync of the voucher configuration doesn't work because in /etc/rc.filter_synchronize the configuration area is labeled "vouchers" when it should be "voucher"
2. When a voucher action is taken, a PHP stack trace appears on the secondary:
xception calling XMLRPC method exec_php #1 : Unhandled XML_RPC2_InvalidTypeEncodeException exception:Impossible to encode value '' from type 'NULL'. No analogous type in XML_RPC.#0 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value::createFromNative(NULL) #1 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value_Struct->encode() #2 /usr/local/share/pear/XML/RPC2/Backend/Php/Response.php(86): XML_RPC2_Backend_Php_Value_Struct->encode() #3 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Backend_Php_Response::encode(Array, 'utf-8') #4 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse() #5 /usr/local/www/xmlrpc.php(555): XML_RPC2_Backend_Php_Server->handleCall() #6 {main} @ 2017-11-10 12:56:08 Exception calling XMLRPC method exec_php #1 : Unhandled XML_RPC2_InvalidTypeEncodeException exception:Impossible to encode value '' from type 'NULL'. No analogous type in XML_RPC.#0 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value::createFromNative(NULL) #1 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value_Struct->encode() #2 /usr/local/share/pear/XML/RPC2/Backend/Php/Response.php(86): XML_RPC2_Backend_Php_Value_Struct->encode() #3 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Backend_Php_Response::encode(Array, 'utf-8') #4 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse() #5 /usr/local/www/xmlrpc.php(555): XML_RPC2_Backend_Php_Server->handleCall() #6 {main} @ 2017-11-10 12:56:09
First is an easy fix, second looks similar to #7953, just need to track down exactly where it's happening.
Updated by Jim Pingle about 7 years ago
Actually #1 is not valid because that section shouldn't sync that way. That typo breaking the sync in that direction is the only reason it was working before.
A missing global declaration for $config in the sync code on the secondary is why the config/rolls didn't show up on the secondary as expected. It was also causing the error from point 2. I added some safety belts to it as well.
Updated by Jim Pingle about 7 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 66dd4fe2ad0c7d63f9da45a9b32bd6c94a78fc44.
Updated by Paighton Bisconer about 7 years ago
Tested in Current Base System 2.4.2.a.20171110.1037
Still produces Errors on Secondary after testing expired voucher
Communications error occurred
Exception calling XMLRPC method exec_php #1 : Unhandled XML_RPC2_InvalidTypeEncodeException exception:Impossible to encode value '' from type 'NULL'. No analogous type in XML_RPC.#0 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value::createFromNative(NULL)
#1 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value_Struct->encode()
#2 /usr/local/share/pear/XML/RPC2/Backend/Php/Response.php(86): XML_RPC2_Backend_Php_Value_Struct->encode()
#3 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Backend_Php_Response::encode(Array, 'utf-8')
#4 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
#5 /usr/local/www/xmlrpc.php(555): XML_RPC2_Backend_Php_Server->handleCall()
#6 {main}2017-11-10 19:29:54
2017-11-10 19:29:55
Exception calling XMLRPC method exec_php #1 : Unhandled XML_RPC2_InvalidTypeEncodeException exception:Impossible to encode value '' from type 'NULL'. No analogous type in XML_RPC.#0 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value::createFromNative(NULL)
#1 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value_Struct->encode()
#2 /usr/local/share/pear/XML/RPC2/Backend/Php/Response.php(86): XML_RPC2_Backend_Php_Value_Struct->encode()
#3 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Backend_Php_Response::encode(Array, 'utf-8')
#4 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
#5 /usr/local/www/xmlrpc.php(555): XML_RPC2_Backend_Php_Server->handleCall()
#6 {main}
Updated by Jim Pingle about 7 years ago
That snapshot is not recent enough to contain the changes
Updated by Chris Linstruth about 7 years ago
Tested latest snapshot 2.4.2.a.20171110.1936. Works here.
Updated by Jim Pingle about 7 years ago
- Status changed from Feedback to Resolved
Updated by Dejan Milojevic about 7 years ago
Master and slave servers still do not communicate 100% properly in relation to expired/active vouchers and do not update each other consistently upon expiring the ticket (on demand).