Ad Widget

Collapse

Zabbix installation - PHP bcmath and mbstring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rafamori
    Junior Member
    • May 2014
    • 3

    #1

    Zabbix installation - PHP bcmath and mbstring

    Hi everybody,

    I´m implementing a new server in a Linux RHEL 6.3 with PHP 5.5.13.
    My php installation command was:

    ./configure \
    --with-mysql \
    --with-pgsql \
    --with-gd \
    --with-zlib-dir \
    --with-png-dir \
    --with-jpeg-dir \
    --with-freetype-dir \
    --with-gettext \
    --with-oci8 \
    --enable-mbstring \
    --enable-bcmath \
    --enable-sockets

    As the next step, I´m trying to start the frontend installation and the two modules bcmath and mbstring appear as "Fail":

    PHP bcmath - off - Fail
    PHP mbstring - off - Fail

    All the rest has the status "OK".

    I already found the directory /usr/local/include/php/ext/mbstring. I couldn´t find any directory or file with bcmath name.

    Who can help me?
  • Jason
    Senior Member
    • Nov 2007
    • 430

    #2
    Have you tried yum install php-bcmath?

    Comment

    • rafamori
      Junior Member
      • May 2014
      • 3

      #3
      The zabbix version is 2.2.3.
      The first attempt was install the native php using "yum install php" including php-bcmath and php-mbstring but I had some dependencies´ problem and I decided to install the last php version from src.

      So now, when I try to install the packages I´ve the same old problems with dependencies:

      [root@orapos RedHat_PKGs]# rpm -ivh php-mbstring-5.3.3-26.el6.x86_64.rpm
      warning: php-mbstring-5.3.3-26.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
      error: Failed dependencies:
      php-common(x86-64) = 5.3.3-26.el6 is needed by php-mbstring-5.3.3-26.el6.x86_64

      [root@orapos RedHat_PKGs]# rpm -ivh php-bcmath-5.3.3-26.el6.x86_64.rpm
      warning: php-bcmath-5.3.3-26.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
      error: Failed dependencies:
      php-common(x86-64) = 5.3.3-26.el6 is needed by php-bcmath-5.3.3-26.el6.x86_64

      [root@orapos RedHat_PKGs]# yum install php-common
      rhel_63 | 4.0 kB 00:00
      updates_rhel_63 | 951 B 00:00
      Setting up Install Process
      Package php-common-5.3.3-3.el6_2.8.x86_64 already installed and latest version
      Nothing to do

      I´ve some internal restrictions in my network that I can´t set up external repositories.

      Comment

      • Jason
        Senior Member
        • Nov 2007
        • 430

        #4
        If you've compiled your own php then it's possible that all the modules needed aren't built. Create a phpinfo(); page on your server and see how php is compiled. Then examine the modules and rebuild. Also remember to restart httpd between installing php and checking that page.

        You're better off using the yum repository if possible. Also remember EPEL has zabbix set up on there so can install binaries already compiled for your system.

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          I'm not sure if it's important - but you have a different subversion of php and php-mbstring.

          You have installed php-common-5.3.3-3.el6_2.8.x86_64 (subversion 3)
          You try to install php-mbstring-5.3.3-26.el6.x86_64.rpm, which needs subversion 26 of php-common.

          Does it matter?
          Sincerely yours,
          Aleksey

          Comment

          • Jason
            Senior Member
            • Nov 2007
            • 430

            #6
            You need to make sure have just one version of php on your system and that the libraries/modules are all the same version. Anything else is asking for trouble down the road.

            Uninstall all versions and start again... If you've got the source then recompile all modules with that and install.

            If you can use the main redhat repositories then I'd use them to install as it will work better and be an order of magnitude easier to maintain.

            Comment

            • bvirgin
              Junior Member
              • Nov 2016
              • 1

              #7
              Zabbix 3.2 with Ubuntu 16.04 and mysql

              Using the repository install method, I ran into issues installing Zabbix 3.2 on Ubuntu 16.04.
              I did a google search for the errors and this was the top result. As I did not find the answer anywhere, I thought that I would share my resolution here.

              I was using this guide:


              After the "# service zabbix-server start" step, there is a link to front-end configuration. That link does not seem to work. I went to the home page http://you-server-ip/zabbix and a dialogue walks you through a verification of the front-end configuration. I received the following errors:
              Install
              Check of pre-requisites

              PHP bcmath extension missing (PHP configuration parameter --enable-bcmath).
              PHP mbstring extension missing (PHP configuration parameter --enable-mbstring).
              PHP xmlwriter extension missing.
              PHP xmlreader extension missing.

              Fix these errors with the following:
              sudo apt-get install php-bcmath
              sudo apt-get install php-mbstring
              sudo apt-get install php-xml

              Also, make sure that you edit /etc/apache2/conf-enabled/zabbix.conf
              Change the time zone by replacing the following line:
              # php_value date.timezone Europe/Riga
              For my time zone, I used the following:
              php_value date.timezone America/Los_Angeles

              Restart apache:
              sudo service apache2 restart

              Now rerun the Zabbix front-end system check by hitting your browser back button and starting the check process again. The system should pass.

              Log into the system:
              http://you-server-ip/zabbix Admin/zabbix
              After completing the front-end configuration, you the server may report that it is not running. If this is the case, double check your zabbix server config file.

              /etc/apache2/conf-enabled/zabbix.conf
              (Assuming defaults)
              make sure that you uncomment the following line:
              # DBHost=localhost
              Also, uncomment this line and add the password you assigned to the mysql db during setup
              DBPassword=enterYourMysqlPasswordHere

              restart the server with the following:
              sudo service zabbix-server restart

              Comment

              • lennshow66
                Junior Member
                • Feb 2017
                • 1

                #8
                Originally posted by bvirgin
                Using the repository install method, I ran into issues installing Zabbix 3.2 on Ubuntu 16.04.
                I did a google search for the errors and this was the top result. As I did not find the answer anywhere, I thought that I would share my resolution here.

                I was using this guide:


                After the "# service zabbix-server start" step, there is a link to front-end configuration. That link does not seem to work. I went to the home page http://you-server-ip/zabbix and a dialogue walks you through a verification of the front-end configuration. I received the following errors:
                Install
                Check of pre-requisites

                PHP bcmath extension missing (PHP configuration parameter --enable-bcmath).
                PHP mbstring extension missing (PHP configuration parameter --enable-mbstring).
                PHP xmlwriter extension missing.
                PHP xmlreader extension missing.

                Fix these errors with the following:
                sudo apt-get install php-bcmath
                sudo apt-get install php-mbstring
                sudo apt-get install php-xml

                Also, make sure that you edit /etc/apache2/conf-enabled/zabbix.conf
                Change the time zone by replacing the following line:
                # php_value date.timezone Europe/Riga
                For my time zone, I used the following:
                php_value date.timezone America/Los_Angeles

                Restart apache:
                sudo service apache2 restart

                Now rerun the Zabbix front-end system check by hitting your browser back button and starting the check process again. The system should pass.

                Log into the system:
                http://you-server-ip/zabbix Admin/zabbix
                After completing the front-end configuration, you the server may report that it is not running. If this is the case, double check your zabbix server config file.

                /etc/apache2/conf-enabled/zabbix.conf
                (Assuming defaults)
                make sure that you uncomment the following line:
                # DBHost=localhost
                Also, uncomment this line and add the password you assigned to the mysql db during setup
                DBPassword=enterYourMysqlPasswordHere

                restart the server with the following:
                sudo service zabbix-server restart
                Thanks! Followed the same guide with the same issue. Your solution worked perfectly.

                Comment

                • tienpt
                  Junior Member
                  • Sep 2012
                  • 29

                  #9
                  Originally posted by bvirgin
                  PHP bcmath extension missing (PHP configuration parameter --enable-bcmath).
                  PHP mbstring extension missing (PHP configuration parameter --enable-mbstring).
                  PHP xmlwriter extension missing.
                  PHP xmlreader extension missing.

                  Fix these errors with the following:
                  sudo apt-get install php-bcmath
                  sudo apt-get install php-mbstring
                  sudo apt-get install php-xml

                  Restart apache:
                  sudo service apache2 restart
                  Thank bvirgin your suggestion solved my issue. You saved my time. Although your post was put long time ago. But, it is still useful.
                  To everyone: I am using Ubuntu 18.04 LTS, Zabbix 3.4, PHP 7.0.

                  Comment

                  Working...