Installing PHP 3.x.x from CVS Source for Apache 1.x.x on Linux

by Nathan Wallace (Nov 2, 1999)


This document describes how to install PHP for Apache on Linux. The installation is being done from the latest PHP code as stored in the CVS repository. Specifically, these instructions were written using Red Hat 6.1, Apache 1.3.9 and PHP 3.0.12+.

You should have Apache installed before trying to install PHP. Here are my Apache installation instructions.

If you want to use PHP with MySQL then you must install MySQL first.

Before we Begin

  1. These instructions assume that you have Apache installed according to my instructions. That installation is done into /usr/local/etc/httpd and /www.

  2. You must be logged in as root to perform this installation.
        su root

Getting the CVS Tree

  1. The Concurrent Versions System is a tool for version control. We are about to connect to the main PHP development tree and download the latest version of the code. Be careful, this will get the current development version, not a production release. You should only use the CVS version of the code if you have a good reason to do so, mine is that I need XML support which is currently broken in 3.0.12.

  2. We will install in the same place as our Apache and existing PHP installations. You do not need to have installed PHP before to use the CVS version.
        cd /usr/local/etc

  3. You need to have CVS installed on your machine. It is available from . First we need to specify the location of the CVS tree and login. You will need internet access to do this and all other cvs commands:
        cvs -d login
    When prompted enter the password of:

  4. Now we can get the latest version of the CVS tree. This will create a directory called php3, so you might want to make sure that one does not already exist.
        cvs -z3 -d checkout php3

  5. Now we'll create a symbolic link to the php3 directory, just for consistency with our other installations:
        ln -s php3 php

Getting Ready to Build PHP from CVS

  1. First let's get where the action is:
        cd php

  2. When compiling from CVS you need to build the configure script:

Compiling, Installing and Testing

The remainder of the installation is identical to the process ftp php distribution. I didn't want to duplicate the steps, so click here to continue.