# PHP Weathermap v0.96a

#### Copyright © 2005-2009 Howard Jones, `howie@thingy.com`. (Website)

### Error Code Reference

This page is mainly here so that Google can find it, but here's a complete list of all the error codes that Weathermap can produce, and what each one means.

I added this after I noticed a lot of google searches for error messages, that were not hitting a useful page in the manual. This page should be the useful page.

[WMWARN01]

  "Skipping drawing very short link (linkname). Impossible to draw! Try changing WIDTH or ARROWSTYLE? "

  Weathermap draws the arrowheads on links in proportion to the width of the link. If your link is fat, then the arrowhead will be bigger. If you have a very short link (nodes close together), you can get a situation where there is not enough room to draw the arrowheads.

  If you reduce the width of the link, using WIDTH then you might be able to make the arrowheads small enough so that they fit. You can also use ARROWSTYLE to choose a smaller style of arrowhead - ARROWSTYLE 1 1 is the smallest.

  The most common cause of this error is that you have accidentally placed two nodes on top of each other. In that case, move one of the nodes.

  In previous versions (0.8 to 0.82), this would result in the infamous "FELL THROUGH Howie's crappy binary search is wrong after all" error message. The solution is the same - move the nodes, or change the link width

[WMWARN02], [WMWARN04]

  "Angled text doesn't work with non-FreeType fonts "

  The standard fonts used by Weathermap are the ones bundled with the GD graphics library. These fonts (number 1-5 when you select fonts) can only be drawn 'flat', and not at an angle.

  If you are using link comments, or the 'angled' BWSTYLE, then Weathermap needs to be able to drawn text at any angle. To do this, it needs a Truetype font to be used for that part of the map (the bwlabel, or comment), which is drawn using the FreeType library.

  To do this, you need to find a Truetype font, put it in your weathermap folder, and then define a new font in your map config file: `FONTDEFINE 100 Vera 9`

  Then you can use that new font (no. 100) in COMMENTFONT or BWFONT lines.

  You can find some TrueType fonts, and an example.conf that does this in the docs/example folder.

  The reason the default comment font is not a TrueType font is that the FreeType library is an optional part of the GD library, so I can't assume that it will be available.

[WMWARN03]

  "Using a non-existent special font (fontnumber) - falling back to internal GD fonts "

  If you use a font number that doesn't exist by default(e.g. larger than 5), and you haven't got a valid FONTDEFINE line, then you will get this error. Weathermap will use font 5 instead of the font you asked for.

  Most common reason for this error is that the font file could not be found, or could not be loaded. Check the log for another error (WMWARN30 or WMWARN31).

[WMWARN05]

  "ProcessString: key refers to unknown item "

  You used a 'Special Token' string, like {node:this:something}, but the 'something' you used isn't defined for the node or link you specified. This is usually a typographical error.

[WMWARN06]

  "Couldn't open plugin-type Plugin directory (dir). Things will probably go wrong. "

  Parts of Weathermap are loaded from plugins. If these plugin directories don't exist, or are not readable due to file permissions, then the plugins can't be loaded. All data-reading is done by plugins, so without the data-source plugin directory, Weathermap won't do very much.

  Check that lib/datasources, lib/pre and lib/post folders all exist inside your Weathermap folder. Check that they (and their contents) are readable by the user that Weathermap runs as (e.g. your Cacti poller user). On a Unix system, the directories should also be executable by that user, so that the contents of the directory can be seen.

[WMWARN07]

  "ReadData: type name, target: targetstring on config line linenumber was recognised as a valid TARGET by a plugin that is unable to run (pluginname) "

  When the datasource plugins are loaded, each one is given a chance to check if everything it needs is available. If something is missing, that plugin can decline to load. If you have a TARGET line that is aimed at a particular plugin, and that plugin declined to load, you will get this message.

  Examples of this type of problem would be: Using cactihost: TARGETs but with the command-line tool where cactihost: can't load, or using the rrdtool DS from the command-line, without correctly setting a path to rrdtool in the `weathermap` command-line tool.

