The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php missing function?

Discussion in 'General Discussion' started by SupermanInNY, Apr 2, 2004.

  1. SupermanInNY

    SupermanInNY Well-Known Member

    Joined:
    Jul 19, 2003
    Messages:
    255
    Likes Received:
    0
    Trophy Points:
    16
    Hi All,

    I have a script in PHP that is calling a Modolus function called
    gmp_mod

    if (gmp_mod (($i+1), 3) == 0)
    $num = 3;


    I get an error on this line:

    Fatal error: Call to undefined function: gmp_mod() in /home/hosites/public_html/hosting.php on line 16


    undefined function gmp_mod()!!!!
    http://il.php.net/manual/en/function.gmp-mod.php

    Oh.. I'm using PHP 4.3.4 on Apache/1.3.29

    Could use your help to identify where is the missing link in this.

    Thanks,

    -Alon.
     
  2. fishfreek

    fishfreek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    238
    Likes Received:
    0
    Trophy Points:
    16
    Requirements
    You can download the GMP library from http://www.swox.com/gmp/. This site also has the GMP manual available.

    You will need GMP version 2 or better to use these functions. Some functions may require more recent version of the GMP library.

    Installation
    In order to have these functions available, you must compile PHP with GMP support by using the --with-gmp option.
     
  3. SupermanInNY

    SupermanInNY Well-Known Member

    Joined:
    Jul 19, 2003
    Messages:
    255
    Likes Received:
    0
    Trophy Points:
    16
    Now I'm confused.
    Why?
    I'm not a super techi.
    How do I compile PHP?
    Do I need to do anything with Apache for this to happen?
    I had a techi guy helping me with the current setup, but he is not available to assist me going forward.
    How difficult would it be?
    It doesn't sound like the most difficult thing to do, if only I knew what command and what actions to take to compile a new PHP.
    Plus,.. php itself is now at 4.3.6rc1 (they already found a bug in 4.3.5), so do I need to d/l the latest PHP to compile?
    Or,. do I do it all in one shot with easyapache, and just place the source files somewhere and Apache will be compiled with that (but,.. easyapache should have a switch for that in the control panel...shouldn't it?)
    Like I said... I'm very confused.
    I could use some assistance or further instructions on this.
    Thanks for the help on this.

    -Alon.
     
Loading...

Share This Page