some php functions broke after switching from trial > enterprise license

mkaaaay

Well-Known Member
#1
It seems that after we switched to a paid license last night, some PHP are no longer working.
The code block below is now failing, where prior to switching off the trial license, it was not.

PHP:
function makeXMLTree($data)
{
    $output = array();
    $parser = xml_parser_create();
    xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
    xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
    xml_parse_into_struct($parser, $data, $values, $tags);
    xml_parser_free($parser);
    $hash_stack = array();
    foreach ($values as $key => $val) {
        switch ($val['type']) {
            case 'open':
                array_push($hash_stack, $val['tag']);
                break;
            case 'close':
                array_pop($hash_stack);
                break;
            case 'complete':
                array_push($hash_stack, $val['tag']);
                if (isset($val['value'])) {
                    eval("\$output['" . implode($hash_stack, "']['") . "'] = \"{$val['value']}\";");
                }
                array_pop($hash_stack);
                break;
        }
    }
    return $output;
}
It's happening in multiple sites, even when caching is completely turned off.

Same on PHP 5.6, 7.0 and 7.3

Has anyone seen anything like this before?
 

mkaaaay

Well-Known Member
#6
well, we finally worked it out - super weird. XML was returning strange characters in header which was breaking the response causing makexmltree to return false.

No file had been touched to do this, the only thing we did was install the new license and LSWS did a graceful restart.
 

Pong

Administrator
Staff member
#7
LIteSpeed doesn't own such files. LiteSpeed uses the same php as apache. ea-phpxxs are installed from cpanel repo. Could be some cpanel update with ea-phpxx-xml package upgraded.
 
Top