Installing PHP
PHP is available for many operating systems and platforms. The most common setup, however, is to use PHP as a module for the Apache web server on a Unix machine. This section briefly describes how to install Apache with PHP. If you’re interested in running PHP on Windows, see Chapter 15, which explains many of your options for that operating system.
To install Apache with PHP, you’ll need a Unix machine with an ANSI-compliant C compiler, and around 10 MB of available disk space for source and object files. You’ll also need Internet access to fetch the source code for PHP and Apache.
Start by downloading the source distributions of PHP and Apache.
The latest files are always available from the web sites for the
respective tools. Since there are so many options on
installation , we are showing here the generic installation
instructions for a Linux server as shown on the PHP web site at
http://ca3.php.net/manual/en/install.unix.php.
You will have to replace the xxx signifier in
the following steps with the version of the software that you choose to
install.
Tip
Although Apache has a Version 2.x you may find that it is more adept at serving PHP with Version 1.3.xx, so generally we will be using the 1.3.xx version throughout this book.
gunzip apache_xxx.tar.gztar -xvf apache_xxx.targunzip php-xxx.tar.gztar -xvf php-xxx.tarcd apache_xxx.
/configure --prefix=/www --enable-module=somakemake installcd ../php-xxxNow, configure your PHP. This is where you customize your ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access