Anonymous CVS Access
If you wish to get the latest PHP source tree, you can obtain it through anonymous CVS. You should be warned that the CVS version is a development version, and as such, is often unstable, and may not even compile properly. The advantage of using CVS, though, is that you can get the latest fixes and updates, without having to wait for the official releases.
PHP uses an advanced configuration system that requires you to have the following tools. Re2c is only necessary for developers and can be found here. All other utilities can be obtained from the GNU FTP site.
- autoconf: 2.13
- automake: 1.4+
- libtool: 1.4.x+ (except 1.4.2)
- bison: 1.28, 1.35, 1.75, 2.0 or higher
- flex: 2.5.4
- re2c: 0.9.11+
If you're experiencing problems, see also the section on buildconf failures.
Steps for using PHP from CVS
-
It is recommended that you configure CVS by putting this
in your
~/.cvsrcfile:cvs -z3 update -d -P checkout -P diff -u
-
Log in to the PHP CVS server. We'll use the anonymous user cvsread
as the username, and use phpfi as the password:
cvs -d :pserver:cvsread@cvs.php.net:/repository login -
Obtain the latest PHP source from CVS. There is a single php-src
directory that contains all PHP branches. To get PHP from CVS,
use the "cvs checkout -r BRANCH" notation. To checkout the
latest, consider the following CVS commands:
PHP 4.4:cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r PHP_4_4 php-src
PHP 5.2:cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r PHP_5_2 php5
PHP 6:cvs -d :pserver:cvsread@cvs.php.net:/repository checkout php6
Some tips and notes:
You may retrieve a specific release of PHP from CVS by using the -r flag in your cvs command. Some examples:
cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r php_4_2_1 php-src
cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r php_4_3_2 php-src- The branch names can also be used for cvs diff and merge operations.
-
You can also specify the directory name, for example, to put PHP 6 HEAD into a directory
named php6dev:
cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -d php6dev php6
-
Make sure you have autoconf 2.13 or newer, automake 1.4 or newer and libtool
1.4.
Note that certain combinations of autoconf, automake and libtool may not work when used together. See below for details.
Also, certain versions of autoconf may generate warnings ofAC_PROG_CPP called before AC_PROG_CC. These messages can usually be ignored. -
Run
./buildconf. After a while, the configure script should be generated. - From this point onwards, installation is similar to the installation of one of the official packages with one main difference – you must have bison 1.28 or later and flex 2.5.4 to compile, because the pre-generated scanner and parser files are not included in CVS.
There are also other things, like the XML source code
for the documentation, available via anonymous CVS. See
the web-based view of the CVS
server to see what is available. For example, to checkout the
latest english version of the PHP manual:
cvs -d :pserver:cvsread@cvs.php.net:/repository checkout phpdoc
autoconf, automake and libtool information
There seem to be problems with libtool 1.4.2. It is suggested that you use libtool 1.4, along with autoconf 2.13 and automake 1.4. You should also ensure that autoconf, automake and libtool are installed in the same directory. libtool 1.5 will not work.
The following combinations are known to work:
- autoconf 2.13, automake 1.4 and libtool 1.4.3
- autoconf 2.13, automake 1.5 and libtool 1.4.3