Page 1 of 1
Website Blank
Posted: Fri 26 Jun 2015 9:48 pm
by Big Daddy
Hi all,
A couple of times I have gone to my website and it hasnt displayed anything at all, just blank, no errors displayed on the page. A Reboot of MX seems to get things sorted after the first update has been uploaded. I remembered from the error log when it happened first time some comment about webcam but ignored it as all seemed to be working. However, when it happened again I took a look at the error log and this is the message:
[24-Jun-2015 12:31:24 Europe/London] PHP Parse error: syntax error, unexpected '">webcam</a>:"' (T_CONSTANT_ENCAPSED_STRING) in /home/v07midl/public_html/weather/wt_data_inc.php on line 595
I have process ticked in the extra data files config section as I am using it to generate the wt_data_inc.php file for a weatherbyyou templated based site.
Again, a reboot cleared the error.
Anybody seen or heard of this problem.
Thanks
Andy
Re: Website Blank
Posted: Sat 27 Jun 2015 6:35 am
by steve
When it happens again, please attach the template used to produce that wt_data_inc.php file, and the file itself. Is Cumulus showing any 'token errors' at the command prompt, or are there any errors in the MX diags file? Do you have PHP configured to display errors? I think it should display an error in the browser rather than just a blank page.
Re: Website Blank
Posted: Mon 29 Jun 2015 10:16 am
by Big Daddy
Hi Steve,
Will download the info when it happens again and will take a look at seeting up errors on the php.
The snippet I pasted in the original post was from the error log created on the hosting server but will look at getting it displayed on the webpage, I assume that is some code I need to put in the index page code, but will work it out.
Thanks for your help.
Andy
Re: Website Blank
Posted: Sat 18 Jul 2015 8:30 am
by Big Daddy
Hi Steve,
Everything on this was working fine until I upgraded my Brother-in-Laws website to MX and hit the same issue. The good news I can re-create the issue 100% of the time and it only appears to occur when I set the upload interval to 10 minutes. Have re-created it on both websites / systems, one Raspberry PI and one PC running Windows 7.
The error message on the website displays as:
Parse error: syntax error, unexpected '">webcam</a>:"' (T_CONSTANT_ENCAPSED_STRING) in /home/dalyg/public_html/weather/wt_data_inc.php on line 596
I see no errors in MXDiags, ftplog or in the command prompt. However I do see see a difference in the data files that are processed. I have attached the template used, results of an OK processed file and results of a file with errors. If you take a look at the "webcam" setting in the "others" section you will see the difference. Also the windrose line looks different as well.
Changing the upload interval to 5 minutes or 1 minute resolves the problem but only after a reboot of MX.
Please let me know if you need any further info.
Andy
Re: Website Blank
Posted: Sat 18 Jul 2015 9:13 am
by steve
The PHP error occurs because the webcam web tag contains a link, which contains double quotes, but your template surrounds the item with double quotes, so PHP can't make sense of that. You need to surround the web tag with single quotes, as with the forum web tag.
It looks like the code in MX which checks for the webcam link being empty when it processes the web tag doesn't always work, for some reason, so it plants that empty reference (I can see it doing the same on my web site). I'll see if I can change the code so that it doesn't do that - to check for null or empty rather than just empty. I strongly suspect that upload interval is a red herring, and it's the use of the settings interface to update the internet settings which sets the webcam item to 'empty', so the existing check works.
Edit: I've changed the code to check for 'null or empty', and my web site no longer has the empty webcam href. That template still needs correcting, it won't work in the case where there really is a link.
Re: Website Blank
Posted: Sat 18 Jul 2015 6:21 pm
by Big Daddy
Hi Steve,
Many thanks.
Have changed the double quotes for singles.
Andy
Edit: Seems to be running ok now, no further instances (even when I change the interval to 10 minutes

)