Ad Widget

Collapse

Problems with zabbix.conf.php during installation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BG-Monitor
    Junior Member
    • Aug 2009
    • 8

    #1

    Problems with zabbix.conf.php during installation

    I know this is an age old problem, but I've honestly read up on this loads, and just cannot get past step 7 of the install wizard.

    I keep getting the usual:

    -----------------

    Configuration file: Fail



    Please install configuration file manualy.

    By pressing "Save configuration file" button download configuration file and place them into the
    "/var/www/html/zabbix/php/conf/zabbix.conf.php"

    ------------------

    Installation is version 1.6.5 on CentOS 5.3 (x86_64) - what's fustrating is that 2 years ago I installed Zabbix 1.4.x on a Fedora system with no probs at all !

    I've followed the official installation guide. I've also followed the 'Bobcares Blog' guide at http://bobcares.com/blog/?p=303#install

    I've redone everything about 5 times now (deleting all directories and DB each time) but I always get stuck at the point during the wizard.

    I've even set my entire /var/www/html/zabbix directory to chmod 777 (recursively). I've checked the contents of the zabbix.conf.php file at the point step 7 of the install wizard fails, and the file is totally correct, and identical to the examples given in the install guides (apart from the MySQL username/passwds obviously).

    The error reported at the top of the install wizard page are:

    -----------------

    * Undefined variable: c[/var/www/html/zabbix/php/conf/zabbix.conf.php:28]
    * Undefined variable: c[/var/www/html/zabbix/php/conf/zabbix.conf.php:28]
    * Incorrect configuration file[/var/www/html/zabbix/php/conf/zabbix.conf.php]
    * mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: Access denied for user 'ben'@'localhost' (using password: YES)[/var/www/html/zabbix/php/include/db.inc.php:56]

    ----------------

    So sorry to raise this question again, but I'm at my tether now.

    Thanks, Ben.
  • MrKen
    Senior Member
    • Oct 2008
    • 652

    #2
    The errors suggest that the $DB["PASSWORD"] variable in zabbix.conf.php is incorrect.

    Is the password the same as the password that you have defined in your zabbix_server.conf ?

    MrKen
    Disclaimer: All of the above is pure speculation.

    Comment

    • BG-Monitor
      Junior Member
      • Aug 2009
      • 8

      #3
      Hi MrKen.

      They are identical.

      The last few lines of /etc/zabbix/zabbix_server.conf are :

      ---------------
      # Database name
      # SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
      DBName=zabbix

      # Database user

      DBUser=ben

      # Database password
      # Comment this line if no password used

      DBPassword=password

      # Connect to MySQL using Unix socket?

      DBSocket=/var/lib/mysql/mysql.sock
      ---------------

      and the uncommented part of /var/www/html/zabbix/conf/zabbix.conf.php is :

      ---------------

      global $DB;

      $DB["TYPE"] = "MYSQL";
      $DB["SERVER"] = "localhost";
      $DB["PORT"] = "0";
      $DB["DATABASE"] = "zabbix";
      $DB["USER"] = "ben";
      $DB["PASSWORD"] = "password";
      $ZBX_SERVER = "localhost";
      $ZBX_SERVER_PORT = "10051";


      $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
      ?>
      --------------

      Comment

      • BG-Monitor
        Junior Member
        • Aug 2009
        • 8

        #4
        OK, it seems to work now after I reset the password to something very simple within MySQL and the 2 conf files.

        The actual password I'd been using obviously wasn't 'password' as listed in my last reply, but something more complicated.

        But considering how many times I reset the MySQL privileges for the zabbix database, and double checked the conf files, I'm quite sure I wasn't typing it in incorrectly.

        Instead, I'm suspecting that certain non-alphanumeric characters within my password were not liked somewhere !

        So I've now got a simple alphabetical password, which I shouldn't be admitting in public of course ! but it works anyway.

        I'd be interested to know if anyone else has had issues when using 'tricky' password strings.

        Cheers.

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #5
          well, i wouldn't ask for the passwor dyou used , but i'd suggest trying to add non-alphanum characters you used to your simple password and see which character breaks it. then try enclosing password in doublequotes in the corresponding configfile and see whether that helps. maybe it's worth trying single quotes as well.
          Zabbix 3.0 Network Monitoring book

          Comment

          • BG-Monitor
            Junior Member
            • Aug 2009
            • 8

            #6
            Thanks Rich,

            I'm always keen to feedback useful info to developers, so if there's time (I sort of need it up and running now) I'll be happy to try that out.

            And unfortunately I'm onto the next problem - getting the server running. The web GUI always states that the zabbix server isn't running, despite me having started it, with the zabbix_server process showing up in a ps -aux....

            oh well, I'll keep on trying !

            ---------------------------------------------------

            Got the latter fixed by disabling SELinux. I don't recall enabling this when I installed CentOS, as it always causes problems. Oh well, now the Zabbix Server Running parameter has a nice green 'Yes' value.
            Last edited by BG-Monitor; 09-10-2009, 15:12. Reason: Don't want to 'bump' this topic

            Comment

            • shinydhas
              Junior Member
              • Oct 2019
              • 1

              #7
              Hi all, I am facing an issue on Zabbix 3.4 on CentOS 7.7
              I am unable to find /etc/zabbix/web/zabbix_server.conf.php file which is usually generated during the zabbix frontend installation. Zabbix server is also not running as shown in the frontend. Can somebody please help.

              Comment

              • Atsushi
                Senior Member
                • Aug 2013
                • 2028

                #8
                Hi shinydhas,
                The file /etc/zabbix/web/zabbix_server.conf.php does not exist. The file /etc/zabbix/web/zabbix.conf.php should exist if you installed using the official Zabbix package.

                Comment

                • loqman89
                  Junior Member
                  • Jul 2021
                  • 1

                  #9
                  for me it fix when i manually edit zabbix_server.conf.php put close for php code because original config only open php code without close it, reboot and my zabbix running successful.

                  Comment

                  Working...