note 68327 added to ref.gmp

From: Date: Sun, 23 Jul 2006 06:24:28 +0000
Subject: note 68327 added to ref.gmp
Groups: php.notes 
Request: Send a blank email to php-notes+get-115052@lists.php.net to get a copy of this message
Here's a quick and dirty way to use simple GMP functions with PHP without recompiling. It is dependent upon the use of the exec() function, so make sure you can use exec(). While in safe mode you must consider the safe_mode_exec_dir directive. And don't simply pass user input to the exec function without validating the input first! Download and Install GMP as instructed in README and INSTALL files. On my MAC OS X Server, I just did the following: ./configure make make check make install This installed it in the /usr/local directory. There were some errors, but not with any functions I needed. Within the gmp-4.#.# cd into the demos directory. Then compile pexpr.c by typing: make pexpr This is a simple expressions parser which serves as a simple interface to some of the basic GMP functions. You can test it then like: ./pexpr "102394874783 * 23498748"; Now you may interface with it using PHP's exec() function. ---- Server IP: 64.71.164.2 Probable Submitter: 24.245.74.154 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/ref.gmp.php Edit -- http://master.php.net/note/edit/68327 Del: integrated -- http://master.php.net/note/delete/68327/integrated Del: useless -- http://master.php.net/note/delete/68327/useless Del: bad code -- http://master.php.net/note/delete/68327/bad+code Del: spam -- http://master.php.net/note/delete/68327/spam Del: non-english -- http://master.php.net/note/delete/68327/non-english Del: in docs -- http://master.php.net/note/delete/68327/in+docs Del: other reasons-- http://master.php.net/note/delete/68327 Reject -- http://master.php.net/note/reject/68327 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#115052) next »