tomclegg.net


Diary
Examples
    256-router
    adzap
    debian-quota
    diskonmodule
    dynip
    ezmlm-linux
    fbsdhabits
    freebsdclone
    maildirpop3d-awfulhak
    mandy
    md
    mrtg
    net-snmp
    oracle9i
    oracle9i-bsd5
    oracle9i-client
    oracle9i-nat
    php-cgi
    php-commandline
    php-image
  >php-kics<
    php-mini_httpd
    pinouts
    plesk-symlink-php
    pxe
    qmail-linux
    qmail-qfilter
    racoon-sonicwall
    redundant-vpn
    rewriterule
    smalldog
    spamassassin
    squid-tproxy
    supfile
    suse73
    svc-nmbd
    svc-smbd
    svc-smtpd
    toyotastereo
    vm
    vn-file
    wmp-invalid
    xcode-remote-install
    xen-eth0-renamed
    xen3-ubuntu-dapper
Hire Tom
Mostly Mozart
Patches
School
Scrapbook
Software
Telephones




colocation
comments
davidireland
edsgranola
faq
funsites
goodlooking
goodmovies
houserules
liberating
nodefaultroute
resume
resume2
scratch
shopping
snacks
todo
university
warisbogus

PHP the KICS way
Posted October 3, 2007

php 4.4.7 with suhosin patch

(
set -ex
cd /usr/ports/lang/php4
make fetch checksum
cd /tmp
rm -r php-4.4.7
tar xyf /usr/ports/distfiles/php-4.4.7.tar.bz2
cd php-4.4.7
zcat /usr/ports/distfiles/suhosin-patch-4.4.7-0.9.6.patch.gz | patch -p1
wget http://tomclegg.net/software/patch-php-path-info
patch < patch-php-path-info

'./configure' '--enable-force-cgi-redirect' '--enable-shared' \
'--enable-trans-sid' '--enable-sockets' '--enable-ftp' '--enable-xslt' \
'--with-xslt-sablot=/usr/local' '--with-zlib' '--with-mhash=/usr/local' \
'--with-mcrypt=/usr/local' '--with-mysql=/usr/local' \
'--with-pgsql=/usr/local' '--with-pear' '--with-gd' \
'--with-jpeg-dir=/usr/local/' '--with-curl=/usr/local' \
'--with-freetype=/usr/local'
make
cp -p sapi/cgi/php /usr/local/bin/php447.cgi
strip /usr/local/bin/php447.cgi
)

php 4.3.11

cd /usr/ports/lang/php4
make fetch
cd /tmp
rm -r php-4.3.11
tar xyf /usr/ports/distfiles/php-4.3.11.tar.bz2
cd php-4.3.11
wget http://tomclegg.net/software/patch-php-path-info
patch < patch-php-path-info
'./configure' '--enable-force-cgi-redirect' '--enable-trans-sid' \
 '--enable-sockets' '--enable-ftp' '--enable-xslt' \
 '--with-xslt-sablot=/usr/local' '--with-zlib' \
 '--with-mhash=/usr/local' '--with-mcrypt=/usr/local' '--with-zlib' \
 '--with-mysql=/usr/local' '--with-pgsql=/usr/local' '--with-pear' \
 '--with-gd' '--enable-shared' '--with-jpeg-dir=/usr/local/'
make
cp -p sapi/cgi/php /usr/local/bin/php
strip /usr/local/bin/php