Chapter 1: Installation
Welcome to the Show
Over the course of this book, it will be my job to guide you as you
take your first steps beyond the HTML world of client-side site design. Together
we'll explore what it takes to build the kind of large, content-driven sites
that are so successful today, but which can be a real headache to maintain
if they aren't done right.Before we get started, you need to gather together the tools you'll
need for the job. In this first chapter, I'll guide you as you download and
set up the two software packages you'll need: PHP and MySQL.PHP is
a server-side scripting language. You can think of it as a "plug-in" for your
Web server that will allow it to do more than just send plain Web pages when
browsers request them. With PHP installed, your Web server will be able to
read a new kind of file (called a PHP script) that
can do things like retrieve up-to-the-minute information from a database and
insert it into a Web page before sending it to the browser that requested
it. PHP is completely free to download and use.To retrieve information from a database, you first need to have a
database. That's where MySQL comes
in. MySQL is a relational database management system, or RDBMS. Exactly what
role it plays and how it works we'll get into later, but basically it's a
software package that is very good at the organization and management of large
amounts of information. MySQL also makes that information really easy to access
with server-side scripting languages like PHP. MySQL is released under the
GNU General Public License (GPL), and is thus free for most uses on all of
the platforms it supports. This includes most Unix-based platforms, like Linux
and even Mac OS X, as well as Windows.If you're lucky, your current Web host may already have installed MySQL
and PHP on your Web server for you. If that's the case, much of this chapter
will not apply to you, and you can skip straight to "If Your Web Host Provides PHP and MySQL" to
make sure your setup is ship shape.Everything we'll discuss in this book may be done on a Windows- or Unix-based[1] server. The installation procedure will differ in accordance with
the type of server you have at your disposal. The next few sections deal with
installation on a Windows-based Web server, installation under Linux, and
installation on Mac OS X. Unless you're especially curious, you need only
read the section that applies to you.[1]From this point forward, I'll refer to all Unix-style platforms supported
by PHP and MySQL, such as Linux, FreeBSD, and Mac OS X, with the collective
name 'Unix'.