Closed Hipska closed 4 years ago
Interesting. Which version is this? (I guess 0.98a?)
Correct. Looking at the code, it’s completely normal behavior
I'll check into it. It certainly did work once!
OK, so it's since all the class php files went into lib/
Here's a one-line fix for it:
--- a/lib/Weathermap.class.php
+++ b/lib/Weathermap.class.php
@@ -708,14 +708,16 @@ function LoadPlugins( $type="data", $dir="lib/datasources" )
wm_debug("Beginning to load $type plugins from $dir\n");
if ( ! file_exists($dir)) {
- $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . $dir;
+ $dir = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $dir;
wm_debug("Relative path didn't exist. Trying $dir\n");
}
That's line 711 of Weathermap.class.php with the actual change.
Many thanks for the quick fix!
Running weathermap outside it's directory results in multiple errors:
$ /opt/weathermap/weathermap