PHP and the build process (/.configure, make and install): orientation, please

I'm a newbie and after I've successfully learnt enough to build my simple but useful web services, I managed to put myself in a position where I need to configure my own PHP build.

The problem is I don't really know what build means --never built anything either.

My broad question is: Any good step by step tutorial that doesn't just say "must have dependencies"?

My specific question is: For instance, one that shows how to build PHP with odbc, then rebuild (configure.nice and make nice?) with imap in addition.

If someone finds a PHP bundle that comes with odbc, great; with odbc & imap, better. But I'm really looking for someone to show me how to fish. Please.

Thnx. A.


Gazler is correct, for a simple setup, you can just configure Ubuntu through the repositories via apt-get. For RHEL-based systems - yum would be the equivalent. However, if you are wanting to know more of how to compile from scratch (which would give you more control over installation), then you can do so.

Basics of compiling an application:

  1. Download source from website (such as PHP,
  2. untar the source (tar -xzvf source.tar.gz)
  3. cd source
  4. Configure the source (./configure [install-option-flags])
  5. Compile source (make)
  6. Test Install (doesn't actually install) - make test
  7. Install the software (make install)

Step 4 is a very broad step. You will need to figure out what options you want to configure - see PHP Core Configuration Options.

Requirements for installing PHP will differ between environments, so that's too broad to cover in one answer, however, you will at least need a c-compiler to compile the source. Usually gcc is my choice, and is usually installed already. On Ubuntu (Debian-based) use apt-get install build-essential or search and install via yum on RHEL-based systems, I believe it would be something like yum install gcc.

You will probably run into dependencies issues as you compile, as I said its a very broad step, however, once you figure out the requirements that you need, you should be good to go, so long as you document your steps for your environment.

Again, the easiest way to go is to install via your software repository (apt-get, yum, emerge, pacman, etc), but these don't give you as much leverage on controlling your environment installation, whereas building from source gives you all the configuration control that you'd need.

Need Your Help

how do we know the first 4 bytes read on a tcp socket are the length of the message?

python sockets tcp

The "Sending and receiving logging events across a network" section of the python logging cookbook demonstrates how a clients can send logs via a TCP session.