Ad Widget

Collapse

php-bcmath5.1.6 module installed but frontend not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bchitambira
    Junior Member
    • Mar 2007
    • 4

    #1

    php-bcmath5.1.6 module installed but frontend not working

    zabbix-1.3.2
    I had installed my php5.1.5 and apache2 on my fedora core 6 server through the bitrock lampstack-5.5 installation. when i installed zabbix, after finishing the web installation, the browser returns nothing and the apache logs say "PHP Fatal error: Call t
    o undefined function bcdiv() in /var/www/html/zabbix/include/db.inc.php on line
    464"
    I have installed the php-bcmath-5.1.6 rpm. It seems my original installation does not work with this module. i have tried to search for a tar ball for bcmath in vain, so I could customise the integration.
    Anyone to help. i cant face reinstallation of mysql and apache since there are other services running which are dependent on them.

    What major files are needed, and their locations, from php-bcmath so that I can probably hand copy them????

    stranded.
  • Balaji Krishnamoorthy
    Junior Member
    • Apr 2007
    • 11

    #2
    Originally posted by bchitambira
    zabbix-1.3.2
    I had installed my php5.1.5 and apache2 on my fedora core 6 server through the bitrock lampstack-5.5 installation. when i installed zabbix, after finishing the web installation, the browser returns nothing and the apache logs say "PHP Fatal error: Call t
    o undefined function bcdiv() in /var/www/html/zabbix/include/db.inc.php on line
    464"
    I have installed the php-bcmath-5.1.6 rpm. It seems my original installation does not work with this module. i have tried to search for a tar ball for bcmath in vain, so I could customise the integration.
    Anyone to help. i cant face reinstallation of mysql and apache since there are other services running which are dependent on them.

    What major files are needed, and their locations, from php-bcmath so that I can probably hand copy them????

    stranded.
    Same here.

    Comment

    • Petya
      Member
      • Dec 2007
      • 37

      #3
      Show us the output of this script:

      <?php
      phpinfo()
      ?>

      Comment

      • Balaji Krishnamoorthy
        Junior Member
        • Apr 2007
        • 11

        #4
        PHP Logo
        PHP Version 4.4.2
        System Linux lintest 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686
        Build Date Jul 2 2006 11:34:56
        Configure Command './configure' '--with-config-file-path=/usr/local/apache2/conf' '--with-mysql=/usr/local/lib/mysql' '--disable-libxml' '--disable-dom' '--disable-simplexml' '--disable-xml' '--disable-xmlreader' '--disable-xmlwriter' '--without-pear' '--with-gd' '--with-zlib-dir=/usr/include' '--with-apxs2=/usr/local/apache2/bin/apxs'
        Server API Apache 2.0 Handler
        Virtual Directory Support disabled
        Configuration File (php.ini) Path /usr/local/apache2/conf
        PHP API 20020918
        PHP Extension 20020429
        Zend Extension 20050606
        Debug Build no
        Zend Memory Manager enabled
        Thread Safety disabled
        Registered PHP Streams php, http, ftp, compress.zlib
        PHP Credits
        Configuration
        PHP Core
        Directive Local Value Master Value
        allow_call_time_pass_reference On On
        allow_url_fopen On On
        always_populate_raw_post_data Off Off
        arg_separator.input & &
        arg_separator.output & &
        asp_tags Off Off
        auto_append_file no value no value
        auto_prepend_file no value no value
        browscap no value no value
        default_charset no value no value
        default_mimetype text/html text/html
        define_syslog_variables Off Off
        disable_classes no value no value
        disable_functions no value no value
        display_errors On On
        display_startup_errors Off Off
        doc_root no value no value
        docref_ext no value no value
        docref_root no value no value
        enable_dl On On
        error_append_string no value no value
        error_log no value no value
        error_prepend_string no value no value
        error_reporting no value no value
        expose_php On On
        extension_dir /usr/local/lib/php/extensions/no-debug-non-zts-20020429 /usr/local/lib/php/extensions/no-debug-non-zts-20020429
        file_uploads On On
        gpc_order GPC GPC
        highlight.bg #FFFFFF #FFFFFF
        highlight.comment #FF8000 #FF8000
        highlight.default #0000BB #0000BB
        highlight.html #000000 #000000
        highlight.keyword #007700 #007700
        highlight.string #DD0000 #DD0000
        html_errors On On
        ignore_repeated_errors Off Off
        ignore_repeated_source Off Off
        ignore_user_abort Off Off
        implicit_flush Off Off
        include_path .: .:
        log_errors Off Off
        log_errors_max_len 1024 1024
        magic_quotes_gpc On On
        magic_quotes_runtime Off Off
        magic_quotes_sybase Off Off
        max_execution_time 30 30
        max_input_time -1 -1
        open_basedir no value no value
        output_buffering 0 0
        output_handler no value no value
        post_max_size 8M 8M
        precision 14 14
        register_argc_argv On On
        register_globals Off Off
        report_memleaks On On
        safe_mode Off Off
        safe_mode_exec_dir /usr/local/php/bin /usr/local/php/bin
        safe_mode_gid Off Off
        safe_mode_include_dir no value no value
        sendmail_from no value no value
        sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
        serialize_precision 100 100
        short_open_tag On On
        SMTP localhost localhost
        smtp_port 25 25
        sql.safe_mode Off Off
        track_errors Off Off
        unserialize_callback_func no value no value
        upload_max_filesize 2M 2M
        upload_tmp_dir no value no value
        user_dir no value no value
        variables_order no value no value
        xmlrpc_error_number 0 0
        xmlrpc_errors Off Off
        y2k_compliance On On
        apache2handler
        Apache Version Apache/2.2.4 (Unix) PHP/4.4.2 mod_perl/2.0.3 Perl/v5.8.3
        Apache API Version 20051115
        Server Administrator [email protected]
        Hostname:Port lintest:0
        User/Group daemon(2)/2
        Max Requests Per Child: 10000 - Keep Alive: on - Max Per Connection: 100
        Timeouts Connection: 300 - Keep-Alive: 5
        Virtual Server No
        Server Root /usr/local/apache2
        Loaded Modules core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_filter mod_log_config mod_env mod_setenvif prefork http_core mod_mime mod_status mod_autoindex mod_asis mod_info mod_cgi mod_cgid mod_negotiation mod_dir mod_imagemap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_so sapi_apache2 mod_perl
        Directive Local Value Master Value
        engine 1 1
        last_modified 0 0
        xbithack 0 0
        Apache Environment
        Variable Value
        HTTP_HOST lintest
        HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
        HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
        HTTP_ACCEPT_LANGUAGE en-us,en;q=0.5
        HTTP_ACCEPT_ENCODING gzip,deflate
        HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
        HTTP_KEEP_ALIVE 300
        HTTP_CONNECTION keep-alive
        PATH /bin:/usr/bin
        SERVER_SIGNATURE no value
        SERVER_SOFTWARE Apache/2.2.4 (Unix) PHP/4.4.2 mod_perl/2.0.3 Perl/v5.8.3
        SERVER_NAME lintest
        SERVER_ADDR 192.168.1.2
        SERVER_PORT 80
        REMOTE_ADDR 192.168.81.172
        DOCUMENT_ROOT /usr/local/apache2/htdocs
        SERVER_ADMIN [email protected]
        SCRIPT_FILENAME /usr/local/apache2/htdocs/linsysmon/phptest.php
        REMOTE_PORT 1309
        GATEWAY_INTERFACE CGI/1.1
        SERVER_PROTOCOL HTTP/1.1
        REQUEST_METHOD GET
        QUERY_STRING no value
        REQUEST_URI /linsysmon/phptest.php
        SCRIPT_NAME /linsysmon/phptest.php
        HTTP Headers Information
        HTTP Request Headers
        HTTP Request GET /linsysmon/phptest.php HTTP/1.1
        Host linpxe.india.ti.com
        User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
        Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
        Accept-Language en-us,en;q=0.5
        Accept-Encoding gzip,deflate
        Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
        Keep-Alive 300
        Connection keep-alive
        HTTP Response Headers
        X-Powered-By PHP/4.4.2
        Keep-Alive timeout=5, max=100
        Connection Keep-Alive
        Transfer-Encoding chunked
        Content-Type text/html
        ctype
        ctype functions enabled
        gd
        GD Support enabled
        GD Version bundled (2.0.28 compatible)
        GIF Read Support enabled
        GIF Create Support enabled
        PNG Support enabled
        WBMP Support enabled
        XBM Support enabled
        mysql
        MySQL Support enabled
        Active Persistent Links 2
        Active Links 2
        Client API version 3.23.58
        MYSQL_MODULE_TYPE external
        MYSQL_SOCKET /var/lib/mysql/mysql.sock
        MYSQL_INCLUDE -I/usr/local/lib/mysql/include
        MYSQL_LIBS -L/usr/local/lib/mysql/lib -lmysqlclient

        Comment

        • Balaji Krishnamoorthy
          Junior Member
          • Apr 2007
          • 11

          #5
          Directive Local Value Master Value
          mysql.allow_persistent On On
          mysql.connect_timeout 60 60
          mysql.default_host no value no value
          mysql.default_password no value no value
          mysql.default_port no value no value
          mysql.default_socket no value no value
          mysql.default_user no value no value
          mysql.max_links Unlimited Unlimited
          mysql.max_persistent Unlimited Unlimited
          mysql.trace_mode Off Off
          overload
          User-Space Object Overloading Support enabled
          pcre
          PCRE (Perl Compatible Regular Expressions) Support enabled
          PCRE Library Version 6.2 01-Aug-2005
          posix
          Revision $Revision: 1.51.2.4.2.1 $
          session
          Session Support enabled
          Registered save handlers files user
          Directive Local Value Master Value
          session.auto_start Off Off
          session.bug_compat_42 On On
          session.bug_compat_warn On On
          session.cache_expire 180 180
          session.cache_limiter nocache nocache
          session.cookie_domain no value no value
          session.cookie_lifetime 0 0
          session.cookie_path / /
          session.cookie_secure Off Off
          session.entropy_file no value no value
          session.entropy_length 0 0
          session.gc_divisor 100 100
          session.gc_maxlifetime 1440 1440
          session.gc_probability 1 1
          session.name PHPSESSID PHPSESSID
          session.referer_check no value no value
          session.save_handler files files
          session.save_path /tmp /tmp
          session.serialize_handler php php
          session.use_cookies On On
          session.use_only_cookies Off Off
          session.use_trans_sid Off Off
          standard
          Regex Library Bundled library enabled
          Dynamic Library Support enabled
          Path to sendmail /usr/sbin/sendmail -t -i
          Directive Local Value Master Value
          assert.active 1 1
          assert.bail 0 0
          assert.callback no value no value
          assert.quiet_eval 0 0
          assert.warning 1 1
          auto_detect_line_endings 0 0
          default_socket_timeout 60 60
          safe_mode_allowed_env_vars PHP_ PHP_
          safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
          url_rewriter.tags a=href,area=href,frame=src,form=,fieldset= a=href,area=href,frame=src,form=,fieldset=
          user_agent no value no value
          tokenizer
          Tokenizer Support enabled
          zlib
          ZLib Support enabled
          Compiled Version 1.1.4
          Linked Version 1.1.4
          Directive Local Value Master Value
          zlib.output_compression Off Off
          zlib.output_compression_level -1 -1
          zlib.output_handler no value no value
          Additional Modules
          Module Name
          Environment
          Variable Value
          HOSTNAME linpxe
          TERM xterm
          SHELL /bin/bash
          HISTSIZE 1000
          SSH_CLIENT 192.168.166.81 33320 22
          QTDIR /usr/lib/qt-3.1
          SSH_TTY /dev/pts/4
          USER root
          LS_COLORS no=00:fi=00:di=00;34:ln=00;36i=40;33:so=00;35:bd=40;33;01:cd=40;33;01r=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32: *.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*. sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj =00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00; 31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.t z=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif =00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=0 0;35:*.tif=00;35:
          USERNAME root
          MAIL /var/spool/mail/root
          PATH /bin:/usr/bin
          INPUTRC /etc/inputrc
          PWD /opt/zabbix.source/php/php-4.4.2
          LANG en_US.UTF-8
          LAMHELPFILE /etc/lam/lam-helpfile
          SSH_ASKPASS /usr/libexec/openssh/gnome-ssh-askpass
          SHLVL 1
          HOME /root
          LOGNAME root
          SSH_CONNECTION 192.168.166.81 33320 192.168.1.2 22
          LESSOPEN |/usr/bin/lesspipe.sh %s
          G_BROKEN_FILENAMES 1
          _ /usr/local/apache2/bin/httpd
          OLDPWD /opt/zabbix.source/php
          PHP Variables
          Variable Value
          _SERVER["HTTP_HOST"] lintest
          _SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
          _SERVER["HTTP_ACCEPT"] text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
          _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.5
          _SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate
          _SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7
          _SERVER["HTTP_KEEP_ALIVE"] 300
          _SERVER["HTTP_CONNECTION"] keep-alive
          _SERVER["PATH"] /bin:/usr/bin
          _SERVER["SERVER_SIGNATURE"] no value
          _SERVER["SERVER_SOFTWARE"] Apache/2.2.4 (Unix) PHP/4.4.2 mod_perl/2.0.3 Perl/v5.8.3
          _SERVER["SERVER_NAME"] lintest
          _SERVER["SERVER_ADDR"] 192.168.1.2
          _SERVER["SERVER_PORT"] 80
          _SERVER["REMOTE_ADDR"] 192.168.81.172
          _SERVER["DOCUMENT_ROOT"] /usr/local/apache2/htdocs
          _SERVER["SERVER_ADMIN"] [email protected]
          _SERVER["SCRIPT_FILENAME"] /usr/local/apache2/htdocs/linsysmon/phptest.php
          _SERVER["REMOTE_PORT"] 1309
          _SERVER["GATEWAY_INTERFACE"] CGI/1.1
          _SERVER["SERVER_PROTOCOL"] HTTP/1.1
          _SERVER["REQUEST_METHOD"] GET
          _SERVER["QUERY_STRING"] no value
          _SERVER["REQUEST_URI"] /linsysmon/phptest.php
          _SERVER["SCRIPT_NAME"] /linsysmon/phptest.php
          _SERVER["PHP_SELF"] /linsysmon/phptest.php
          _SERVER["PATH_TRANSLATED"] /usr/local/apache2/htdocs/linsysmon/phptest.php
          _SERVER["argv"]

          Array
          (
          )

          _SERVER["argc"] 0
          _ENV["HOSTNAME"] lintest
          _ENV["TERM"] xterm
          _ENV["SHELL"] /bin/bash
          _ENV["HISTSIZE"] 1000
          _ENV["SSH_CLIENT"] 192.168.166.81 33320 22
          _ENV["QTDIR"] /usr/lib/qt-3.1
          _ENV["SSH_TTY"] /dev/pts/4
          _ENV["USER"] root
          _ENV["LS_COLORS"] no=00:fi=00:di=00;34:ln=00;36i=40;33:so=00;35:bd=40;33;01:cd=40;33;01r=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32: *.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*. sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj =00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00; 31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.t z=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif =00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=0 0;35:*.tif=00;35:
          _ENV["USERNAME"] root
          _ENV["MAIL"] /var/spool/mail/root
          _ENV["PATH"] /bin:/usr/bin
          _ENV["INPUTRC"] /etc/inputrc
          _ENV["PWD"] /opt/zabbix.source/php/php-4.4.2
          _ENV["LANG"] en_US.UTF-8
          _ENV["LAMHELPFILE"] /etc/lam/lam-helpfile
          _ENV["SSH_ASKPASS"] /usr/libexec/openssh/gnome-ssh-askpass
          _ENV["SHLVL"] 1
          _ENV["HOME"] /root
          _ENV["LOGNAME"] root
          _ENV["SSH_CONNECTION"] 192.168.166.81 33320 192.168.1.2 22
          _ENV["LESSOPEN"] |/usr/bin/lesspipe.sh %s
          _ENV["G_BROKEN_FILENAMES"] 1
          _ENV["_"] /usr/local/apache2/bin/httpd
          _ENV["OLDPWD"] /opt/zabbix.source/php

          Comment

          • Balaji Krishnamoorthy
            Junior Member
            • Apr 2007
            • 11

            #6
            Hi Petya

            Please help.

            Comment

            • Petya
              Member
              • Dec 2007
              • 37

              #7
              Balahi, you don't have bcmath installed.

              When installed there's a section in phpinfo() output called bcmath:

              bcmath
              BCMath support enabled

              You don't have it.

              Try `yum search php | grep math` and then `yum install pacakge_name`

              Comment

              • Balaji Krishnamoorthy
                Junior Member
                • Apr 2007
                • 11

                #8
                Ok Petya.

                Here is the issue.

                Several times, I have reconfigured php with --enable-bcmath.

                php -m output says bcmath module is loaded.

                Still, I don't understand why is there this error.

                undefined function bcdiv() in /var/www/html/zabbix/include/db.inc.php

                Comment

                • Balaji Krishnamoorthy
                  Junior Member
                  • Apr 2007
                  • 11

                  #9
                  Petya

                  It's resolved now.

                  Looking at phpinfo, I just realized that php compilation parameters are still indicating the old arguments passed.Though the php binary was recompiled and reinstalled, it did not take my new ./configure arguements.

                  so, copied the same arguments passed with the last compilation and ran ./configure again.

                  ./configure --with-config-file-path=/usr/local/apache2/conf --with-mysql=/usr/local/lib/mysql --disable-libxml --disable-dom --disable-simplexml --disable-xml --disable-xmlreader --disable-xmlwriter --without-pear --with-gd --with-zlib-dir=/usr/include --with-apxs2=/usr/local/apache2/bin/apxs --enable-bcmath --without-pcre-regex

                  Now, it's perfect. Strange, though.

                  Comment

                  Working...