[ Team LiB ] • Table of Contents Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP By James Lee, Brent Ware Publisher: Addison Wesley Date Published: December 17, 2002 ISBN: 0-201-77061-X Pages: 496 Open Source technologies are providing contemporary developers with a range of cost-effective and robust alternatives to commercial software for building dynamic, data-driven Web applications. This practical guide presents a comprehensive survey of LAMP (Linux, Apache, MySQL, Perl, and PHP), and it shows how these solutions can be implemented efficiently and securely while improving reliability and dramatically cutting costs. Open Source Web Development with LAMP focuses on the most important core material necessary so that developers can "hit the ground running" and begin building applications right away. This book presents a balanced overview of LAMP technologies and allows the reader to decide which tool may be appropriate for the particular task at hand. After a general overview of Open Source technologies, the book presents an overview of the Web before moving on to cover structural, static, dynamic, and embedded technologies. The coverage here provides a description of the strengths and weaknesses of each Open Source technology and also acts as a reference guide for each application. Topics covered include: A comprehensive survey of Open Source technologies Static and dynamic data and embedded HTML on the Web Linux and Unix distributions, installations, and commands Apache Web Server, Perl, and MySQL Web site META language (WML) Common gateway interface (CGI) and mod_perl Server Side Includes (SSI), Embperl, and Mason PHP syntax and functions In addition to the discussions in the book, a companion Web site-www.opensourcewebbook.com-contains supplemental information, including tools, source code, helpful links to additional resources, and errata as needed. Complete in coverage and practical in presentation, Open Source Web Development with LAMP spotlights the tools and technologies today's developers need to create workable, dynamic, and secure Web sites using Open Source technologies. [ Team LiB ] [ Team LiB ] • Table of Contents Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP By James Lee, Brent Ware Publisher: Addison Wesley Date Published: December 17, 2002 ISBN: 0-201-77061-X Pages: 496 Copyright Foreword Preface Is This Book for You? What It Will Do Four Parts Does This Free Software Come with .docs? The Old Bait and Switch Companion Web Site Acknowledgments About the Authors Introduction Section I.1. The Best of All Possible Worlds... Section I.2. Open Source Software Section I.3. Summary Section I.4. Resources Part I: Structural Chapter 1. The Web Explained Section 1.1. How It Works Section 1.2. What We Don't Talk About Section 1.3. Security Section 1.4. Summary Section 1.5. Resources Chapter 2. Linux?The Choice of a GNU Generation Section 2.1. Introduction Section 2.2. Basic Unix Section 2.3. Summary Section 2.4. Resources Chapter 3. Apache Web Server Section 3.1. Introduction Section 3.2. Starting, Stopping, and Restarting Apache Section 3.3. Configuration Section 3.4. Securing Apache Section 3.5. Create the Web Site Section 3.6. Apache Log Files Section 3.7. Summary Section 3.8. Resources Chapter 4. Perl Section 4.1. Introduction Section 4.2. Perl Documentation Section 4.3. Perl Syntax Rules Section 4.4. A Quick Introduction To Object-Oriented Programming Section 4.5. What We Didn't Talk About Section 4.6. Summary Section 4.7. Resources Chapter 5. MySQL Section 5.1. Introduction Section 5.2. Tutorial Section 5.3. Database Independent Interface Section 5.4. Table Joins Section 5.5. Loading and Dumping a Database Section 5.6. Summary Section 5.7. Resources Part II: Static Chapter 6. Website META Language Section 6.1. Introduction Section 6.2. Installation Section 6.3. The Basics Section 6.4. Creating a Template Section 6.5. Other Helpful Includes Section 6.6. Diversion Section 6.7. A Better Template Section 6.8. Configuring WML with .wmlrc Section 6.9. Macros?Creating Custom Tags Section 6.10. Programming Code?eperl Section 6.11. Project Section 6.12. Summary Part III: Dynamic Chapter 7. The Common Gateway Interface Section 7.1. Introduction Section 7.2. Apache Configuration Section 7.3. A First CGI Program Section 7.4. What Can Go Wrong? Section 7.5. CGI.pm Introduced Section 7.6. CGI.pm HTML Shortcuts Section 7.7. Information Received by the CGI Program Section 7.8. Form Widget Methods Section 7.9. CGI Security Considerations Section 7.10. A Note About die() Section 7.11. Project?CGI/MySQL/DBI Section 7.12. Summary Section 7.13. Resources Chapter 8. mod_perl Section 8.1. Introduction Section 8.2. Configuration Section 8.3. Turning CGIs Into mod_perl Programs Section 8.4. Pure mod_perl Programming Section 8.5. Project: MySQL, DBI, and mod_perl Section 8.6. Other Stuff You Can Do Section 8.7. Summary Section 8.8. Resources Part IV: Embedded Chapter 9. Server Side Includes Section 9.1. Introduction Section 9.2. Security Considerations Section 9.3. Summary Section 9.4. Resources Chapter 10. Embperl (HTML::Embperl) Section 10.1. Introduction Section 10.2. Installing Embperl Section 10.3. Apache Configuration Section 10.4. A Quick Example Section 10.5. Embperl Commands Section 10.6. Posted Data and %fdat Section 10.7. Other Embperl Variables?$ row and $col Section 10.8. Embperl Project Section 10.9. What We Didn't Talk About Section 10.10. Summary Section 10.11. Resources Chapter 11. Mason (HTML::Mason) Section 11.1. Introduction Section 11.2. Installation Section 11.3. Apache Configuration Section 11.4. A Quick Example Section 11.5. Inline Perl Sections Section 11.6. Handling Posted Data with %ARGS and <%args> Section 11.7. Mason Components Section 11.8. Mason Project Section 11.9. What We Didn't Talk About Section 11.10. Summary Section 11.11. Resources Chapter 12. PHP Section 12.1. Introduction Section 12.2. Embedding PHP Into HTML Section 12.3. Configuration Section 12.4. A Couple of Quick Examples Section 12.5. Language Syntax Section 12.6. Built-In PHP Functions Section 12.7. PHP and MySQL Section 12.8. Project Section 12.9. Summary Section 12.10. Resources Bibliography [ Team LiB ] [ Team LiB ] Copyright Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Addison-Wesley was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. Netscape Communicator browser window ©1999–2002 Netscape Communications Corporation. Screen captures used with permission. The publisher offers discounts on this book when ordered in quantity for bulk purchases and special sales. For more information, please contact: U.S. Corporate and Government Sales (800) 382-3419 [email protected] For sales outside of the U.S., please contact: International Sales (317) 581-3793 [email protected] Visit Addison-Wesley on the Web: www.awprofessional.com Library of Congress Cataloging-in-Publication Data Lee, James B. Open source web development with LAMP: using Linux, Apache, MySQL, Perl, and PHP / James B. Lee, Brent Ware. p. cm. Includes bibliographical references and index. (alk.paper) 1. Computer software—Development. I. Ware, Brent. II. Title. QA76.76.D47 L435 2003 005.1—dc21 2002026195 Copyright © 2003 by Pearson Education, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. Published simultaneously in Canada. For information on obtaining permission for use of material from this work, please submit a written request to: Pearson Education, Inc. Rights and Contracts Department 75 Arlington Street, Suite 300 Boston, MA 02116 Fax: (617) 848-7047 Text printed on recycled paper 1 2 3 4 5 6 7 8 9 10—MA—0605040302 First printing, December 2002 Dedication To my wife Kelli and our three children Ryan, Christian, and Madeline. –J.L. To my pup Hanchau. Sorry I missed so many W-A-L-Ks. –B.W. [ Team LiB ] [ Team LiB ] Foreword When I was asked to review the manuscript of Open Source Web Development with LAMP, I was nervous about one thing. Certainly, I had experience with Linux, Apache, and Perl, and I knew I could bluff my way through the PHP stuff. But the MySQL chapter—warning bells! I've successfully avoided "real databases" throughout my career in the industry–entirely without intending to, I assure you. But somehow, despite nine years of World Wide Web development, I hadn't touched a line of SQL since my undergraduate database course. Fortunately, I realized this put me in an ideal position to evaluate the book from the perspective of its intended audience: smart folks with a fair amount of web savvy, folks who are willing to pick up new things—with the benefit of two highly experienced guides. And that is what we have in James Lee and Brent Ware. Certainly, the MySQL chapter succeeded in filling a gap in my professional education. More surprisingly, I learned many new things from each chapter, perhaps especially those that covered what I thought to be familiar ground.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages432 Page
-
File Size-