HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
In just a short time, you can learn how to use PHP, MySQL, and Apache together to create dynamic, interactive websites and applications using the three leading open-source web development technologies. Using a straightforward, step-by-step approach, each lesson in this book builds on the previous ones, enabling you to learn the essentials of PHP scripting, MySQL databases, and the Apache web server from the ground up.
Regardless of whether you run Linux, Windows, or Mac OS X, the enclosed CD includes a complete starter kit that lets you install all the software you need to set up a stable environment for learning, testing, and production.
Julie C. Meloni is a technical consultant who has been developing web-based applications since the Web first saw the light of day. She has authored numerous books and articles on web application development and HTML/CSS, and you can find translations of her work in 18 different languages.
Learn how to…
• Install, configure, and set up the PHP scripting language, the MySQL database system, and the Apache Web server
• Get these technologies to work together to create a dynamic, database-backed website
• Interact with MySQL using PHP
• Work with forms and files
• Create a web-based discussion forum or mailing list
• Add a storefront and shopping cart to your site
• Optimize your MySQL databases
• Fine-tune the Apache server’s performance
• Restrict access to your applications
• Set up a secure web server
CD-ROM Includes
A complete PHP, MySQL, and
Apache starter kit for Windows®, Linux®, or Mac® OS X.
Managing a Simple Mailing List in PHP and MySQL
Download the sample pages (includes Chapter 19 and Index)
Introduction 1
PART I: Getting Up and Running
CHAPTER 1: Installation QuickStart Guide with XAMPP 5
Using Third-Party Installation Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Installing XAMPP on Linux/UNIX . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . 6
Installing XAMPP on Windows . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . 8
Installing XAMPP on Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Securing XAMPP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
CHAPTER 2: Installing and Configuring MySQL 15
Current and Future Versions of MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
How to Get MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Installing MySQL on Linux/UNIX . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . 16
Installing MySQL on Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . 18
Installing MySQL on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Troubleshooting Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Basic Security Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Introducing the MySQL Privilege System. . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Q&A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
CHAPTER 3: Installing and Configuring Apache 37
Current and Future Versions of Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Choosing the Appropriate Installation Method . . . . . . . . . . . . . . . . . . . . 38
Installing Apache on Linux/UNIX . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . 39
Installing Apache on Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Installing Apache on Windows . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . 42
Apache Configuration File Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Apache Log Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .