Archive for php

PHP com módulos

Publicado em: 04/02/2009

Não há textos explicativos nste artigo, é “Mão no shell”!!

mkdir /usr/local/zlib
mkdir /usr/local/zlib/include
mkdir /usr/local/zlib/lib
mkdir /usr/local/phplibs
mkdir /usr/local/phplibs/include
mkdir /usr/local/phplibs/lib
mkdir /usr/local/phplibs/bin
mkdir /usr/local/phplibs/man
mkdir /usr/local/phplibs/man/man1

zlib:

http://www.zlib.org

./configure --prefix=/usr/local/zlib --shared
make test
make install

libjpeg:

http://www.ijg.org

./configure --prefix=/usr/local/phplibs --enable-shared --enable-static
make
make test
make install

libpng:

http://www.libpng.org

cp scripts/makefile. makefile
# and edit makefile to have these lines:
prefix=/usr/local/phplibs
ZLIBLIB=/usr/local/zlib/lib
ZLIBINC=/usr/local/zlib/include
make test
make install

libtiff:

http://www.libtiff.org

ftp://ftp.remotesensing.org/pub/libtiff

./configure --prefix=/usr/local/phplibs
make
make install

pdflib:
./configure --prefix=/usr/local/phplibs \
--enable-shared  --enable-static  --enable-php
make
make test

freetype:
./configure --prefix=/usr/local/phplibs \
--enable-static=yes --enable-shared=yes
make
make install

gd:

http://www.boutell.com/gd

# edit Makefile to have these lines:
INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/phplibs/include
LIBDIRS=-L. -L/usr/local/phplibs/lib -L/usr/lib/X11 -L/usr/X11R6/lib
INSTALL_LIB=/usr/local/phplibs/lib
INSTALL_INCLUDE=/usr/local/phplibs/include
INSTALL_BIN=/usr/local/phplibs/bin
make
make install

gmp:

http://www.swox.com/gmp

./configure --prefix=/usr/local/phplibs
make
make install

php4:
CC="gcc" CFLAGS="-O2" \
CPPFLAGS="-I/usr/local/phplibs/include -I/usr/local/zlib/include -I/usr/local/mysql/include/mysql" \
LDFLAGS="-L/usr/local/phplibs/lib -R/usr/local/phplibs/lib -L/usr/local/zlib/lib -R/usr/local/zlib/lib -L/usr/local/mysql/lib/mysql -R/usr/local/mysql/lib/mysql" \
./configure \
--prefix=/usr/local/php4 \
--with-apxs=/usr/local/apache/bin/apxs \
--with-openssl=/usr/local/openssl \
--with-zlib=/usr/local/zlib \
--with-mysql=/usr/local/mysql \
--with-gd=/usr/local/phplibs \
--with-jpeg-dir=/usr/local/phplibs \
--with-png-dir=/usr/local/phplibs \
--with-tiff-dir=/usr/local/phplibs \
--with-gmp=/usr/local/phplibs \
--enable-ftp \
--enable-gd-native-ttf \
--enable-memory-limit \
--enable-bcmath \
--enable-calendar \
--enable-trans-sid \
--enable-track-vars \
--enable-sockets
make
make install

* cp php.ini-dist /usr/local/php4/lib/php.ini

Compilacao iCover:

./configure --with-apxs2=/rmla/apache/bin/apxs --with-gd --with-iconv --with-mysql --with-pgsql --with-png-dir=/usr --with-jpeg-dir=/usr --with-zlib=/usr/local/zlib/