Ad Widget

Collapse

Zabbix 1.8 MBstring?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Zabbix 1.8 MBstring?

    I'm trying a new install of zabbix 1.8, and during the pre requesite check, I'm getting a failure of: PHP MB String support

    I was also getting a failure of PHP MB String overload until I changed php.ini to include: mbstring.func_overload = 2

    I'm on CentOS 5.3, and in installed php-mbstring. Any suggestions on what I need to change to get zabbix to detect it?

    [[email protected] zabbix]# rpm -qa | grep php
    php-pdo-5.1.6-23.2.el5_3
    php-cli-5.1.6-23.2.el5_3
    php-mysql-5.1.6-23.2.el5_3
    php-gd-5.1.6-23.2.el5_3
    php-mbstring-5.1.6-23.2.el5_3
    php-common-5.1.6-23.2.el5_3
    php-5.1.6-23.2.el5_3
    php-bcmath-5.1.6-23.2.el5_3
    [[email protected] zabbix]#

    #2
    I'm having this same problem, also with CentOS. Everything tells me that mbstrings is installed and enabled, but the pre-req check won't clear me for takeoff.

    Comment


      #3
      Same problem

      Comment


        #4
        Its a problem with 2 functions, i'm comment them in:
        grep "mb_" zabbix/include/locales.inc.php function_exists('mb_strlen') &&
        function_exists('mb_strtoupper') &&
        function_exists('mb_strpos') &&
        function_exists('mb_substr'); # &&
        # function_exists('mb_stristr') &&
        # function_exists('mb_strstr');

        And zabbix setup was done without problem.
        I can't explain this - may be developers could?

        Comment


          #5
          Originally posted by watto View Post
          Its a problem with 2 functions, i'm comment them in:
          grep "mb_" zabbix/include/locales.inc.php function_exists('mb_strlen') &&
          function_exists('mb_strtoupper') &&
          function_exists('mb_strpos') &&
          function_exists('mb_substr'); # &&
          # function_exists('mb_stristr') &&
          # function_exists('mb_strstr');

          And zabbix setup was done without problem.
          I can't explain this - may be developers could?
          I commented out the entry in include/setup.inc.php which worked and got me past the installation screen.

          Comment


            #6
            I confirm this problem. The problem exists only for PHP 5.0.x and 5.1.x. PHP 5.2 and later versions will work fine.

            Removing or commenting these two lines is absolutely correct workaround as these functions are not used anywhere in the front-end.

            Sorry for this problem.
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment


              #7
              As documentation says PHP version 5.2 or later is required.

              How to install PHP 5.2.6 on Centos 5.3 ?

              [[email protected] ~]# rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
              [[email protected] ~]# cd /etc/yum.repos.d
              [[email protected] ~]# wget http://dev.centos.org/centos/5/CentOS-Testing.repo
              [[email protected] ~]# yum --disablerepo=* --enablerepo=c5-testing update php

              http://www.zabbix.com/documentation/...n/requirements

              Comment


                #8
                Originally posted by yaap View Post
                As documentation says PHP version 5.2 or later is required.
                Zabbix 1.8 requires PHP 5.0 or later. The documentation is not correct, we will review and fix it shortly.
                Alexei Vladishev
                Creator of Zabbix, Product manager
                New York | Tokyo | Riga
                My Twitter

                Comment


                  #9
                  Originally posted by Alexei View Post
                  I confirm this problem. The problem exists only for PHP 5.0.x and 5.1.x.
                  Yes, I'm use PHP 5.1.6.

                  Comment


                    #10
                    ThankĀ“s

                    Originally posted by yaap View Post
                    As documentation says PHP version 5.2 or later is required.

                    How to install PHP 5.2.6 on Centos 5.3 ?

                    [[email protected] ~]# rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
                    [[email protected] ~]# cd /etc/yum.repos.d
                    [[email protected] ~]# wget http://dev.centos.org/centos/5/CentOS-Testing.repo
                    [[email protected] ~]# yum --disablerepo=* --enablerepo=c5-testing update php

                    http://www.zabbix.com/documentation/...n/requirements
                    This how-to work for me.


                    PHP version: 5.2.9 Ok
                    PHP Memory limit: 128M Ok
                    PHP post max size: 16M Ok
                    PHP max execution time: 300 sec Ok
                    PHP Timezone: America/Bahia Ok
                    PHP Databases support: MySQL Ok
                    PHP BC math support: yes Ok
                    PHP MB string support: yes Ok
                    PHP MB string overload: yes Ok
                    PHP Sockets support yes Ok
                    GD Version: bundled (2.0.34 compatible) Ok
                    Image formats: PNG Ok

                    Ok

                    Comment


                      #11
                      mbsring.func_overload

                      Originally posted by Alexei View Post
                      Zabbix 1.8 requires PHP 5.0 or later. The documentation is not correct, we will review and fix it shortly.
                      Web frontend installer checks "mbstring.func_overload 2" in php.ini file.
                      Then, strstr and stristr function is overloaded by mb_strstr and mb_stristr.

                      I checked source code.

                      - strstr function is not used
                      - stristr function is used in include/db.inc.php only

                      Code:
                      case 'ORACLE':
                              if(ocifetchinto($cursor, $row, (OCI_ASSOC+OCI_RETURN_NULLS))){
                                      $result = array();
                                      foreach($row as $key => $value){
                                              $field_type = strtolower(oci_field_type($cursor,$key));
                                              $value = (str_in_array($field_type,array('varchar','varchar2','blob','clob')) && is_null($value))?'':$value;
                      
                                              if(is_object($value) && (stristr($field_type, 'lob') !== false)){
                                                      $value = $value->load();
                                              }
                      
                                              $result[strtolower($key)] = $value;
                                      }
                              }
                              break;
                      mb_strstr and mb_stristr function is include PHP 5.2 or later.
                      http://php.net/manual/en/migration52.functions.php
                      Kodai Terashima
                      [URL="http://www.zabbix.jp"]ZABBIX-JP[/URL] - Japanese Zabbix community

                      Comment


                        #12
                        PHP version: 5.2.9 Ok
                        PHP Memory limit: 256M Ok
                        PHP post max size: 16M Ok
                        PHP max execution time: 300 sec Ok
                        PHP Timezone: Europe/Moscow Ok
                        PHP Databases support: MySQL Ok
                        PHP BC math support: yes Ok
                        PHP MB string support: yes Ok
                        PHP MB string overload: no Fail
                        PHP Sockets support yes Ok
                        GD Version: bundled (2.0.34 compatible) Ok
                        Image formats: PNG Ok

                        Fail

                        Please correct all issues and press "Retry" button

                        Comment


                          #13
                          php.ini
                          ----------------------------
                          mbstring.func_overload = 2
                          ------------------------------
                          PHP version: 5.2.9 Ok
                          PHP Memory limit: 256M Ok
                          PHP post max size: 16M Ok
                          PHP max execution time: 300 sec Ok
                          PHP Timezone: Europe/Moscow Ok
                          PHP Databases support: MySQL Ok
                          PHP BC math support: yes Ok
                          PHP MB string support: yes Ok
                          PHP MB string overload: yes Ok
                          PHP Sockets support yes Ok
                          GD Version: bundled (2.0.34 compatible) Ok
                          Image formats: PNG Ok

                          Comment


                            #14
                            Worked for me too with Centos5.2/php-5.1.6-15.el5. Had to restart httpd before PHP MB string overload would pass.

                            PHP version: 5.1.6 Ok
                            PHP Memory limit: 128M Ok
                            PHP post max size: 128M Ok
                            PHP max execution time: 300 sec Ok
                            PHP Timezone: Europe/London Ok
                            PHP Databases support: MySQL Ok
                            PHP BC math support: yes Ok
                            PHP MB string support: yes Ok
                            PHP MB string overload: yes Ok
                            PHP Sockets support yes Ok
                            GD Version: bundled (2.0.28 compatible) Ok
                            Image formats: PNG Ok

                            Comment


                              #15
                              i have solution

                              1. enter var/www/html/zabbix/include/
                              2. vi locales.inc.php
                              3. function_exists('mb_strlen') &&
                              function_exists('mb_strtoupper') &&
                              function_exists('mb_strpos') &&
                              function_exists('mb_substr'); # &&
                              # function_exists('mb_stristr') &&
                              # function_exists('mb_strstr');

                              ok...

                              Comment

                              Announcement

                              Collapse
                              No announcement yet.
                              Working...
                              X