Update to PHP version 4.2

Apr 30, '02 01:42:19AM

Contributed by: bluehz

Leave it to Mark Liyanage to keep us up to date with all that "just won't compile on OS X" software. This time - he's got the latest PHP 4.2.0 ready to go for us, either on his site, or through a simple shell script.

Read the rest of the article if you'd like to use the shell script update method...

If you just want to install the module from his site, you can run this shell script:

#!/bin/sh

echo "============================================"
echo " Installing PHP 4.2.0"
echo "============================================"
dir=$HOME/Src
printf "Download the source to what directory [$dir]? "
read dir
: ${dir:=$HOME/Src}
echo $dir
cd $dir
echo "Downloading source to " $dir
curl -O http://www2.entropy.ch/download/libphp4.so.gz
echo "Decompressing source"
gunzip libphp4.so.gz
echo "Installing modules"
sudo apxs -i -a -n php4 libphp4.so
echo "Restarting Apache"
sudo apachectl graceful
echo "============================================"
echo " Install Complete"
echo "============================================"
Copy and paste this code into a text file, save as php4.2.0Install.sh with unix line endings, chmod 755 the text file, and run from the terminal:
./php4.2.0Install.sh
You can test the install by creating a text file with this text inside:
<?php phpinfo(); ?>
Save it as phpinfo.php in your web directory and go to http://localhost/phpinfo.php. You should see the new install of PHP 4.2.0.

FYI - Mark's module has been built with the following configuration:
'./configure' '--disable-cli' '--with-apxs' '--with-mysql' '--with-pgsql' '--with-gd=/usr/local' '--with-png-dir=/usr/local' '--with-zlib-dir=/usr' '--with-jpeg-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-t1lib=/usr/local' '--enable-trans-sid' '--enable-exif' '--with-xml' '--enable-wddx' '--with-curl=/usr/local' '--with-pdflib=/usr/local' '--enable-ftp' '--enable-mbstring' '--enable-mbstr-enc-trans' '--with-ldap' '--enable-xslt' '--with-xslt-sablot=/usr/local' '--with-imap=../imap-2001a' '--enable-dbx' '--enable-dbase'

Comments (11)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020430014219368