Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5013

Several errors in detection PHP pre-requisites

XMLWordPrintable

      Starting from PHP 5.3.0 syntax:
      $current = isset($gd_info['PNG Support']);
      will always return TRUE and in the result will incorrectly detects cases:
      ["PNG Support"]=> bool(false)
      ["JPEG Support"]=> bool(false)
      ["FreeType Support"]=> bool(false)
      i.e. zabbix frontend will show Yes instead of No.

      See attache patch.

      With NEW (my suggestion) syntax:
      $current = $gd_info['PNG Support'];
      those cases detected correctly.

      Added:
      new checks for:
      "JPEG Support" - required for reading background jpeg images for maps,
      "FreeType Support" - required for displaying non-ASCII UTF-8 text on the graph correctly and smoothly.

      For "JPEG Support" check there is a trick for PHP prior 5.3.0
      see http://www.php.net/manual/en/function.gd-info.php

      Fixed:
      Incorrect detection of 'PNG Support' in the PHP >= 5.3.0

      A mistake: "-enable-gettext" -> "-with-gettext".

      Fixed a error "constant(): Couldn't find constant LIBXML_DOTTED_VERSION [include/classes/class.frontendsetup.php:417]"
      if libxml support missing.

      The patch successfully tested with PHP 5.2.17, 5.3.0, 5.3,13, 5.4.0, 5.4.3
      The patch based on 2.0.0rc5 rev 27531

      As a proof that it's worth to add these checks I'm attaching couple of screenshots.

            martins-v Martins Valkovskis
            zalex_ua Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: