Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000010068026 | QA76.73.S67 C63 2004 | Open Access Book | Book | Searching... |
On Order
Summary
Summary
* Covers the entire open source Web platform known as LAMP, which includes Linux, Apache, MySQL, and PHP, the basis for many dynamic data-driven Web sites
* Seven convenient minibooks provide easy reference on open source and team development, working with Linux and Apache, automating Web sites with Perl, developing front-end applications with Tcl/TK, creating dynamic Web pages with PHP, accessing Web databases with MySQL, and processing Web files with regular expressions
* Includes valuable, hard-to-find coverage of collaboration, file sharing, and version control with CVS
* PHP is running on over nine million sites, with an average increase of 6.5 percent monthly over the past two years; Apache Web servers handle seventy percent of Web content
Author Notes
Jeff Cogswell, is a software engineer, writer, consultant, and educator
Table of Contents
Introduction | p. 1 |
About This Book | p. 1 |
Foolish Assumptions | p. 2 |
Conventions Used in This Book | p. 3 |
How This Book Is Organized | p. 3 |
Book I Configuring Linux and Windows for Apache | p. 3 |
Book II Building an Apache Web Site | p. 3 |
Book III Perl Web Site Automation | p. 4 |
Book IV Tcl/Tk Front End Development | p. 4 |
Book V PHP Web Pages for Dynamic Content | p. 4 |
Book VI MySQL Databases on the Web | p. 4 |
Book VII Processing Web Files with Regular Expressions | p. 5 |
Book VIII Appendixes | p. 5 |
Icons Used in This Book | p. 5 |
Getting Started | p. 6 |
Book I Configuring Linux and Windows for Apache | p. 7 |
Chapter 1 Configuring Linux | p. 9 |
Getting a Handle on TCP and UDP Services | p. 10 |
No Sharing: NFS/RPC | p. 14 |
Misleading Binaries (SUID/GUID Binaries) | p. 15 |
Protection with Firewalls | p. 16 |
Playing Games: IP Masquerade | p. 19 |
Keeping on Top with Logging | p. 20 |
Chapter 2 Configuring Windows | p. 23 |
Securing Windows during Setup | p. 23 |
Keeping Up with Patches and Updates | p. 29 |
Analyzing with MBSA | p. 30 |
Getting Windows behind a Firewall | p. 31 |
Chapter 3 Ten Third-Party Packages That Enhance Security | p. 33 |
Locking Down with Bastille | p. 33 |
Linux Intrusion Detection with LIDS | p. 34 |
Starting Easy with Guarddog | p. 34 |
Taking Control with Firestarter | p. 35 |
WinRoute Firewall | p. 36 |
ZoneAlarm | p. 37 |
Snort | p. 37 |
ACID | p. 38 |
Opening the Box: Pandora | p. 38 |
Getting In with Nessus | p. 39 |
Book II Building an Apache Web Site | p. 41 |
Chapter 1 Introducing the Apache Web Server | p. 43 |
The Advantages to Using the Apache Web Server | p. 43 |
Understanding How Apache Works | p. 44 |
Taking a Look at the Apache Architecture | p. 49 |
Chapter 2 Installing Apache | p. 51 |
Getting Apache from the Web | p. 51 |
Installing Apache from Source Files | p. 53 |
Installing Apache from Binaries | p. 56 |
Installation Options | p. 58 |
Starting and Stopping Apache | p. 61 |
Troubleshooting Apache | p. 64 |
Running Multiple Apache Servers | p. 66 |
Chapter 3 Configuring Apache | p. 67 |
Understanding Configuration Files | p. 67 |
Using Directives | p. 69 |
Running Scripts | p. 77 |
Configuring Directories and Files | p. 79 |
Configuring Virtual Hosts | p. 84 |
Chapter 4 Apache Modules | p. 87 |
Installing Modules | p. 87 |
Some Useful Modules | p. 89 |
Chapter 5 Ten Security Tips | p. 93 |
Update Regularly | p. 93 |
Restrict Access to the Apache Directory | p. 93 |
Don't Run Your Server as Root | p. 93 |
Monitor Server Requests | p. 94 |
Use a Restricted Default Directory | p. 94 |
Don't Let Users See Your Files | p. 94 |
Limit CGI Scripts | p. 94 |
Don't Allow .htaccess Files | p. 94 |
Use suEXEC Carefully | p. 95 |
Use SSL for Important Communications | p. 95 |
Book III Perl Web Site Automation | p. 97 |
Chapter 1 Introducing Perl | p. 99 |
Trying Out a Simple Perl Program | p. 99 |
Processing Text Files | p. 103 |
Running as a CGI script | p. 104 |
Interacting with Web Servers | p. 105 |
Navigating the Perl Online Help | p. 105 |
Chapter 2 Simple Data Types | p. 107 |
Storing Data in Variables | p. 108 |
Storing Single Items as Scalars | p. 109 |
Storing Lists of Items | p. 115 |
Associating Data with Hashes | p. 121 |
Understanding Scalar Context and List Context | p. 122 |
Chapter 3 Comparing and Testing Variables | p. 125 |
Testing Conditions | p. 125 |
Performing Actions Based on Conditions | p. 129 |
Making Consecutive Comparisons | p. 130 |
Comparing in Different Ways | p. 133 |
Performing Comparisons Together | p. 136 |
Chapter 4 Controlling the Structure of Your Program | p. 137 |
Looping | p. 138 |
Subroutines | p. 148 |
Chapter 5 Processing Text Files and Directories | p. 157 |
Processing Directories | p. 158 |
Processing Files | p. 161 |
Chapter 6 Advanced Perl Coding | p. 169 |
Accessing Data through References | p. 169 |
Building Objects | p. 174 |
Manipulating Dates and Times | p. 183 |
Chapter 7 Perl and CGI Scripts | p. 191 |
Configuring Apache for CGI | p. 192 |
Writing a Simple CGI Script | p. 195 |
Reading Information Passed to the CGI Script | p. 197 |
Writing CGI Scripts with CGI.pm | p. 200 |
Displaying Errors and Warnings | p. 204 |
Chapter 8 Ten Useful Perl Functions | p. 207 |
Sorting an Array | p. 207 |
Reversing an Array | p. 208 |
Obtaining the Length of an Array | p. 209 |
Treating an Array as a Stack Structure | p. 209 |
Treating an Array as a Queue Structure | p. 210 |
Converting Hex to Decimal | p. 212 |
Obtaining a Random Number | p. 213 |
Searching and Replace Substrings | p. 214 |
Converting a String to Uppercase or Lowercase | p. 215 |
Book IV Tcl/Tk Front End Development | p. 217 |
Chapter 1 What Are Tcl and Tk? | p. 219 |
Trying Out Tcl | p. 219 |
Creating a Simple Tcl Program | p. 223 |
Chapter 2 Processing Variables and Expressions | p. 227 |
Evaluating Expressions | p. 227 |
Processing Strings | p. 232 |
Storing and Manipulating Lists of Data | p. 243 |
Chapter 3 Controlling the Structure | p. 249 |
Choosing Conditions | p. 249 |
Looping with Various Commands | p. 259 |
Chapter 4 Building Procedures | p. 265 |
Creating a Simple Procedure | p. 265 |
Passing Parameters to a Procedure | p. 266 |
Returning a Value from a Procedure | p. 268 |
Passing Multiple Parameters | p. 270 |
Chapter 5 Manipulating Files | p. 273 |
Creating a New File and Writing to It | p. 273 |
Opening a File and Reading from It | p. 274 |
Appending to an Existing File | p. 276 |
Finding Out Information about a File | p. 277 |
Managing Files and Directories | p. 278 |
Creating File Links | p. 280 |
Chapter 6 Programming with the Tcl Packages | p. 283 |
Accessing Files on the Web | p. 283 |
Manipulating Text | p. 284 |
Building Advanced Data Structures | p. 286 |
Chapter 7 Designing GUIs with Tk | p. 291 |
A Hierarchy of Widgets and Names | p. 292 |
Creating a Simple Window | p. 294 |
Adding a Button to a Window | p. 295 |
Creating a Listbox (And More on the Pack and Bind Commands) | p. 297 |
Creating a Second Window | p. 300 |
Adding a Menu Bar to a Window | p. 301 |
Attaching a Menu to a Button | p. 302 |
Sliding Across the Numbers with a Scale | p. 304 |
Changing a Control Such As a Label's Text | p. 306 |
Chapter 8 Arranging Controls, Drawing Pictures, and Handling Text | p. 309 |
Arranging Controls with Geometry Managers | p. 309 |
Drawing on a Canvas | p. 317 |
Processing Text with a Text Widget | p. 325 |
Chapter 9 Displaying Standard Dialog Boxes in Tk | p. 333 |
Getting Input from a Message Box | p. 333 |
Selecting a Directory | p. 335 |
Choosing a File to Open | p. 336 |
Picking a Filename to Save | p. 337 |
Grabbing a Color | p. 338 |
Making a Lifesaving Decision (Or Just Getting Information) | p. 339 |
Chapter 10 Ten Useful Tcl/Tk Tools | p. 341 |
Tk GUI Designers | p. 341 |
Developer Tools | p. 343 |
Book V PHP Web Pages for Dynamic Content | p. 345 |
Chapter 1 What You Can Do with PHP | p. 347 |
Introducing PHP Function Libraries | p. 348 |
Adding Dynamic Content | p. 349 |
Running Types of Applications | p. 351 |
Chapter 2 Writing Server-Side Scripts | p. 353 |
Exploring the PHP Processor | p. 355 |
Starting and Ending PHP Code | p. 357 |
Using Appropriate Filename Extensions | p. 358 |
Converting PHP to HTML | p. 359 |
Dealing with Errors in Your PHP Code | p. 365 |
Exploring Some PHP Ground Rules | p. 365 |
Getting Help with PHP | p. 366 |
Chapter 3 Storing Information | p. 367 |
Naming Variables | p. 367 |
Storing Information in Variables | p. 368 |
Understanding Data Types | p. 369 |
Determining Whether a Variable Exists | p. 371 |
Removing Variables | p. 371 |
Expressing Your Variables and Other Expressions | p. 372 |
Stringing Up Characters with Strings | p. 377 |
Chapter 4 Controlling the Program Flow | p. 385 |
Comparing with if Statements | p. 385 |
Looping with while | p. 388 |
Doing for Loops | p. 390 |
Comparing with switch Statements | p. 393 |
Breaking and Continuing Your Loops | p. 397 |
Building HTML Tables with Loops | p. 398 |
Chapter 5 Arrays and Functions | p. 401 |
Gathering Data into Arrays | p. 401 |
Calling Code with Functions | p. 412 |
Chapter 6 Interacting with HTML | p. 417 |
Getting Data from an HTML Form | p. 417 |
Sending Headers and REdirecting HTML Pages | p. 425 |
Setting and Retrieving Cookies | p. 429 |
Providing User Authentication | p. 431 |
Chapter 7 Advanced Programming with PHP | p. 435 |
Including and Requiring Other PHP Files | p. 435 |
Advanced Coding with Variables | p. 443 |
Processing Strings | p. 449 |
Chapter 8 Creating Graphics | p. 453 |
Creating Bars and Graphs without Using Extra Libraries | p. 453 |
Creating Graphics Files | p. 456 |
Creating Thumbnail Images | p. 462 |
Chapter 9 Modeling Data with Classes | p. 465 |
Building Classes | p. 465 |
Constructing and Destructing Objects | p. 467 |
Coding for Dynamic Binding | p. 469 |
Inheriting and Deriving Objects | p. 470 |
Getting Information on Classes | p. 472 |
Chapter 10 Ten Ways to Enhance Your Web Site | p. 475 |
Redirect index.html to index.php | p. 475 |
Display the Current Time | p. 476 |
Dynamically Generate Style Sheets | p. 477 |
Allow File Uploads | p. 478 |
Use POST When Appropriate | p. 481 |
Randomly Generate Picture-of-the-Day Images | p. 482 |
Write Text from a File | p. 482 |
Determine Which Browser Is Running | p. 483 |
Create a Random Link | p. 484 |
Determine Host Names from IP Addresses | p. 485 |
Book VI MySQL Databases on the Web | p. 487 |
Chapter 1 What Is MySQL? | p. 489 |
Connecting MySQL and PHP on the Web | p. 490 |
Starting MySQL | p. 492 |
Adding MySQL Users | p. 495 |
Chapter 2 Managing Databases and Tables | p. 505 |
Managing a Database | p. 506 |
Managing Tables | p. 511 |
Chapter 3 Relating Your Data | p. 519 |
Dividing Your Data into Tables | p. 519 |
Typing the Data in a Table | p. 528 |
Creating the Databases and Tables | p. 530 |
Chapter 4 Accessing MySQL from PHP | p. 537 |
Connecting to MySQL from PHP | p. 537 |
Adding MySQL Data with PHP | p. 540 |
Displaying MySQL Data on a Web Page | p. 549 |
Chapter 5 Querying with SQL and PHP | p. 553 |
Creating a Lookup Form | p. 553 |
Modifying Data with a Web Page | p. 557 |
Chapter 6 Accessing MySQL from Perl | p. 567 |
Obtaining the Perl DBI and MySQL Components on Windows | p. 567 |
Connecting to a Database and Performing a Simple Query | p. 569 |
Querying the Database | p. 570 |
Modifying the Database | p. 573 |
Chapter 7 Creating a Username System for Your Web Site | p. 577 |
Creating the Login Tables | p. 578 |
Building the Registration System | p. 580 |
Designing a Login Form | p. 583 |
Coding the Access Routines in a Single .php File | p. 586 |
Helping Users Who Forgot Their Passwords | p. 594 |
Chapter 8 Ten Ways to Enhance a Web Site with Databases | p. 599 |
Programming an Online User Poll | p. 599 |
Adding a Hit Counter | p. 600 |
Performing Advanced Queries | p. 600 |
Creating Databases That Support Transactions | p. 601 |
Building a Forum or Message Board | p. 602 |
Creating a Journal or Daily Note | p. 603 |
Adding an Administrator-Only Section | p. 603 |
Building a Distributed Database | p. 603 |
Tracking Scores for Games | p. 604 |
Tracking Usage Information | p. 604 |
Book VII Processing Web Files with Regular Expressions | p. 607 |
Chapter 1 Why Use Regular Expressions? | p. 609 |
Getting to Know Regular Expressions | p. 609 |
Trying Out Regexes in Tcl and PHP | p. 621 |
Chapter 2 Following the Syntax of Regular Expressions | p. 623 |
Matching Multiple Characters Using Quantifiers | p. 624 |
Matching Special Characters | p. 626 |
Chapter 3 Customizing, Searching, and Replacing | p. 637 |
Preventing Extra Characters at the Beginning and End | p. 637 |
Customizing the Regex Engine While Matching | p. 640 |
Searching and Replacing | p. 643 |
Chapter 4 Grouping and Capturing | p. 649 |
Grouping with Alternative Words | p. 649 |
Capturing Text from a Match | p. 651 |
Side Effects with Alternatives and Accidental Captures | p. 656 |
Chapter 5 Joining, Splitting, and Making Up | p. 659 |
Splitting All Over the Place | p. 660 |
Joining Together with the Band | p. 665 |
Chapter 6 Processing Multiple Lines and Files | p. 667 |
Processing Multiline Strings | p. 668 |
Searching for All Lines in a File That Contain a Pattern | p. 671 |
Modifying Multiple Newlines | p. 672 |
Chapter 7 Processing HTML Files | p. 677 |
Building a Form Based on a List of Strings | p. 677 |
Automatically Creating Size Information for IMG Tags | p. 679 |
Extracting All the HTML Text | p. 682 |
Searching Only the Text Portion of an HTML File | p. 685 |
Chapter 8 Ten Regular Expression Gotchas | p. 687 |
Trying to Cram Multiple Tasks into a Single Expression | p. 687 |
Accidentally Capturing Alternatives | p. 688 |
Capturing Too Much Due to Greediness | p. 688 |
Doing a Search When You Mean to Replace | p. 688 |
Writing Code That Accidentally Ignores the Backslashes | p. 689 |
Attempting to Use a Feature That's Not Present | p. 689 |
Getting the Uppercase and Lowercase Wrong | p. 689 |
Forgetting to Include the Delimiters (Especially in PHP) | p. 690 |
Forgetting the Global Option | p. 690 |
Mixing Up Singleline, Multiline, and the Default | p. 691 |
Book VIII Appendixes | p. 693 |
Appendix A Managing Files with CVS | p. 695 |
Taking a Closer Look at CVS | p. 695 |
Getting CVS | p. 696 |
Using CVS | p. 697 |
Creating a CVS Repository and Project | p. 703 |
Browsing CVS Repositories from the Web | p. 705 |
Appendix B Understanding Open-Source Licenses | p. 707 |
What Is Open Source? | p. 707 |
How Do People Make Money? | p. 708 |
What Is an Open-Source License? | p. 708 |
Index | p. 711 |