Ad Widget

Collapse

error with host group select in copy items request. fronted, php, db.inc.php, oracle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mal
    Junior Member
    • Feb 2009
    • 4

    #1

    error with host group select in copy items request. fronted, php, db.inc.php, oracle

    hello to all,

    at first, i'm newbie at zabbix (only two weeks) and there is my first post with the first problem
    I've encountered with a problem when I want to copy Template items.

    System:
    Red Hat Enterprise Linux Server release 5.3
    PHP 5.2.6
    Oracle 10.2.04
    Zabbix 1.2.6


    Step by step:
    Tried to go Configuration -> Items

    then selected (for example) | Group: Tempalates | Host: Template_Standaloune |

    Next, selected Description (all)

    Next, pressed button "Copy selected to..."

    in opened new page tried to change 'Target type' drop down list from default "Host" to "Host groups" and i've got an error:

    * ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00933: SQL command not properly ended[/usr/local/apache2/htdocs/zabbix/include/db.inc.php:476]
    * SQL error [ORA-00933: SQL command not properly ended] in [SELECT DISTINCT g.groupid as target_id, g.name as target_name FROM groups g, hosts_groups hg WHERE hg.groupid=g.groupid ORDER BY g.name order by target_name]
    * ocierror() expects parameter 1 to be resource, boolean given[/usr/local/apache2/htdocs/zabbix/include/db.inc.php:403]
    * SQL error [] in []
    * ocifetchinto() expects parameter 1 to be resource, boolean given[/usr/local/apache2/htdocs/zabbix/include/db.inc.php:525]

    It seems that problem is somewhere in php scripts with formating Oracle requests.

    Has anyone faced with this problem?
    Any ideas ?
  • dotneft
    Senior Member
    • Nov 2008
    • 699

    #2
    error with two ORDER BY

    The request must be:
    SELECT DISTINCT g.groupid as target_id, g.name as target_name FROM groups g, hosts_groups hg WHERE hg.groupid=g.groupid ORDER BY g.name

    or

    SELECT DISTINCT g.groupid as target_id, g.name as target_name FROM groups g, hosts_groups hg WHERE hg.groupid=g.groupid ORDER BY by target_name
    Last edited by dotneft; 26-02-2009, 13:42.

    Comment

    • Aly
      ZABBIX developer
      • May 2007
      • 1126

      #3
      This is fixed in the latest code. You may download it from our Nightly builds page.
      Zabbix | ex GUI developer

      Comment

      • mal
        Junior Member
        • Feb 2009
        • 4

        #4
        thanks to all for support!

        Comment

        Working...