Page tree
Skip to end of metadata
Go to start of metadata

Setting up the development enviroment

Apache log4php can be developed on many platforms including Linux, Mac and Windows. Most steps described in this chapter are not platform-specific, unless stated otherwise.


Log4php is designed to run on any version of PHP >= 5.2.0, however it is recommended to use the latest version of the 5.3.x branch.

On windows, you can grab pre-compiled binaries from

Instructions for other platforms can be found here.


Pear is a PHP package manager used to install packages required for log4php development.

To install it, go to the directory where you installed PHP and run:

php go-pear.php

Detailed installation instructions can be found here.


XDebug is used for generating the code coverage report.

Detailed installation instructions can be found here.

Install phpDocumentor

phpDocumentor is used to generate the API documentation.

To install it from a PEAR package, run

pear install PhpDocumentor

Alternatively, grab the binaries from the download page and install manually. After manual installation, make sure the phpdoc executable is in your path.

Installing PHPUnit

PHPUnit is used to perform unit testing.

To install from PEAR, run:

pear channel-discover
pear channel-discover
pear channel-discover
pear install phpunit/PHPUnit

The project website contains more detailed installation instructions.

Installing maven

Apache maven is used for automating the build process.

Maven requires a Java Runtime to be installed in order to run.

Download the latest binaries from the project's download page. Extract them to a desired location and add the /bin folder to the system path.

The first time it is run, maven may download additional required libraries. This may take some time, but only happens the first time.

  • No labels