tomclegg.net


Diary
Examples
    256-router
    adzap
    apache-double-reverse
    cacti-adodb-php4
    debian-quota
    diskonmodule
    dollarsperbyte
    dynip
    ezmlm-linux
    fbsdhabits
    freebsdclone
    macbook-quantal-sound
    maildirpop3d-awfulhak
    mandy
    md
    mrtg
    net-snmp
    nodefaultroute
    oracle9i
    oracle9i-bsd5
    oracle9i-client
    oracle9i-nat
    php-cgi
    php-commandline
    php-image
  >php-kics<
    php-mini_httpd
    pinouts
    pizzaperdollar
    plesk-symlink-php
    pxe
    qmail-linux
    qmail-qfilter
    racoon-sonicwall
    redundant-vpn
    rewriterule
    seahorse-workaround
    setting-locale-failed
    smalldog
    snmpv3-cacti
    spamassassin
    squid-tproxy
    supfile
    suse73
    svc-nmbd
    svc-smbd
    svc-smtpd
    switch-virtualbox-virsh
    toyotastereo
    vm
    vn-file
    wmp-invalid
    xcode-remote-install
    xen-eth0-renamed
    xen-monowall
    xen3-ubuntu-dapper
    zz-update-grub-fail
Hire Tom
Mostly Mozart
Patches
School
Scrapbook
Software
Telephones




colocation
comments
davidireland
edsgranola
faq
funsites
goodlooking
goodmovies
google-earth-saucy-amd64
houserules
liberating
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