Web Weather > Weather Website PHP/AJAX scripting
Error in WU-forecast.php
LeFuet:
How do I get rid of this error, I can not remember that I changed something there:
Warning: Division by zero at /var/www/vhosts/euro-picture.de/httpdocs/wetterstation/cumulus/WU-forecast.php on line 638
www.wetter.euro-picture.de
saratogaWX:
It is caused by the URL you selected for the default forecast - it is incomplete (missing lat,long)
Change it to
--- Code: ---https://www.wunderground.com/weather/de/hiltenfingen/48.1535502%2C10.6805879
--- End code ---
and the script should work fine.
Any of the wunderground urls that are of the format /weather/{country}/{city} require a /{latitude},{longitude} to be used with the script.
LeFuet:
even after modification, the error remains
saratogaWX:
I'm not sure you made the change effective. Your Settings.php still has
--- Code: ---'Hiltenfingen|https://www.wunderground.com/weather/de/hiltenfingen', //Hiltenfingen, Deutschland
--- End code ---
and needs to have
--- Code: ---'Hiltenfingen|https://www.wunderground.com/weather/de/hiltenfingen/48.1535502%2C10.6805879', //Hiltenfingen, Deutschland
--- End code ---
That is why the error persists.
LeFuet:
Thank you for your help
recards
Navigation
[0] Message Index
[#] Next page
Go to full version