Marktplatzangebote
Ein Angebot für € 19,90 €
  • Broschiertes Buch

The all-in-one PHP, MySQL, and Apache beginner's guide: all essentials of modern PHP/MySQL web development in one easy, complete package!
Updated to cover PHP 5.3, MySQL 5.1, and the latest versions of Apache
Carefully walks through setting up PHP, MySQL, and Apache, and then using them together
Short, simple lessons teach hands-on skills readers can use immediately
CD contains all software needed to use these technologies on Windows, Mac, and Linux
Sams Teach Yourself PHP, MySQL, and Apache All in One, Fifth Edition brings together everything beginners need to build powerful
…mehr

Produktbeschreibung
The all-in-one PHP, MySQL, and Apache beginner's guide: all essentials of modern PHP/MySQL web development in one easy, complete package!

Updated to cover PHP 5.3, MySQL 5.1, and the latest versions of Apache

Carefully walks through setting up PHP, MySQL, and Apache, and then using them together

Short, simple lessons teach hands-on skills readers can use immediately

CD contains all software needed to use these technologies on Windows, Mac, and Linux

Sams Teach Yourself PHP, MySQL, and Apache All in One, Fifth Edition brings together everything beginners need to build powerful web applications with PHP 5.3, MySQL 5.1/5.x, and the latest versions of Apache - whether they use Windows, Mac, or Linux platforms. Bestselling author Julie Meloni (Sams Teach Yourself HTML and CSS in 24 Hours) teaches simply and clearly, through brief, hands-on lessons focused on knowledge you can apply immediately. Meloni covers all the building blocks of practical web development with PHP and MySQL, integrating modern techniques and new software capabilities throughout. Each lesson builds on what's come before, showing how to configure PHP, MySQL, and Apache, and then use them together to create integrated solutions. Coverage includes: " Mastering PHP core features, including flow control, functions, arrays, and objects " Using strings, dates/times, forms, cookies, user sessions, files/directories, and images " Building AJAX-style applications " Designing effective databases using SQL, transactions, and stored procedures " Creating address books, mailing lists, forums, calendars, and storefronts " Logging, monitoring, and restricting access to web applications " Working with XML and connecting to web services " Administering and tuning web applications - including security, performance, and virtual hosting

Product Description
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.

Features + Benefits

Updated to cover PHP 5.3, MySQL 5.1, and the latest versions of Apache

Carefully walks through setting up PHP, MySQL, and Apache, and then using them together

Short, simple lessons teach hands-on skills readers can use immediately

CD contains all software needed to use these technologies on Windows, Mac, and Linux

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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Apache-Related Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Starting Apache for the First Time . . . . . . . . . . . . . . . . . . . . . . . 53

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Q&A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

CHAPTER 4: Installing and Configuring PHP 59

Current and Future Versions of PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Building PHP on Linux/UNIX with Apache . . . . . . . . . . . . . . . . . . . . . . . . . 60

Installing PHP on Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Installing PHP on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

php.ini Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Testing Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . 65

Getting Installation Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

The Basics of PHP Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

Q&A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . 73

Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . 74

PART II: PHP Language Structure

CHAPTER 5: The Building Blocks of PHP 75

Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Operators and Expressions . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . 85

Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Q&A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

CHAPTER 6: Flow Control Functions in PHP 99

Switching Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Code Blocks and Browser Output . . . . . . . . . . . . . . . . . . . . . . . . . 114

Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

Q&A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . 116

CHAPTER 7: Working with Functions 119

What Is a Function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

Calling Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

Defining a Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Returning Values from User-Defined Functions. . . . . . . . . . . . . . . . 124

Variable Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sams Teach Yourself PHP, MySQL, and Apache All in One, Fifth Edition brings together everything beginners need to build powerful web applications with PHP 5.3, MySQL 5.1/5.x, and the latest versions of Apache - whether they use Windows, Mac, or Linux platforms. Bestselling author Julie Meloni ( Sams Teach Yourself HTML and CSS in 24 Hours ) teaches simply and clearly, through brief, hands-on lessons focused on knowledge readers can apply immediately. Meloni covers all the building blocks of practical web development with PHP and MySQL, integrating modern techniques and new software capabilities throughout. Each lesson builds on what's come before, showing how to configure PHP, MySQL, and Apache, and then use them together to create integrated solutions. Coverage includes: Mastering PHP core features, including flow control, functions, arrays, and objects Using strings, dates/times, forms, cookies, user sessions, files/directories, and images Building AJAX-style applications Designing effective databases using SQL, transactions, and stored procedures Creating address books, mailing lists, forums, calendars, and storefronts Logging, monitoring, and restricting access to web applications Working with XML and connecting to web services Administering and tuning web applications - including security, performance, and virtual hosting