Ad Widget

Collapse

PHP Timezone pre-requisite Fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abdyman
    Junior Member
    • Apr 2013
    • 8

    #1

    PHP Timezone pre-requisite Fails

    Hello, trying to install ver 2.0.5_2
    but i keep running into a problem with date.timezone were it keeps saying unknown and wont continue.
    I have edited etc/php5/apache2/php.ini and etc/php5/cli/php.ini with
    ;date.timezone = America/New_York
    restarted the server and still getting the same issue.

    thanks for your time
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    You have the line commented. Remove ; from the beginning of the line and restart Apache.

    Should be this:
    date.timezone = America/New_York

    Not this:
    ;date.timezone = America/New_York

    Comment

    • Abdyman
      Junior Member
      • Apr 2013
      • 8

      #3
      thank you, that did fix it.
      running into a new issue now, i cant make any configurations on the server i keep getting errors.

      when trying to add a host:

      Error in query [SELECT h.hostid,h.host,h.name FROM hosts h WHERE h.status IN (0,1) AND (h.host='local host' OR h.name='local host') AND h.hostid BETWEEN 000000000000000 AND 099999999999999] [Unknown column 'h.name' in 'field list']
      mysql_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:572]
      mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573]
      Error in query [SELECT h.hostid,h.host,h.name FROM hosts h WHERE h.status=3 AND h.hostid BETWEEN 000000000000000 AND 099999999999999 AND (h.host='local host' OR h.name='local host')] [Unknown column 'h.name' in 'field list']
      mysql_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:572]
      mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573]
      Error in query [INSERT INTO hosts (host,name,status,proxy_hostid,ipmi_authtype,ipmi_ privilege,ipmi_username,ipmi_password,hostid) VALUES ('local host','local host','0',NULL,'-1','2','','','10047')] [Unknown column 'name' in 'field list']
      SQL statement execution has failed "INSERT INTO hosts (host,name,status,proxy_hostid,ipmi_authtype,ipmi_ privilege,ipmi_username,ipmi_password,hostid) VALUES ('local host','local host','0',NULL,'-1','2','','','10047')".

      when trying to add a discovery rule:

      Error in query [INSERT INTO drules (name,proxy_hostid,iprange,delay,status,druleid) VALUES ('Test',NULL,'192.168.0.1-255','3600','0','1')] [Column 'proxy_hostid' cannot be null]
      SQL statement execution has failed "INSERT INTO drules (name,proxy_hostid,iprange,delay,status,druleid) VALUES ('Test',NULL,'192.168.0.1-255','3600','0','1')".

      i saw something in the forums in regards to an "ids table" out of sync but no information about how to fix it.

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        I don't think ids table is your problem.

        Looks like you either have an issue with the resources on your Zabbix DB server, or within MySql.

        Tell us more about your Zabbix setup:
        Is the App and DB server on the same physical server?
        How much total memory do you have for your DB server?
        How much free memory is on your DB server?

        Are there any errors being reported in your error log for MySql?

        Comment

        • Abdyman
          Junior Member
          • Apr 2013
          • 8

          #5
          The APP and DB are on the same server, but it is a virtual Server.
          Has 2gigs of Ram and normally does not use more then 1gig.
          Also my logs are empty so far.
          Including my.cnf file configuration

          [spoiler]
          #
          # The MySQL database server configuration file.
          #
          # You can copy this to one of:
          # - "/etc/mysql/my.cnf" to set global options,
          # - "~/.my.cnf" to set user-specific options.
          #
          # One can use all long options that the program supports.
          # Run program with --help to get a list of available options and with
          # --print-defaults to see which it would actually understand and use.
          #
          # For explanations see
          # http://dev.mysql.com/doc/mysql/en/se...variables.html

          # This will be passed to all mysql clients
          # It has been reported that passwords should be enclosed with ticks/quotes
          # escpecially if they contain "#" chars...
          # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
          [client]
          port = 3306
          socket = /var/run/mysqld/mysqld.sock

          # Here is entries for some specific programs
          # The following values assume you have at least 32M ram

          # This was formally known as [safe_mysqld]. Both versions are currently parsed.
          [mysqld_safe]
          socket = /var/run/mysqld/mysqld.sock
          nice = 0

          [mysqld]
          #
          # * Basic Settings
          #
          user = mysql
          pid-file = /var/run/mysqld/mysqld.pid
          socket = /var/run/mysqld/mysqld.sock
          port = 3306
          basedir = /usr
          datadir = /var/lib/mysql
          tmpdir = /tmp
          lc-messages-dir = /usr/share/mysql
          skip-external-locking
          #
          # Instead of skip-networking the default is now to listen only on
          # localhost which is more compatible and is not less secure.
          bind-address = 127.0.0.1
          #
          # * Fine Tuning
          #
          key_buffer = 16M
          max_allowed_packet = 16M
          thread_stack = 192K
          thread_cache_size = 8
          # This replaces the startup script and checks MyISAM tables if needed
          # the first time they are touched
          myisam-recover = BACKUP
          #max_connections = 100
          #table_cache = 64
          #thread_concurrency = 10
          #
          # * Query Cache Configuration
          #
          query_cache_limit = 1M
          query_cache_size = 16M
          #
          # * Logging and Replication
          #
          # Both location gets rotated by the cronjob.
          # Be aware that this log type is a performance killer.
          # As of 5.1 you can enable the log at runtime!
          #general_log_file = /var/log/mysql/mysql.log
          #general_log = 1
          #
          # Error log - should be very few entries.
          #
          log_error = /var/log/mysql/error.log
          #
          # Here you can see queries with especially long duration
          #log_slow_queries = /var/log/mysql/mysql-slow.log
          #long_query_time = 2
          #log-queries-not-using-indexes
          #
          # The following can be used as easy to replay backup logs or for replication.
          # note: if you are setting up a replication slave, see README.Debian about
          # other settings you may need to change.
          #server-id = 1
          #log_bin = /var/log/mysql/mysql-bin.log
          expire_logs_days = 10
          max_binlog_size = 100M
          #binlog_do_db = include_database_name
          #binlog_ignore_db = include_database_name
          #
          # * InnoDB
          #
          # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
          # Read the manual for more InnoDB related options. There are many!
          #
          # * Security Features
          #
          # Read the manual, too, if you want chroot!
          # chroot = /var/lib/mysql/
          #
          # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
          #
          # ssl-ca=/etc/mysql/cacert.pem
          # ssl-cert=/etc/mysql/server-cert.pem
          # ssl-key=/etc/mysql/server-key.pem



          [mysqldump]
          quick
          quote-names
          max_allowed_packet = 16M

          [mysql]
          #no-auto-rehash # faster start of mysql but no tab completition

          [isamchk]
          key_buffer = 16M

          #
          # * IMPORTANT: Additional settings that can override those from this file!
          # The files must end with '.cnf', otherwise they'll be ignored.
          #
          !includedir /etc/mysql/conf.d/
          [/spoiler]

          Comment

          • tchjts1
            Senior Member
            • May 2008
            • 1605

            #6
            2GB of RAM on a VM running the APP and DB is LOW and will more than likely contribute to further issues. You will have a very difficult time doing anything with that setup.

            As a reference, I am also running on VM's. However, my APP server has 8GB of memory and 4 vCPU's. MY DB runs on a separate VM and has 16GB of memory and 4 vCPU's.

            And this is my.cnf file that I use. Understand that this is specifically tailored for the amount of memory I have in my VM and specific to my pathing for my data storage.

            You would also do well to use innodb as your engine. You can see those statements below.

            Code:
            [mysqld]
            datadir=/data/mysql
            socket=/var/lib/mysql/mysql.sock
            user=mysql
            
            # logs
            slow_query_log=1
            slow_query_log_file=/var/log/mysql_slow.log
            long_query_time=20
            symbolic-links=0
            
            ## Added by Jeff 10/10/12
            port = 3306
            skip-external-locking
            max_allowed_packet = 1M
            table_open_cache = 512
            read_buffer_size = 2M
            read_rnd_buffer_size = 8M
            myisam_sort_buffer_size = 64M
            #thread_concurrency = 8
            
            # Zabbix parameters
            innodb_file_per_table
            max_allowed_packet = 16M
            innodb_data_home_dir = /data/mysql
            innodb_data_file_path = ibdata1:10M:autoextend
            innodb_log_group_home_dir = /data/mysql
            innodb_buffer_pool_size = 8G
            innodb_additional_mem_pool_size = 32M
            innodb_lock_wait_timeout = 120
            innodb_log_file_size = 120M
            innodb_thread_concurrency = 8
            key_buffer_size = 512M
            max_connections=512
            table_cache=4096
            query_cache_size = 128M
            tmp_table_size = 8M
            thread_cache_size = 64
            sort_buffer_size = 16M
            
            
            [mysqld_safe]
            log-error=/var/log/mysqld.log
            pid-file=/var/run/mysqld/mysqld.pid

            Comment

            • Abdyman
              Junior Member
              • Apr 2013
              • 8

              #7
              Thanks for all the info.
              I can give the machine more resources since it is virtual and the server has more capacity.
              Should i make a new thread or continue here if i have any more questions?

              Comment

              • tchjts1
                Senior Member
                • May 2008
                • 1605

                #8
                Originally posted by Abdyman
                Should i make a new thread or continue here if i have any more questions?
                If it is related, just keep this thread going. Someone else may need the same answers in the future. One-stop shopping is always a good thing.

                Comment

                Working...