Hi again to the list. I have attached a short manual written by me, which focuses in gmp building under win32 environments such as WinNT, Me, 98. I think it will be useful to many of you during this (a bit) complicated procedure. Many thanks to all the guys that gave me an advice to continue my efforts, and eventually got the gmp version of php.
Regards, Marios Karagiannopoulos Patras Greece
================================================================= Short manual for the Building of GNU Multiple Precision Extension ================================================================= The following short manual is going to describe how did I manage eventually to install the gmp extension of PHP4 in Win32 environment! Firstly, I would like to mention that I spent 2 or 3 weeks due to lack of the cygwin operating system files (especially /binutils package). It's very important to mention also, that, I made some minor changes to some of .c and .h files such as uncommenting some printouts due to compilation errors. So, if you are interested in making a new version of httpd.exe, which includes the gmp library and the php embedded then you are reading the right manual: Download the appropriate software: 1. Cygwin operating system (Embedded UNIX-like OS for Win32 Environments): http://www.cygwin.com You need to download a number of packages and NOT JUST the setup.exe and setup.ini. See below what I had installed: SETUP INI 45.385 02/01/02 11:28p setup.ini SETUP EXE 355.328 26/12/01 3:21p setup.exe CONTRIB <DIR> 28/12/01 8:56p contrib GDBM <DIR> 28/12/01 8:56p gdbm PERL <DIR> 28/12/01 8:56p perl CYGUTILS <DIR> 30/12/01 4:42p cygutils GETTEXT <DIR> 02/01/02 3:26p gettext MKTEMP <DIR> 02/01/02 3:27p mktemp LATEST <DIR> 28/12/01 8:56p latest ASH <DIR> 28/12/01 8:56p ash AUTOCONF <DIR> 28/12/01 8:56p autoconf AUTOMAKE <DIR> 28/12/01 8:56p automake BASH <DIR> 28/12/01 8:56p bash BC <DIR> 28/12/01 8:56p bc BINUTILS <DIR> 28/12/01 8:56p binutils CYGWIN <DIR> 28/12/01 8:56p cygwin DIFF <DIR> 28/12/01 8:56p diff FILEUT~1 <DIR> 28/12/01 8:56p fileutils FINDUT~1 <DIR> 28/12/01 8:56p findutils GAWK <DIR> 28/12/01 8:56p gawk GREP <DIR> 28/12/01 8:56p grep GZIP <DIR> 28/12/01 8:56p gzip NCURSES <DIR> 28/12/01 8:56p ncurses LOGIN <DIR> 28/12/01 8:56p login M4 <DIR> 28/12/01 8:56p m4 README 5.875 27/12/01 2:16a README BOOTST~1 ZIP 763.516 27/12/01 2:19a bootstrap.zip MD5 SUM 133 27/12/01 2:19a md5.sum SETUP EXE 218.112 27/12/01 2:20a setup.exe BISON <DIR> 29/12/01 1:42a bison SED <DIR> 29/12/01 1:44a sed BYACC <DIR> 29/12/01 1:48a byacc BZIP2 <DIR> 29/12/01 1:49a bzip2 CLEAR <DIR> 29/12/01 1:52a clear COMMON <DIR> 29/12/01 1:52a common SH-UTILS <DIR> 29/12/01 1:53a sh-utils CPIO <DIR> 29/12/01 1:59a cpio CRYPT <DIR> 29/12/01 2:01a crypt CTAGS <DIR> 29/12/01 2:01a ctags CYGRUN~1 <DIR> 29/12/01 2:04a cygrunsrv MAKE <DIR> 29/12/01 2:06a make SHARUT~1 <DIR> 29/12/01 2:06a sharutils MINGW-~1 <DIR> 29/12/01 2:24a mingw-runtime TAR <DIR> 29/12/01 2:24a tar EXPECT <DIR> 29/12/01 2:25a expect TEXTUT~1 <DIR> 29/12/01 2:39a textutils FILE <DIR> 29/12/01 2:45a file TIME <DIR> 29/12/01 2:52a time WHICH <DIR> 29/12/01 2:54a which ZLIB <DIR> 29/12/01 2:55a zlib GCC <DIR> 29/12/01 2:56a gcc W32API <DIR> 29/12/01 5:41p w32api REGEX <DIR> 30/12/01 2:56a regex NEWLIB~1 <DIR> 02/01/02 3:30p newlib-man FLEX <DIR> 02/01/02 3:41p flex 2. GMP Library from http://www.swox.com/gmp 3. Apache web server for Cygwin, from httpd.apache.org <apache_1.3.22-i686-whatever-cygwin.tar.gz> 4. The latest PHP source from www.php.net/downloads -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Tip: A good start is to read the file INSTALL for every package you are going to install... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Steps for building the httpd.exe file: QUICK INSTALL (Static) 1. Build the GMP library with './configure' and 'make' commands. The result should be a directory called .libs which includes the libgmp.a file. 2. Copy all these files from the gmp-x.y directory to the php-4.x.y/ext/gmp/ 3. Unzip and Untar the Apache web server: $ gunzip -c apache_1.3.x.tar.gz | tar xf - $ cd apache_1.3.x $ ./configure $ cd .. 4. Build the PHP binary with './configure --with-gmp --with-apache' and 'make' commands. If you get the following error: /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: cann ot find -lgmp collect2: ld returned 1 exit status make[1]: *** [php] Error 1 make[1]: Leaving directory `/cygdrive/d/temp/php-4.0.6' make: *** [all-recursive] Error 1 Then copy the libgmp.a file from php../ext/gmp/.libs/ into /lib/mingw/libgmp.a and then 'make clean' and 'make' again. $ gunzip -c php-4.0.x.tar.gz | tar xf - $ cd php-4.0.x $ ./configure --with-gmp --with-apache=../apache_1.3.x $ make $ make install 5. Make the httpd.exe which includes all the above packages: $ cd ../apache_1.3.x $ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a (The above line is correct! Yes, we know libphp4.a does not exist at this stage. It isn't supposed to. It will be created.) $ make (you should now have an httpd binary which you can copy to your Apache bin dir if is is your first install then you need to "make install" as well) $ cd ../php-4.0.x $ cp php.ini-dist /usr/local/lib/php.ini You can edit /usr/local/lib/php.ini file to set PHP options. Edit your httpd.conf or srm.conf file and add: AddType application/x-httpd-php .php 6. Start, Stop or Restart the Apache web Server: $ /www/bin/apachectl start As far as I remember, that's all. I met a lot of preventions since I started to discover the above procedure. ================================================================= Author: Marios Karagiannopoulos <[EMAIL PROTECTED]> Date: 3/1/2002 MSc student in Computational Mathematics & Artificial Intelligence <http://master.math.upatras.gr/~marios> & <http://jump.to/marios> University of Patras Greece =================================================================
-- PHP Install Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]