[WMWARN08]

  "ReadData: type name, target: targetstring[4] on config line linenumber was not recognised as a valid TARGET "

  You have specified a TARGET that none of the datasource plugins recognised. This is usually a typographical error.

[WMWARN09]

  "ColourFromPercent: Attempted to use non-existent scale: scalename for itemname "

  You have added a USESCALE line to a NODE or LINK, but the scale name wasn't defined using SCALE lines first. Define the SCALE, or check your spelling.

[WMWARN10]

  "NODE nodename has a relative position to an unknown node! "

  You have used the relative POSITION for a NODE, but you did it relative to a node that doesn't exist. Probably you have a typographical error/spelling error...

[WMWARN11]

  "There are Circular dependencies in relative POSITION lines for number nodes. "

  You are using relative POSITION for nodes, but somewhere you have a node that is relative to another node that is relative to the first one again - a loop. None of the nodes in the loop can be positioned correctly. Solution: make at least one node in the loop have a normal absolute position.

[WMWARN12]

  "Failed to write map image. No function existed for the image format you requested. "

  You specified a particular format to write the map image with IMAGEFILE, but your php/GD installation doesn't have support for that image format.

  You'll need to either choose a different image format, or recompile/reinstall your php, php-gd and GD libraries to support that image format.

[WMWARN13],[WMWARN15],[WMWARN16]

  "Failed to overwrite existing image file filename - permissions of existing file are wrong? "

  Most likely when using the Cacti plugin. The files in the output/ directory are owned by a different user from the one running weathermap, and so it can't overwrite those files.

  The most common way to get into this situation is by using the "Recalculate Now" button in the Cacti plugin. This creates files that are owned by the user that your webserver runs as. When the poller process comes along a few minutes later, it can no longer write over those files with the new data. Solution: make sure that the directory, and it's contents are owned by the poller user (or 'cactiuser') and don't use the 'Recalculate Now' button any more.

[WMWARN14]

  "Failed to create image file filename - permissions of output directory are wrong? "

  Again, usually in Cacti plugin.

  Weathermap is unable to create files in the directory that the output file should go - this is the plugins/weathermap/output/ directory if you are using the Cacti plugin. Make sure that directory is owned/writable by the user that runs your poller process. This is the same permissions that you would have set on the rra/ directory when installing Cacti itself.

[WMWARN17]

  "Skipping thumbnail creation, since we don't have the necessary function. "

  Your php/php-gd/GD library doesn't include the imagecopyresampled() function, which is required to make the thumbnail images used in the Cacti plugin. To get that function , you'll need to update/recompile/reinstall your php, php-gd and GD libraries.

[WMWARN20]

  "No image (gd) extension is loaded. This is required by weathermap. "

  All the graphics work in Weathermap is done using the gd PHP extension. Your php installation doesn't have this extension, or it is not enabled.

  You'll need to install or enable that extension to use Weathermap.

[WMWARN21]

  "Your GD php module doesn't support PNG format. "

  You specified an ICON or BACKGROUND image in PNG format, and your php-gd extension doesn't support PNG format images.

  You'll need to either choose a different image format, or recompile/reinstall your php, php-gd and GD libraries to support that image format.

[WMWARN22]

  "Your GD php module doesn't support truecolor. "

  Weathermap requires that your GD library and php-gd extension support 24-bit colour (or "TrueColor"). To get that function , you'll need to update/recompile/reinstall your php, php-gd and GD libraries. Most likely, this is the result of an older version of GD.

[WMWARN23]

  "Your GD php module doesn't support thumbnail creation (imagecopyresampled). "

  See WMWARN17

[WMWARN24]

  "Duplicate node name nodename at line linenumber - only the last one defined is used. "

  You have used the same name for two or more NODE lines in your config. This is probably a typo or cut & paste error. One of the two NODEs will not show up in the map.

[WMWARN25]

  "Duplicate link name linkname at line linenumber - only the last one defined is used. "

  You have used the same name for two or more LINK lines in your config. This is probably a typo or cut & paste error. One of the two LINKs will not show up in the map.

