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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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:
















