Checkliste für wp-forecast / Checklist for wp-forecast

Go to the english version of the checklist

wp-forecast erfreut sich immer größerer Beliebtheit, da bleibt es nicht aus, daß auch die Anzahl der Herausforderungen (=Probleme) wächst, dieses Plugin ans laufen zu bringen oder zu halten.

Daher baue ich hier eine kleine Checkliste, wie man die grundsätzlichen Dinge überprüfen kann, im Falle das wp-forecast nicht wie erwartet out-of-the-box funktioniert.

  1. Zuerst sollte man probieren, ob man generell mit der von wp-forecast verwendeten Adresse Wetterdaten erhält. Dazu gibt man in seinen Browser die URL http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?metric=1&location=EUR|DE|GM007|FRANKFURT AM MAIN ein. Als Ergebnis erhält man ein XML Dokument, das die Wetterdaten von Frankfurt am Main enthält. Wenn nicht, hat accuweather aktuell ein technisches Problem oder Ausfall und man sollte mit weiteren Schritten warten bis es funktioniert.
  2. Im nächsten Schritt prüft man, ob die Downloadroutine von wp-forecast funktioniert. Dies ist recht simpel, man ruft das Dashboard auf und falls die Feeds, die standardmäßig auf der rechten Seite angeordnet sind (WordPress Blog bzw. WordPress Deutschland Blog und WordPress News funktionieren, dann ist alles in Ordnung. Bei Providern, die dies verhindern (z.B. fun.pic.de) gibt es leider keine mir bekannte Möglichkeit das Plugin einzusetzen.
  3. Im nächsten Schritt wird versucht aus dem eigenen Webspace die XML Wetterdaten zu laden und anzuzeigen. Dazu kopiert man sich das folgende kleine Skript, lädt es in das Hauptverzeichnis seiner WordPressinstallation unter dem Namen wpf-test.php und ruft es mit der URL http://mei.nedomain.de/wpf-test.php auf. Das Ergebnis sollte selbsterklärend sein und am Schluß wiederum die aus Schritt 1 bereits bekannten XML Wetterdaten anzeigen.Das Skript funktioniert nur, wenn wp-forecast sich im Plugins-Verzeichnis befindet. Das Plugin muss aber nicht aktiviert sein.
  4. Das Skript: echo "Teste Verbindungsaufbau zu accuweather."; $testurl="http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?metric=1&location=EUR|DE|GM007|FRANKFURT AM MAIN"; echo "\n"; echo htmlspecialchars(fetchURL($testurl)); echo "<" ."/pre>\n"; echo "<" ."/html>\n"; ?>

    Bitte nicht vergessen das Skript wieder vom Server zu entfernen.

  5. Wenn man erstmal soweit gekommen ist, dann ist es wahrscheinlich, das man einen Fehler in wp-forecast gefunden hat. Um mir zu helfen diesen Fehler zu beheben schickt man mir am besten die Ausgabe von wp-forecast im Debug-Modus. Dazu stellt man zuerst in der der Datei wp-forecast.php den Parameter static $wpf_debug=0; auf 1, also static $wpf_debug=1;. Anschließend ruft man die eigene Seite auf und schickt das Ergebnis als HTML Dokument (bei den meisten Browsern Datei, Speichern unter…) an webmaster ät tuxlog punkt de und deaktiviert den Debug-Modus wieder in dem man aus der 1 wieder eine 0 macht. Ergänzend bitte immer die PHP Version und die Version der libcurl (beides steht in der Ausgabe von phpinfo() ) mitschicken.

This is the english version of this checklist

As the community of wp-forecast users grows the number of challenges installing and running wp-forecast raises too. that’s why I decided to create a short checklist to proof your site is able to load the data from the accuweather server. just in case something does not work out-of-the-box, fetching the weather data.

  1. First of all you should try fetching weather data directly from within you browser. Just type in the following URL http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?metric=1&location=EUR|DE|GM007|FRANKFURT AM MAIN . As the result you should see XML data containing the weather data for Frankfurt am Main (thats where I live). If not, probably accuweather has a current technical serverproblem and all you can do is sit and wait until it’s fixed.
  2. In the next step we check if the downloadfunction used in wordpress works with your wordpress installation. It’s simple, just goto the dashboard of your wordpress and make sure you can read the feeds (per default on the right side of the screen including WordPress Blog and WordPress News). There are also webspaces which do not let you do this for security reasons (e.g. fun.pic). that is the point where you should reallize, there is no known possibility to use wp-forecast at all in this case.
  3. Now we will check if it is possible to load weather data directly from your webspace. Please copy the following script and save it as wpf-test.php to your wordpress installation directory. you can call it using the URL http://my.domain.de/wpf-test.php. As a result you should see the XML data from Step 1. This only works when wp-forecast resides on your webspace in the plugins-directory. The Plugin must not be activated.
  4. The Script: echo "Teste Verbindungsaufbau zu accuweather."; $testurl="http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?metric=1&location=EUR|DE|GM007|FRANKFURT AM MAIN"; echo "\n"; echo htmlspecialchars(fetchURL($testurl)); echo "<" ."/pre>\n"; echo "<" ."/html>\n"; ?>

    Please, do not forget to remove the script from the server after finishing the test.

  5. Well, you have come this far? Probably you found a bug in wp-forecast. Now, I need your help to get the information to fix it. Therefore I would appreciate if you send me the html source from the wp-forecast plugin in debug mode. To set the debug mode you have to set the parameter static $wpf_debug=0; to 1 (static $wpf_debug=1;) in wp-forecast.php. Then call your sites mainpage and send the output as html-source (File, Save as… in most browsers) to webmaster at tuxlog dot de. Finally deactivate the debug mode setting the 1 to 0 again. Please also mail the version of php you are using and the version of libcurl (both can be found using phpinfo() ).
Teile diesen Beitrag

14 Kommentare zu „Checkliste für wp-forecast / Checklist for wp-forecast“

  1. Hi, I have your plug-in and love it, but since yesterday I noticed that the current time shown is 1 hour early. Could be something to do with summer savings time, but it’s weird because it wasn’t happening before, when we already were in summer savings. Is there a way to fix it? The time here at this time of the year is UTC -2. I have current time checked with 0 offset.

    thanks

    1. hello Octavio,

      I suppose the daylight saving for the selected location changed (in the accuweather data) and thats why the time changed. if you want a different time just use offset 60. i have just googled a bit about timezones and brazil and it seems there are different timezones in brazil. i remember that we have had the same problem with new zealand (more than one timezone too), accuweather did deliver the wrong timezone/daylight setting and therefore wp-forecast calculates the wrong time.

      regards, hans

      p.s. great photos at your site…congrats

  2. Pingback: wordpress « wp-forecast 3.0 beta – goes Multiuser « Tuxlog

  3. Thanks for making such an awesome plugin. I’m having some kind of cache issue. Every so often when the site loads up, I see this error message:

    Warning: unserialize() expects parameter 1 to be string, array given in /home/…/wp-content/plugins/wp-forecast/wp-forecast.php on line 173

    Warning: unserialize() expects parameter 1 to be string, array given in /home/…/wp-content/plugins/wp-forecast/wp-forecast.php on line 277

    Warning: unserialize() expects parameter 1 to be string, array given in /home/…/wp-content/plugins/wp-forecast/func_accu.php on line 268

    Then, if hit reload or go to another page, the weather shows up fine.

    Any thoughts?

    Lincoln

    PS: Here is the debug call stack

    Start of MAIN
    End of MAIN
    Start of function widget_wp_forecast_init ()
    End of function widget_wp_forecast_init ()
    Start of function wp_forecast_init ()
    Start of get_wpf_opts (A)
    End of get_wpf_opts ()
    End of function wp_forecast_init ()
    Start of wp_forecast_admin_init ()
    End of wp_forecast_admin_init ()
    Start of function wp_forecast_css ()
    End of function wp_forecast_css ()

    1. hello Lincoln,
      thats the only known problem with wordpress 3.0. you can fix it -until I release the 3.0 version- changing the unserialize to maybe_unserialize in any of the lines you get the warning from.

      regards, hans

  4. Is it possible to cache the data and only refresh once in an hour. We’re getting lazy website loading time because of wp-forecast.
    Thank you. :bye:

    1. hi eglin,
      does this error only show with wp-forecast or also in the dashboard? this matter seems to be known, take a look at the wordpress forums and it seems a problem with the provider and wordpress combination. which transport method did you try? does it show up with every transport?

  5. Hallo Hans,

    I’m administering a website for my high school reunion and I installed your plug-in, so that my classmates can see the weather in the city where we will be meeting in August.

    The plug-in works fine in terms of providing a forecast. However, loading the forecast data takes a very, very, very, long time (4+ minutes), so the website takes forever to first come up. For this reason I’ve had to deactivate the plug in.

    I followed your checklist above and got to step 3. I copied the code as above, saved to a file with the exact name as you suggest, put it in my plug-ins directory, made sure your plug in was deactivated (but that it is in the plug in directory), called http://www.tp79reunion09.com/wpf-test.php from my browser, and received back the XML back in about 1 minute…better, but still slow.

    What does this mean? Is there anyway to speed up the retrieval of information?

    Mit freundlichen Gruessen,

    Rafael

    1. hello Rafael,
      I just tried your wpf-test.php link and it took about 50 seconds to fetch the data. well, this is still very slow. the good news is that if you raise the refresh time for the cache this time will only be necessary once everey n seconds. e.g. set the cache refresh to 3600, and only one load an hour will be slow. another way is to integrate the weather widget inside of an iframe. the page will be displayed and once an hour the widget will take a minute to load, all other calls should be quick since the data is taken from the cache in your wordpress database. with version 2.4 of wp-forecast there will also be the possibility to get the weather data from another weather provider, weatherbug. maybe the connection of your provider is quicker with this server. v2.4 is in beta status at the moment and should be released in the next few weeks.
      regards
      hans

  6. Pingback: >Tuxlog

  7. Pingback: >Tuxlog

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

:bye: 
:good: 
:negative: 
:scratch: 
:wacko: 
:yahoo: 
B-) 
mehr …
 


Diese Seite verwendet Cookies. Mit der Nutzung von tuxlog erklärst Du Dich mit der Verwendung von Cookies einverstanden. Detaillierte Informationen über die Verwendung von Cookies auf dieser Website findest Du in der Datenschutzerklärung.

Nach oben scrollen