That previous error is gone., data.php has run
Now the next one: Chrome => right click => inspect => console
forecast.php:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at wxsim_frc_2017.js?2017.03:104
at XMLHttpRequest.request.onload (wxsim_frc_2017.js?2017.03:640)
These are the javascript lines
function getData(){
var dpath = ewnpath+"/data.php?wunit="+wiset+"&lang="+lang;
wget([dpath], function(points) {
strData=JSON.parse(points);
twidth=$("#plaintblhead").width();
The error message above tels us that /data.php has returned data with an Unexpected token <
That is for sure as when we test that call to data.php ourselves (all from the inspect window) : http://meteohila2.esy.es/wxsim1/wxsim//data.php?wunit=kmh&lang=en ,
this data is retuned (i removed a few more errors after the first ones):
<b>Notice</b>: Use of undefined constant lang - assumed 'lang' in <b>/home/u291478535/public_html/wxsim1/wxsim/config.php</b> on line <b>62</b>
<b>Notice</b>: Undefined index: ewnwunit in <b>/home/u291478535/public_html/wxsim1/wxsim/config.php</b> on line <b>285</b>
<b>Notice</b>: Undefined variable: wxsimtype in <b>/home/u291478535/public_html/wxsim1/wxsim/config.php</b> on line <b>289</b>
{"plaintext":[{"time":"Tonight","temp":"4","tempRoundedColor":"rgb(167, 233, 50)","wdir":337,"wspd":0.83,"bft":1,"prec":"0","pop":0,"uv":"00","icon":"nt_clear","txt":"Clear. "},{"time":"Monday","temp":"14","tempRoundedColor":"rgb(244, 192, 11)","wdir":337,"wspd":1.11,"bft":1,"prec":"0","pop":0,"uv":"02","icon":"clear","txt":"Sunny. "},{"time":"Monday
So you should find the setting which sets all messages on.
It are not errors, but notices and they can not be interpreted by the JSON.parse javascript.
If you switch error reporting off there will be no errors and the javascript will get the data starting with {“plaintext” and will parse it.
Up to the next problem.
Wim