Weather plugin woes
Posted: Thu Jan 06, 2005 6:20 pm
I installed a fresh copy of serendipity on my PC to debug the problem I have with the weather plugin. Setup is apache2, php4, mysql on linux. Service_Weather is 1.3.1 from pear.php.net.
Basically, the plugin doesn't show anything on the front page, but messed up the configure plugin page.
After adding a generous amount of echos to the plugin code, I've pinpointed the offending line:
Using the version of the plugin mgroeninger pm'ed me has the same problem. In his version (I think it's from the CVS), it's like this:
I created /path/to/s9y/templates_c and made sure it's 777.
Since I'm not fluent in php, I can't really tell what has gone wrong here. The only thing I can think of is $metar. But it should have been instantiated because this is called before the offending line:
Basically, the plugin doesn't show anything on the front page, but messed up the configure plugin page.
After adding a generous amount of echos to the plugin code, I've pinpointed the offending line:
Code: Select all
$status = $metar->setCache('file', array('cache_dir' => '/tmp'));
Code: Select all
$status = $metar->setCache('file', array('cache_dir' => $serendipity['serendipityPath'].'/templates_c'));
Since I'm not fluent in php, I can't really tell what has gone wrong here. The only thing I can think of is $metar. But it should have been instantiated because this is called before the offending line:
Code: Select all
$metar->setUnitsFormat($unitString);