Tuxlog

Tuxlog, aus dem Alltag eines Linux-Fans

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

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 kopiertman 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.
    Code:
    <?php
    //
    // Kleine Routine zum Test der Vebrindung zu accuweather.
    //
    
    require_once("wp-config.php");
    require_once("wp-content/plugins/wp-forecast/funclib.php");
    echo "\n";
    echo "\n";
    echo "<h2>Teste Verbindungsaufbau zu accuweather.</h2>";
    
    $testurl="http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?metric=1&location=EUR|DE|GM007|FRANKFURT AM MAIN";
    echo "<pre>\n";
    echo htmlspecialchars(fetchURL($testurl));
    echo "</pre>\n";
    echo "</html>\n";
    ?>

    Bitte nicht vergesen das Skript wieder vom Server zu entfernen.

  4. 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 phpifo() ) 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.
    Code:
    <?php
    // Kleine Routine zum Test der Vebrindung zu accuweather.
    //
    
    require_once("wp-config.php");
    require_once("wp-content/plugins/wp-forecast/funclib.php");
    echo "\n";
    echo "\n";
    echo "<h2>Teste Verbindungsaufbau zu accuweather.</h2>";
    
    $testurl="http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?metric=1&location=EUR|DE|GM007|FRANKFURT AM MAIN";
    echo "<pre>\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.

  4. 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() ).

Artikel, die auch interessant sein könnten:

Teile und hab' Spaß Diese Icons verlinken auf Bookmark Dienste bei denen Nutzer neue Inhalte finden und mit anderen teilen können.
  • Print
  • email
  • Technorati
  • del.icio.us
  • MisterWong
  • Linkarena
  • Alltagz
  • Blogosphere News
  • Google Bookmarks
  • YahooMyWeb
  • Y!GG
  • Bloglines
  • TwitThis
  • Webnews
  • Digg
  • Wikio DE
  • Oneview

28. Februar 2009 Geschrieben von webmaster | wordpress | 6 Kommentare | Trackback URI

6 Kommentare zu “Checkliste für wp-forecast / Checklist for wp-worecast”


6

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?

Gravatar of webmaster

5

I am having a problem getting wp-forecast to work on my WP site. This error shows up in Incoming Links: RSS Error: WP HTTP Error: 13: Permission denied

Can you help?

Thanks. . .

Gravatar of elgin freeman

4

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

Gravatar of webmaster

3

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

Gravatar of Rafael Gomez

2

[...] für die Datenübertragung Unter http://www.tuxlog.de/uncategorized/2009/checkliste-fur-wp-forecast-checklist-for-wp-worecast/ findet ihr eine Checkliste zum prüfen der Datenübertragung mit/ von accuweather in deutsch und in [...]

Gravatar of >Tuxlog

1

[...] Checkliste um bei Problemen die Möglichkeiten der Datenübertragung zu prüfen gibt es hier. A checklist to verify the datadownload in case of problems is placed [...]

Gravatar of >Tuxlog

Beitrag kommentieren

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