PHP on Apache: The Definitive Installation Guide Page 7

The binary packages of this distribution do not include
the source elements you need to build version 1.3.6 or later of the Apache Web
server. Either install an Apache 1.3 source package from the distribution (if
available), or download the Apache source and build it by hand. (See the
"Building Apache at Lightspeed" section of this article.)

Install the apache,
apache-devel, and freetype-devel packages in order to
build PHP with apxs.

There's a problem with the Apache RPMs in Red Hat's 6.1
distribution. See the "Fixing Red Hat 6.1's apxs Script" Appendix for
details.

Appendix C: Fixing Red Hat 6.1's apxs Script

The apache-devel RPM included in the original Red Hat 6.1
distribution contains a broken version of the apxs script, which
will prevent you from using it with PHP (or any other module). It's possible
that a later redistribution of 6.1 (such as CDs made and passed around by a
Linux user group) may have this problem fixedbut just in case, check
/usr/sbin/apxs. If somewhere near line 81 you see

my = 'modules';

then change 'modules' to '/usr/lib/apache'. Next,
look for lines that look like this:

my = 'gcc';
my = q(-shared);

If the lines in your /usr/sbin/apxs script look something like
this, and the line has been corrected, you should
be in good shape to build PHP. You can find more details in the
./php/php3/INSTALL.REDHAT file included in the PHP distribution.