[WMWARN26]

  "LINK DEFAULT is not the first LINK. Defaults will not apply to earlier LINKs. "

  You should usually specify your DEFAULT LINK before all your 'real' LINKs. The reason is that when a new LINK is defined, it copies whatever the default settings are at that point in reading down the config file, so you will end up with inconsistent results.

[WMWARN27]

  "NODE DEFAULT is not the first NODE. Defaults will not apply to earlier NODEs. "

  You should usually specify your DEFAULT NODE before all your 'real' NODEs. The reason is that when a new NODE is defined, it copies whatever the default settings are at that point in reading down the config file, so you will end up with inconsistent results.

[WMWARN28]

  "Dropping LINK linkname - it hasn't got 2 NODES! "

  You defined a link where one or both of the nodes in the NODES line don't exist.

  Or you forgot to add a NODES line altogether.

  A link goes between two nodes, so you need to tell weathermap which two nodes, and they need to exist.

[WMWARN30]

  "Failed to load ttf font filename - at config line linenumber"

  You defined a TrueType/FreeType font with FONTDEFINE, but the file doesn't exist, or can't be loaded due to permissions issues.

[WMWARN31]

  "imagettfbbox() is not a defined function. You don't seem to have FreeType compiled into your gd module. "

  You tried to use a TrueType/FreeType font, but your GD library (and/or php-gd extension) don't understand FreeType.

  You'll need to either choose a different font format, or recompile/reinstall your php, php-gd, GD and perhaps freetype2 libraries to support that font format.

[WMWARN32]

  "Failed to load GD font: filename (errorcode) at config line linenumber "

  You defined a .gdf font with FONTDEFINE, but the file doesn't exist, or can't be loaded due to permissions issues.

[WMWARN99]

  "something not implemented yet"

  A planned feature has been partially implemented, and you've tried to use it. Wait for the next release.

  Because of the way I write Weathermap, there are sometimes parts of the code that are waiting ready for me to finish writing a new feature. If it's the only thing holding back a release, I'll just disable that feature for now.

[WMIMG01]

  "Image file filename is GIF, but GIF is not supported by your GD library. "

[WMIMG02]

  "Image file filename is JPEG, but JPEG is not supported by your GD library. "

[WMIMG03]

  "Image file filename is PNG, but PNG is not supported by your GD library. "

[WMIMG04]

  "Image file filename wasn't recognised (type=type). Check format is supported by your GD library. "

[WMIMG05]

  "Image file filename is unreadable. Check permissions. "

[WMRRD01]

  "RRD DS: RRDTool exists but is not executable? "

  Somehow you have the right path for rrdtool, but the rrdtool binary is not executable by the user that runs weathermap (e.g. your Cacti poller user). Check permissions on your rrdtool binary.

[WMRRD02]

  "RRD DS: Can't find RRDTOOL. Check line 29 of the 'weathermap' script. RRD-based TARGETs will fail. "

  You are using the command-line `weathermap` tool, but the path near the top of that file (around line 29) is not the correct path to your rrdtool binary. Edit that file and put in the correct path if you need Weathermap to be able to read .rrd files.

[WMRRD03]

  "RRD DS: Can't find RRDTOOL. Check your Cacti config. "

  You have Weathermap integrated into Cacti, but your Cacti settings include an incorrect path to rrdtool. Probably you have a Cacti that doesn't update properly at this stage too, so change the path in Console..Settings..Paths (in Cacti) to point to the right location.

[WMRRD04]

  "RRD ReadData: failed to open pipe to RRDTool: phperrormsg "

  This is probably a Weathermap bug. It was unable to get rrdtool to read a .rrd file even though the file exists. It might be that the user running Weathermap (or the poller) doesn't have execute permission for rrdtool.

[WMRRD06]

  "Target rrdfile doesn't exist. Is it a file? "

  You have given an RRD TARGET which is a directory instead of a file, or something else unusual like that...