You need subversion, autoconf, automake, gcc, bison, flex and re2c installed,
then do:
svn co https://svn.php.net/repository/php/php-src/branches/PHP_5_4 php54
cd php54
./buildconf
./configure (see my shell script helper below)
make
make test
Then go for a run. This takes a while. When you come back, submit
the test results, but then try to track down one of the failed tests and
figure out why it failed. The tests are very simple. In the failed test
summary at the end a failed test shows up as:
CLI php -m [sapi/cli/tests/018.phpt]
That's a short description of the test and the filename of the test itself.
For a failed tests, we create some files in the test dir. Go to sapi/cli/tests
and you will find these files:
018.phpt - the full test file
018.php - the php code that was run for the test
018.out - the actual output from the test
018.exp - the output that we expected
018.diff - the diff between the actual and expected
Once you have fixed something, you can re-run the tests for just that set of
tests with:
make test TESTS=sapi/cli
To run more tests, run ./configure and enable as many extensions as possible.
Here is the shell script I use on an Ubuntu box:
#! /bin/sh
'./configure' \
'--with-apxs2=/usr/bin/apxs2' \
'--with-curlwrappers' \
'--with-gd' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-vpx-dir=/usr' \
'--with-freetype-dir=/usr' \
'--with-t1lib=/usr' \
'--enable-gd-native-ttf' \
'--enable-exif' \
'--with-config-file-path=/etc/php5/apache2' \
'--with-config-file-scan-dir=/etc/php5/apache2/conf.d' \
'--with-mysql=/usr' \
'--with-zlib' \
'--with-zlib-dir=/usr' \
'--with-gettext' \
'--with-kerberos' \
'--with-imap-ssl' \
'--with-mcrypt=/usr/local' \
'--with-iconv' \
'--with-ldap=/usr' \
'--enable-sockets' \
'--with-openssl' \
'--with-pspell' \
'--with-pdo-mysql=/usr' \
'--with-pdo-sqlite' \
'--enable-soap' \
'--enable-xmlreader' \
'--with-xsl' \
'--enable-ftp' \
'--enable-cgi' \
'--with-curl=/usr' \
'--with-tidy' \
'--with-xmlrpc' \
'--enable-mbstring' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-shmop' \
'--with-readline' \
'--with-mysqli=/usr/bin/mysql_config' \
'--prefix=/usr/local' \
"$@"
There are also README.TESTING and README.TESTING2 text files in the root
directory if you want to learn more about the testing mechanism.