|
-
Nov 20th, 2007, 05:13 AM
#1
Thread Starter
Hyperactive Member
gmp_mod()
Hi,
Please help to solve the following problem using gmp_mod(). I bring the function from PHP Manual, but it is not working. Please help.
PHP Code:
<?php
$mod = gmp_mod("8", "3");
echo gmp_strval($mod) . "\n";
?>
Thanks in advance.
-
Nov 20th, 2007, 07:06 AM
#2
Re: gmp_mod()
What does "not working" mean, exactly?
-
Nov 20th, 2007, 07:14 AM
#3
Re: gmp_mod()
The GMP library is probably not compiled or enabled.
-
Nov 23rd, 2007, 07:50 AM
#4
Thread Starter
Hyperactive Member
Re: gmp_mod()
I am getting the following error.
Fatal error: Call to undefined function: gmp_mod() in /home/go/public_html/test/mod.php on line 3
Please help me to solve it out.
Many thanks.
-
Nov 23rd, 2007, 01:47 PM
#5
Re: gmp_mod()
It might be good to check if your version of php was built with GMP support.
Create a page to check:
Visit this page -- do you see a section like this:
Code:
gmp
gmp support enabled
]
or at least, under the Configure Command section, the text '--with-gmp' ?
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Nov 27th, 2007, 02:03 AM
#6
Thread Starter
Hyperactive Member
Re: gmp_mod()
Thanks sunburnt,
No, I am not getting anything from phpinfo();
Please tell me how to cope it up.
Waiting for the reply.
Thanks.
-
Nov 27th, 2007, 03:38 AM
#7
Re: gmp_mod()
If you are using windows you need to go to your php.ini and enable the line: extension = gmp.dll.
If you are using Linux, you need to recompile PHP with --with-gmp or compile and enable the gmp.so.
See: http://us3.php.net/gmp
-
Nov 27th, 2007, 05:00 AM
#8
Thread Starter
Hyperactive Member
Re: gmp_mod()
I found this line
;extension=php_gmp.dll
in php.ini file and I make it like this
;enabled extension=php_gmp.dll
But my program is not working. Please help.
-
Nov 27th, 2007, 05:51 AM
#9
Re: gmp_mod()
To enable it you need to remove the ";" from thje beginning of the line. No need to type enabled.
-
Nov 28th, 2007, 01:39 AM
#10
Thread Starter
Hyperactive Member
Re: gmp_mod()
I have done accrodingly, but still getting the same error,
Fatal error: Call to undefined function: gmp_mod() in /home/go/public_html/test/mod.php on line 3
Please help.
-
Nov 28th, 2007, 02:43 AM
#11
Re: gmp_mod()
Check your extension path and check that directory contains the php_gmp.dll file.
-
Nov 29th, 2007, 12:34 AM
#12
Thread Starter
Hyperactive Member
Re: gmp_mod()
directory path:
C:\Program Files\LuckaSoft\EnginSite Editor for PHP\php\PHP-5.2.3\ext
Please help.
-
Nov 29th, 2007, 03:41 AM
#13
Re: gmp_mod()
Well does php_gmp.dll exist?
-
Nov 29th, 2007, 06:09 AM
#14
Thread Starter
Hyperactive Member
Re: gmp_mod()
Yes it exists. Please help.
-
Nov 29th, 2007, 02:41 PM
#15
Re: gmp_mod()
Does the extension path setting in PHP point to the directory in which it exists?
-
Nov 30th, 2007, 12:42 AM
#16
Thread Starter
Hyperactive Member
Re: gmp_mod()
What is the extension path setting in PHP and how to observe it. Please help.
-
Nov 30th, 2007, 03:48 AM
#17
Re: gmp_mod()
The setting is in the php.ini:
http://de3.php.net/manual/en/ini.cor....extension-dir
It is called extension_dir and it needs to be set to either an absolute path i.e: one starting with C:\ or a path relative to the PHP.ini.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|