Results 1 to 5 of 5

Thread: PHP's bcdiv()

  1. #1
    Join Date
    May 2003
    Location
    U.P. Diliman, Philippines
    Posts
    41

    PHP's bcdiv()

    The error message,

    Fatal error: Call to undefined function: bcdiv() in /usr/sites/virtualhosts/ncirs/ncirs/rept/zpax.php on line 48,

    appears when I access my web-based application from the server but not when I access it from my machine (i.e. localhost).

    Line 48 of zpax.php says:

    $pp = 1 + bcdiv($lncount-$fpg,$spg);

    I look forward for your comment (yes, you!).

    By the way, I also attached the zpax.txt (it's .php) file for your reference. Thank you.
    Attached Files Attached Files

  2. #2
    Join Date
    May 2002
    Location
    UK
    Posts
    2,994
    To have access to that function you need to configure PHP with the --enable-bcmath configuration statement.

    http://uk.php.net/manual/en/ref.bc.php

  3. #3
    Yep. BCMATH. I have yet to understand why PHP is not pre-configured with BCMATH by default. The ability to make mathematic calculations is such a basic function.

  4. #4
    Join Date
    May 2003
    Location
    U.P. Diliman, Philippines
    Posts
    41
    Thanks Rich2K and wscreate for those replies. I appreciate your help. Good day!

  5. #5
    Join Date
    May 2002
    Location
    UK
    Posts
    2,994
    Originally posted by wscreate
    Yep. BCMATH. I have yet to understand why PHP is not pre-configured with BCMATH by default. The ability to make mathematic calculations is such a basic function.
    PHP can make basic mathematical calculations by default http://uk.php.net/manual/en/ref.math.php

    It's only for larger numbers where you would find the need for arbitrary precision math functions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •