Sams Teach Yourself PHP, MySQL and Apache All-in-One
โ Scribed by Julie C. Meloni
- Publisher
- Sams
- Year
- 2003
- Tongue
- English
- Leaves
- 645
- Series
- Sams Teach Yourself All in One
- Edition
- 2
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Sams Teach Yourself PHP, MySQL and Apache in 24 Hours combines these most popular open source Web development tools into one easy-to-understand book, packaged with one easy-to-use Starter Kit CD. This book teaches the reader to install, configure and set up the PHP scripting language, the MySQL database system, and the Apache Web server. By the end of this book the reader will understand how these technologies work, and more importantly, how they work together to create a dynamic Web site. After creating a simple Web site using these tools, the reader will be able to manage a simple mailing list, and to create an online address book, shopping cart, and storefront.Sams Teach Yourself PHP, MySQL and Apache in 24 Hours also teaches the reader how to fine-tune Apache and MySQL, and covers simple Web server security.
โฆ Table of Contents
Teach Yourself PHP, MySQLยฎ and Apache All in One......Page 2
Copyright......Page 3
Contents at a Glance......Page 4
Table of Contents......Page 6
About the Authors......Page 26
Acknowledgments......Page 27
Reader Services......Page 28
Introduction......Page 30
PART I Laying the Groundwork......Page 34
Current and Future Versions of MySQL......Page 36
Installing MySQL on Linux/Unix......Page 37
Installing MySQL on Windows......Page 38
Basic Security Guidelines......Page 45
Introducing the MySQL Privilege System......Page 47
Working with User Privileges......Page 49
Summary......Page 52
Workshop......Page 54
Current and Future Versions of Apache......Page 56
Choosing an Installation Method......Page 57
Installing Apache on Linux/Unix......Page 58
Installing Apache on Windows......Page 61
Apache Configuration File Structure......Page 64
Apache Log Files......Page 70
Apache-Related Commands......Page 71
Starting Apache for the First Time......Page 73
Troubleshooting......Page 75
Summary......Page 76
Workshop......Page 77
Current and Future Versions of PHP......Page 80
Building PHP on Linux/Unix with Apache......Page 81
Installing PHP Files on Windows......Page 84
php.ini Basics......Page 85
Testing Your Installation......Page 86
Getting Installation Help......Page 87
The Basics of PHP Scripts......Page 88
Summary......Page 94
Workshop......Page 95
PART II PHP Language Structure......Page 98
Variables......Page 100
Data Types......Page 103
Operators and Expressions......Page 108
Constants......Page 116
Summary......Page 118
Workshop......Page 119
Switching Flow......Page 122
Loops......Page 129
Code Blocks and Browser Output......Page 138
Summary......Page 139
Workshop......Page 141
What Is a Function?......Page 144
Calling Functions......Page 145
Defining a Function......Page 146
Returning Values from User-Defined Functions......Page 149
Variable Scope......Page 150
Saving State Between Function Calls with the static Statement......Page 153
More About Arguments......Page 155
Testing for the Existence of a Function......Page 159
Summary......Page 161
Workshop......Page 162
Creating Arrays......Page 164
Some Array-Related Functions......Page 168
Creating an Object......Page 169
Object Inheritance......Page 174
Summary......Page 176
Workshop......Page 177
PART III Getting Involved with the Code......Page 180
CHAPTER 8 Working with Strings, Dates, and Times......Page 182
Formatting Strings with PHP......Page 183
Investigating Strings in PHP......Page 191
Manipulating Strings with PHP......Page 195
Using Date and Time Functions in PHP......Page 201
Summary......Page 207
Workshop......Page 208
Creating a Simple Input Form......Page 210
Accessing Form Input with User-Defined Arrays......Page 212
Combining HTML and PHP Code on a Single Page......Page 215
Using Hidden Fields to Save State......Page 218
Redirecting the User......Page 219
Sending Mail on Form Submission......Page 220
Working with File Uploads......Page 226
Summary......Page 230
Workshop......Page 231
Session Function Overview......Page 232
Starting a Session......Page 233
Working with Session Variables......Page 234
Passing Session IDs in the Query String......Page 238
Destroying Sessions and Unsetting Variables......Page 239
Summary......Page 240
Workshop......Page 241
Including Files with include()......Page 242
Testing Files......Page 247
Opening a File for Writing, Reading, or Appending......Page 251
Reading from Files......Page 252
Writing or Appending to a File......Page 257
Working with Directories......Page 260
Summary......Page 263
Workshop......Page 264
Opening Pipes to and from Processes Using popen()......Page 266
Running Commands with exec()......Page 268
Running Commands with system() or passthru()......Page 270
Summary......Page 271
Workshop......Page 272
Understanding the Image-Creation Process......Page 274
Necessary Modifications to PHP......Page 275
Drawing a New Image......Page 276
Getting Fancy with Pie Charts......Page 280
Modifying Existing Images......Page 283
Summary......Page 286
Workshop......Page 287
PART IV PHP and MySQL Integration......Page 288
The Importance of Good Database Design......Page 290
Types of Table Relationships......Page 291
Understanding Normalization......Page 295
Following the Design Process......Page 299
Summary......Page 300
Workshop......Page 301
Learning the MySQL Data Types......Page 302
Learning the Table Creation Syntax......Page 306
Using the INSERT Command......Page 307
Using the SELECT Command......Page 309
Using WHERE in Your Queries......Page 312
Selecting from Multiple Tables......Page 314
Using the UPDATE Command to Modify Records......Page 318
Using the REPLACE Command......Page 321
Using the DELETE Command......Page 322
Frequently Used String Functions in MySQL......Page 325
Using Date and Time Functions in MySQL......Page 332
Summary......Page 344
Q&A......Page 346
Workshop......Page 347
Connecting to MySQL with PHP......Page 350
Working with MySQL Data......Page 354
Summary......Page 360
Workshop......Page 361
PART V Basic Projects......Page 362
Developing the Subscription Mechanism......Page 364
Developing the Mailing Mechanism......Page 371
Summary......Page 374
Workshop......Page 375
Planning and Creating the Database Tables......Page 376
Creating a Menu......Page 379
Creating the Record Addition Mechanism......Page 380
Viewing Records......Page 384
Creating the Record Deletion Mechanism......Page 390
Adding Subentries to a Record......Page 391
Summary......Page 397
Workshop......Page 398
Designing the Database Tables......Page 400
Creating the Input Forms and Scripts......Page 401
Displaying the Topic List......Page 404
Displaying the Posts in a Topic......Page 408
Adding Posts to a Topic......Page 411
Summary......Page 414
Planning and Creating the Database Tables......Page 416
Displaying Categories of Items......Page 420
Displaying Items......Page 424
Summary......Page 426
Workshop......Page 427
Planning and Creating the Database Tables......Page 428
Integrating the Cart with Your Storefront......Page 430
Payment Methods and the Checkout Sequence......Page 438
Summary......Page 440
Workshop......Page 441
Building a Simple Display Calendar......Page 442
Creating a Calendar Library......Page 449
Summary......Page 454
Workshop......Page 455
Authentication Overview......Page 456
Apache Authentication Module Functionality......Page 458
Using Apache for Access Control......Page 462
Combining Apache Access Methods......Page 465
Limiting Access Based on HTTP Methods......Page 466
Introducing Cookies......Page 467
Setting a Cookie with PHP......Page 468
Restricting Access Based on Cookie Values......Page 470
Summary......Page 475
Workshop......Page 476
Standard Apache Access Logging......Page 478
Standard Apache Error Logging......Page 484
Managing Apache Logs......Page 486
Logging Custom Information to a Database......Page 489
Summary......Page 493
Workshop......Page 494
About Internationalization and Localization......Page 496
About Character Sets......Page 497
Environment Modifications......Page 498
Creating a Localized Page Structure......Page 500
Summary......Page 505
Workshop......Page 506
PART VI Administration and Fine Tuning......Page 508
Scalability Issues......Page 510
Load Testing with ApacheBench......Page 514
Proactive Performance Tuning......Page 516
Preventing Abuse......Page 518
Implementing Virtual Hosting......Page 519
Summary......Page 524
Q&A......Page 525
The Need for Security......Page 528
The SSL Protocol......Page 529
Obtaining and Installing SSL Tools......Page 534
Managing Certificates......Page 537
SSL Configuration......Page 540
Summary......Page 541
Q&A......Page 542
Building an Optimized Platform......Page 544
MySQL Startup Options......Page 546
Optimizing Your Table Structure......Page 548
Optimizing Your Queries......Page 549
Using the FLUSH Command......Page 550
Using the SHOW Command......Page 551
Summary......Page 557
Workshop......Page 559
Staying in the Loop......Page 562
Upgrading Apache......Page 564
Upgrading PHP......Page 565
Summary......Page 566
Workshop......Page 567
PART VII Looking Toward the Future......Page 568
Whatโs Wrong With PHP 4?......Page 570
The New Object Model......Page 571
Additional New Features......Page 573
Summary......Page 574
Q&A......Page 575
Using Subqueries......Page 576
Additional New Functionality......Page 580
Summary......Page 581
Workshop......Page 582
PART VIII Appendix......Page 584
Linux/Unix Installation......Page 586
Windows Installation......Page 590
Troubleshooting......Page 597
Index......Page 598
๐ SIMILAR VOLUMES
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 on
You own your own business. You have also created a website for your business that details the products or services that you offer, but it doesn't allow potential customers to purchase anything online. Don't risk losing business-learn to create a dynamic online environment using only three programs.
You own your own business. You have also created a website for your business that details the products or services that you offer, but it doesn't allow potential customers to purchase anything online. Don't risk losing business-learn to create a dynamic online environment using only three programs.
Three popular Web development tools, covered together in an easy-to-understand book. Carefully steps the reader through the basic installation and set-up of PHP, MySQL, and Apache. Shows the beginner how to combine these technologies to quickly create simple interactive Web applications. CD-ROM Star
<P><I>Sams Teach Yourself PHP, MySQL and Apache in 24 Hours</I> combines these most popular open source Web development tools into one easy-to-understand book, packaged with one easy-to-use Starter Kit CD. This book teaches the reader to install, configure and set up the PHP scripting language, the