Jump to content

Recommended Posts

I have a holiday program which has suddenly stopped working, please see log file error and piece of code.  Any ideas?



[19-Jul-2019 09:46:53 UTC] PHP Warning:  SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /home/ccuk/public_html/low-cost-holidays.php on line 877
[19-Jul-2019 09:46:53 UTC] PHP Warning:  SimpleXMLElement::__construct(): EADSDatabaseError error raised, with message : Error 3011:  Unknown identifier f in /home/ccuk/public_html/low-cost-holidays.php on line 877
[19-Jul-2019 09:46:53 UTC] PHP Warning:  SimpleXMLElement::__construct(): ^ in /home/ccuk/public_html/low-cost-holidays.php on line 877
[19-Jul-2019 09:46:53 UTC] PHP Fatal error:  Uncaught Exception: String could not be parsed as XML in /home/ccuk/public_html/low-cost-holidays.php:877
Stack trace:
#0 /home/ccuk/public_html/low-cost-holidays.php(877): SimpleXMLElement->__construct('EADSDatabaseErr...')
#1 {main}
  thrown in /home/ccuk/public_html/low-cost-holidays.php on line 877

and this is the code around line 877

865        if (isset($_GET['btnSearch'])) {         // NEW SEARCH
866            $_SESSION['offers'] = [];
867            $tempOffers = [];
869            foreach ($urlArr as $provider => $ua) {        
870                if ($ua['active']!=1) continue;        
871                $search_url = $ua['url'].'?';
872                $search_params['page'] = $ua['page'];
873                $path = $search_url . http_build_query($search_params);
874                file_put_contents('cacurl.txt', "$path\n", FILE_APPEND);
875                $rawxml  = get_data($path);
876                if ($rawxml) {
877                    $xml = new simpleXMLElement($rawxml);
                    $providerOffers = $xml->xpath("//Offer");
                    foreach ($providerOffers as $po) {
                        $po['logo'] = $ua['logo'];
                    $tempOffers = array_merge($tempOffers,$providerOffers);

Link to post
Share on other sites
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.