Pandora FMS Community

PHP Strict/Warnings and some features request

xcme · 6 mar 2014, 10:45 · 11 mensajes · 56 visitas

  1. Inicio del debate

    Hi! (Sorry for my English in advance - it's not my native language.) I use Pandora 5.0SP3 and found it useful. But it contains some minor imprecisions in Pandora Console source code. My system is: FreeBSD 10.0 + Apache2.4 + PHP5.5. 1. On installing new Pandora Console if i select 'An existing Database' i got error 'There were some problems' withous any explanations. I checked Mysql user right and Pandora system log and not found any additional informationю :( But, if i select 'A new Database' everything is OK. 2. I found many PHP Warning in pandora system log file like this: "PHP Warning:  Creating default object from empty value in /usr/local/www/apache24/data/pandora.powernet/include/functions_html.php on line 166" or "PHP Strict Standards:  Only variables should be passed by reference in /usr/local/www/apache24/data/pandora.powernet/include/functions_users.php on line 112" etc... By all appearances, source code need some minor changes, like this (for example):

    $_var=unpack('V', $this->STREAM->read(4));
    return array_shift($_var);
    

    instead

    return array_shift(unpack('V', $this->STREAM->read(4)));
    

    (/include/gettext.php) and:

    $table = new stdClass();
    $table->id = "header_table";
    

    instead

    $table->id = "header_table";
    

    (/general/header.php) and more... 3. By default, apache started from user 'www', which have not access to some system utilities (like twopi, e.g.), because system variable $PATH (for user 'www') does not include paths like /usr/local/bin and /usr/local/sbin. To solve this issue we can make many symlinks in /usr/bin/ :) or try to add necessary paths for Apache user www. In my case i use next workaround: Create file '/usr/local/etc/apache24/envvars.d/path.env' with string 'export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin' and restart Apache. After that topology and group maps works correctly. Please, fix #1 and #2, if it is possible :) and add #3 to wiki in 'Installation in FreeBSD' section if you found this useful. Next, i want to place here some minor feature request.

  2. #1. GIS Labels: If we have many agents on GIS Map their labels may overlapped on small zoom. I user next workaround for this: String 'if (map.zoom < 17) pointName='';' in include/javascript/openlayers.pandora.js (line 536) and auto refresh map in 5 seconds. When I change zoom to 18 or above and wait 5 sec, agent's label are shown. But, when zoom 17 or below, labels are hidden. It's possible to make it as an option in setup menu? #2. GIS Map and agent status. It's possible to make new status - 'Warning and Critical'? Thank you in advance.

  3. Hello We're taking the source code improvements you've offered into a consideration. As soon as we have decided to implement the changes or not we will inform you. Thank you for your participation

  4. #3. Is there any chance to see other agents in same group when editing agent position on GIS map?

  5. Hello Agents on GIS map are the ones that include GIS data. Only way to see an agent on a GIS map is that it sends GIS data Regards Ivo

  6. Hello I mean, when i set GIS data manually, i can see only that agent on GIS map. If several agents placed close to each other, it's problem to gently place them. Please, see image #1 and #2. It's 'view' and 'edit' mode respectively. If we could see the other agents and in edit mode too, it would be useful.

    [

    ](//pandorafms.com/community/media/forum/0/16552=634-pnd_viewGIS.png)

    [

    ](//pandorafms.com/community/media/forum/0/16552=635-pnd_editGIS.png)

  7. Hello This can be a new feature request. I'll take notice. It'll be implemented in future versions of pandora. Regards Ivo

  8. In /include/functions_networkmap.php line 1087

    $head = "graph networkmap { bgcolor="transparent", labeljust=l; margin=0; ";
    

    Comma after '"transparent"' need to be replaced by semicolon. It's a typo.

  9. Hello Thank you for you're participation. Regards Ivo

  10. This can be a new feature request. I'll take notice. It'll be implemented in future versions of pandora.

    Thanks. What about features request #1 and #2, placed in second post? (GIS Labels and Warning+Critical status)

  11. Hello We still haven't implemented the changes in the sourcecode. As soon as we implement them I'll inform you. If you strongly need them you can contact the comercial department at [email protected] and get into some sort of an agreement. Regards Ivo

Entra en tu cuenta para publicar.