Datasheet
4
Part I ✦ PHP: The Basics
Strictly speaking, PHP has little to do with layout, events, on the fly DOM manipulation, or
really anything about what a Web page looks and sounds like. In fact, most of what PHP does
is invisible to the end user. Someone looking at a PHP page will not necessarily be able to tell
that it was not written purely in HTML, because usually the result of PHP is HTML.
PHP is an official module of Apache HTTP Server, the market-leading free Web server that
runs about 67 percent of the World Wide Web (according to the widely quoted Netcraft Web
server survey). This means that the PHP scripting engine can be built into the Web server
itself, leading to faster processing, more efficient memory allocation, and greatly simplified
maintenance. Like Apache Server, PHP is fully cross-platform, meaning it runs native on sev-
eral flavors of Unix, as well as on Windows and now on Mac OS X. All projects under the aegis
of the Apache Software Foundation— including PHP — are open source software.
What Is MySQL?
MySQL (pronounced My Ess Q El) is an open source, SQL Relational Database Management
System (RDBMS) that is free for many uses (more detail on that later). Early in its history,
MySQL occasionally faced opposition due to its lack of support for some core SQL constructs
such as subselects and foreign keys. Ultimately, however, MySQL found a broad, enthusiastic
user base for its liberal licensing terms, perky performance, and ease of use. Its acceptance
was aided in part by the wide variety of other technologies such as PHP, Java, Perl, Python,
and the like that have encouraged its use through stable, well-documented modules and
extensions. MySQL has not failed to reward the loyalty of these users with the addition of
both subselects and foreign keys as of the 4.1 series.
Databases in general are useful, arguably the most consistently useful family of software
products— the “killer product” of modern computing. Like many competing products, both
free and commercial, MySQL isn’t a database until you give it some structure and form. You
might think of this as the difference between a database and an RDBMS (that is, RDBMS plus
user requirements equals a database).
There’s lots more to say about MySQL, but then again, there’s lots more space in which to
say it.
The History of PHP
Rasmus Lerdorf—software engineer, Apache team member, and international man of
mystery — is the creator and original driving force behind PHP. The first part of PHP was devel-
oped for his personal use in late 1994. This was a CGI wrapper that helped him keep track of
people who looked at his personal site. The next year, he put together a package called the
Personal Home Page Tools (a.k.a. the PHP Construction Kit) in response to demand from users
who had stumbled into his work by chance or word of mouth. Version 2 was soon released
under the title PHP/FI and included the Form Interpreter, a tool for parsing SQL queries.
By the middle of 1997, PHP was being used on approximately 50,000 sites worldwide. It was
clearly becoming too big for any single person to handle, even someone as focused and ener-
getic as Rasmus. A small core development team now runs the project on the open source
“benevolent junta” model, with contributions from developers and users around the world.
Zeev Suraski and Andi Gutmans, the two Israeli programmers who developed the PHP3 and
PHP4 parsers, have also generalized and extended their work under the rubric of Zend.com
(Zeev, Andi, Zend, get it?).
03 557467 ch01.qxd 4/5/04 11:06 AM Page 4