Ad Widget

Collapse

Receiving PHP error after install of Zabbix Frontend

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ran22man
    Junior Member
    • Apr 2009
    • 7

    #1

    Receiving PHP error after install of Zabbix Frontend

    Hi,

    I have been using Zabbix now for 3 years or so, and have never run into this particular error during install. After going through installation, and after receiving the checks (Current Value/required/recommended) with installation of zabbix.conf.php, this error has come up twice in new installs:
    "mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:570]"
    Looking further, it doesn't look like it's just a matter of changing a couple of lines in db.inc.php in the include directory (copied over from /frontends/php). Since these files are copied over, I made some changes, to no avail. I know enough about PHP to be dangerous, but not much else. Has someone seen this before and help me out? I've included a screenshot of the error.
    Attached Files
  • usbport
    Junior Member
    • Aug 2012
    • 4

    #2
    Fixed.

    Check that you zabbix DB exist. Check that tables in DB exist.
    See here: http://www.zabbix.com/documentation/...all/db_scripts

    Don't forget about zabbix_server.conf and if troubles continue check log file.

    Good luck.
    Last edited by usbport; 24-08-2012, 12:05.

    Comment

    • NOOK
      Junior Member
      • Aug 2012
      • 18

      #3
      Thanks!
      For newbies like me: first u need to import schema.sql, than images, than data.

      Comment

      • ran22man
        Junior Member
        • Apr 2009
        • 7

        #4
        Re: Receiving PHP error after install of Zabbix Frontend

        Yes, it now works...just to make sure, I deleted the original database and redid the copying of the *.sql files in the correct order. Thanks!

        Comment

        • garcaman
          Junior Member
          Zabbix Certified Specialist
          • Oct 2012
          • 5

          #5
          the same error like that

          Hello

          I've installed the zabbix according the user guide and manual, but after install everything I've seen the same error like you ("mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:570]") so I dont know what I've to do in order to fix this error, could you please help me on that?

          I have no experience in zabbix before so I don't know where I can start for fixing that.

          thanks in advance.

          Leandro pacheco

          Comment

          • ran22man
            Junior Member
            • Apr 2009
            • 7

            #6
            Re: the same error like that

            As in an earlier post, you need to import schema.sql, than images, than data in that order during install. After you create the database and character set, you have to get the .sql files in the zabbix-2.0.x directory.

            shell> mysql u<username> -p<password> zabbix < database/mysql/schema.sql
            shell> mysql u<username> -p<password> zabbix < database/mysql/images.sql
            shell> mysql u<username> -p<password> zabbix < database/mysql/data.sql

            Do this before the ./configure and make install commands. Without sending the entire instruction set, that will help with your error, which is essentially an install problem.

            Comment

            • garcaman
              Junior Member
              Zabbix Certified Specialist
              • Oct 2012
              • 5

              #7
              ok after do that it works fine. thanks for help me

              Comment

              • anjiytwok
                Member
                • Dec 2012
                • 44

                #8
                Where we can see log and do we need to changes the zabbix_server.conf after creating

                1. As you said Where i can see the log file?
                2. After creating the Database, dbuser and dbpassowrd, do we need change in zabbix_server.conf as well.

                could u pls respond quickly



                Originally posted by usbport
                Fixed.

                Check that you zabbix DB exist. Check that tables in DB exist.
                See here: http://www.zabbix.com/documentation/...all/db_scripts

                Don't forget about zabbix_server.conf and if troubles continue check log file.

                Good luck.

                Comment

                • tchjts1
                  Senior Member
                  • May 2008
                  • 1605

                  #9
                  Originally posted by anjiytwok
                  1. As you said Where i can see the log file?
                  2. After creating the Database, dbuser and dbpassowrd, do we need change in zabbix_server.conf as well.

                  could u pls respond quickly
                  1. zabbix_server.log - This will be wherever you have it defined within your zabbix_server.conf file. I think that by default it goes to /tmp/zabbix_server.log

                  2. If you set up your zabbix_server.conf file correctly, you do not need to make any changes to it after creating the DB. There are only a few parameters in the zabbix_server.conf that have anything to do with the DB.

                  Comment

                  • anjiytwok
                    Member
                    • Dec 2012
                    • 44

                    #10
                    Same problem I was facing: mysql_free_result() expects parameter 1 to be resource, b

                    mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573]


                    After successful installation, I was opened the http://localhost/zabbix3/

                    unable to login to login page got this error message:


                    mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573]


                    could you please help me. I have tried for couple of time.. same issue. I do not know where i am missing... exected the sql scripts in same order.

                    Got one doubt: is there any changes do i need to do in zabbix_server.conf , zabbix_agent.conf ??

                    Could advise.

                    Comment

                    • marwansiala
                      Junior Member
                      • Jun 2013
                      • 19

                      #11
                      Originally posted by anjiytwok
                      mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573]


                      Could advise.
                      i am facing the same problem , please help

                      Comment

                      • NOOK
                        Junior Member
                        • Aug 2012
                        • 18

                        #12
                        marwansiala
                        Originally posted by NOOK
                        Thanks!
                        For newbies like me: first u need to import schema.sql, than images, than data.

                        Comment

                        • marwansiala
                          Junior Member
                          • Jun 2013
                          • 19

                          #13
                          Originally posted by NOOK
                          marwansiala


                          how can i do that

                          Comment

                          • marwansiala
                            Junior Member
                            • Jun 2013
                            • 19

                            #14
                            i followed these steps:

                            ---------------------------------------
                            Database

                            Start MySQL Database Server and secure

                            # service mysqld start
                            # mysql_secure_installation
                            # mysql -u root -p

                            In the MySQL console:

                            mysql> create database zabbix character set utf8;
                            mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'password';
                            mysql> flush privileges;

                            Back in the shell we load the Zabbix SQL in the database we just created:

                            # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.2/create/schema.sql
                            # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.2/create/images.sql
                            # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.2/create/data.sql
                            -----------------------------------------------------------------

                            but when executing the last 3 commands i get this error message:

                            bash: /usr/share/doc/zabbix-server-mysql-2.0.2/create/schema.sql: No such file or directory

                            Comment

                            Working...