Ad Widget

Collapse

Zabbix 1.8 MBstring?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mucknet
    Member
    • Dec 2004
    • 59

    #1

    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?

    [root@admin3-test 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
    [root@admin3-test zabbix]#
  • ryanknapper
    Junior Member
    • Mar 2005
    • 13

    #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

    • watto
      Member
      • Jun 2008
      • 47

      #3
      Same problem

      Comment

      • watto
        Member
        • Jun 2008
        • 47

        #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

        • mucknet
          Member
          • Dec 2004
          • 59

          #5
          Originally posted by watto
          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

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #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

            • yaap
              Junior Member
              • Aug 2009
              • 20

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

              How to install PHP 5.2.6 on Centos 5.3 ?

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

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

              Comment

              • Alexei
                Founder, CEO
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Sep 2004
                • 5654

                #8
                Originally posted by yaap
                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

                • watto
                  Member
                  • Jun 2008
                  • 47

                  #9
                  Originally posted by Alexei
                  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

                  • Treitor
                    Junior Member
                    • Feb 2006
                    • 14

                    #10
                    Thank´s

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

                    How to install PHP 5.2.6 on Centos 5.3 ?

                    [root@zabbix ~]# rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
                    [root@zabbix ~]# cd /etc/yum.repos.d
                    [root@zabbix ~]# wget http://dev.centos.org/centos/5/CentOS-Testing.repo
                    [root@zabbix ~]# 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

                    • Kodai
                      Junior Member
                      • Mar 2006
                      • 8

                      #11
                      mbsring.func_overload

                      Originally posted by Alexei
                      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) && ([B][COLOR="red"]stristr[/COLOR][/B]($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.
                      PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.
                      Kodai Terashima
                      [URL="http://www.zabbix.jp"]ZABBIX-JP[/URL] - Japanese Zabbix community

                      Comment

                      • detx
                        Junior Member
                        • Dec 2009
                        • 19

                        #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

                        • detx
                          Junior Member
                          • Dec 2009
                          • 19

                          #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

                          • CeeEss
                            Senior Member
                            Zabbix Certified Specialist
                            • Nov 2007
                            • 103

                            #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

                            • yakuzazu
                              Junior Member
                              • Jan 2010
                              • 1

                              #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

                              Working...