Ad Widget

Collapse

zabbix-web install script can't connect to Postgresql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bsdaemon_ru
    Junior Member
    • Dec 2014
    • 3

    #1

    zabbix-web install script can't connect to Postgresql

    .errorzabbix-web install script can't connect to Postgresql, but script:

    <?php
    error_reporting(E_ALL);
    echo "test db connection";
    $db_c = pg_connect("host=xx.ee.zz.13 dbname=zabbix user=zabbix password=mypass") or die ('Not connected: '. pg_last_error());
    if ($db_c) {
    $query = "SELECT * FROM users_groups";
    $result = pg_exec($db_c, $query);
    if ($result) {
    for ($row = 0; $row < pg_numrows($result); $row++) {
    $fn = pg_result($result, $row, 'id');
    echo $fn . "<br> ";
    }
    } else {
    echo "Query faild :". pg_errormessage($db_c);
    }
    } else {
    echo 'Connection failed: '. pg_last_error();
    }
    pg_close($db_c);
    ?>

    connected to DB and returned valid results. Question: what is happening and where to look

    Zabbix 6.0.2/RHEL 8.5/Postgresql 14
    Last edited by bsdaemon_ru; 05-04-2022, 14:43.
  • bsdaemon_ru
    Junior Member
    • Dec 2014
    • 3

    #2
    i find truble. Using Chrome, not FF(((

    Comment

    Working...