September 2016 – Current issues

tire-fire-1200

Just a quick note about known current issues with Weathermap 0.98:

  1. It doesn’t work with PHP 7.0 – In PHP 7.0, the ancient mysql_xxxxx() functions that WM uses for database access are no longer available. The rest of the world moved on to PDO some time ago, but I didn’t bother because Cacti didn’t. PHP 7.0 is the default in some distros now (Ubuntu 16 at least) though, which makes it a bigger problem. I’m in the process (about 70% through) of fixing this by replacing all the database access code. This has some other benefits for the future, like the possibility of supporting other databases, and better database security (I’m moving to prepared statements everywhere too). I’m also separating out the actual database stuff from the Cacti plugin, so writing a plugin for something else should be easier too. The editor and command-line tool don’t use a database currently, so those are not affected.
  2. (some of) It doesn’t work with PHP 5.3 – Well, this is embarrassing! In fixing a deprecated code issue for PHP 5.6+, I added a problem for PHP 5.3. Luckily it’s a one-line fix, and only affects the command-line ‘weathermap’ tool. If you get PHP Parse errors with 0.98 and PHP 5.3, here is the solution until 0.98a comes out.

Photo Credit: Wisconsin Department of Natural Resources

One thought on “September 2016 – Current issues

  • Hi,

    I have an interesting issue when trying to open the editor. It was working just fine and to my knowledge nothing has changed.

    Warning: require_once(lib/editor.inc.php): failed to open stream: Permission denied in /var/www/html/weathermap/editor.php on line 3 Fatal error: require_once(): Failed opening required ‘lib/editor.inc.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/weathermap/editor.php on line 3

    my editor.php looks like this

    <?php

    require_once 'lib/editor.inc.php';
    require_once 'lib/Weathermap.class.php';
    require_once 'lib/geometry.php';
    require_once 'lib/WMPoint.class.php';
    require_once 'lib/WMVector.class.php';
    require_once 'lib/WMLine.class.php';

    I have not worked in php and am not sure if I can include the include right under the require once on line 3 or if I have to add on the same line.

Leave a Reply

Your email address will not be published. Required fields are marked *