Wiley 978-0-7645-5783-5 Datasheet

Browse online or download Datasheet for Software manuals Wiley 978-0-7645-5783-5. Wiley Beginning PHP5 User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 30
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
P1: KTX
WY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44
1
Getting Up and Running
PHP, which stands for HyperText Preprocessor, is widely used for creating programmed features for
Web sites because it is easy to learn and also because PHP syntax is drawn from other widely used
languages, making it familiar to many programmers. In this chapter we present a very brief history
of PHP, and then discuss the nature of PHP as it relates to the Web.
Before you can get into the nitty-gritty of programming with PHP5, you need a clear understanding
of how PHP programs work across the Web, and that obviously implies knowledge of the Web
protocol called HyperText Transfer Protocol (HTTP). HTTP is the language or format for
communications from browser to Web server and back, and is therefore fundamental to many
aspects of PHP. HTTP gets some coverage in this chapter, and quite a bit more in Chapter 3.
You’ll see how to properly setup PHP on a Linux server, and on a Windows server as well. PHP
programs run in conjunction with Web pages, which in turn run (or are distributed by) Web server
software (such as Apache or IIS), which in turn run on top of an operating system (such as Linux or
Windows). Although it’s not strictly necessary to know everything about network operating
systems to build good PHP programs, there are many aspects of PHP that are controlled or affected
by the Web server. If you’re unfamiliar with server computers, Web servers, and the like, don’t
worry. You’ll soon see how they work, and look at the requirements and process of installing basic
Web server software.
This chapter leads you through installing PHP on a Red Hat Linux machine running Apache, and
through installing PHP on a Windows 2000 machine running IIS. Just pick the one that’s right for you.
You’ll also examine the contents of the PHP configuration file php.ini with you, and test your
PHP installation.
Obviously there’s a lot of work for you in this chapter, so let’s get started.
The Roots of PHP
PHP is a programming language designed to work with HTML, but unlike HTML, PHP has data
processing capabilities. If you are familiar with HTML, you know that it is not really a programming
language, but more of a rendering language—that is, HTML enables you to write Web pages using
COPYRIGHTED MATERIAL
Page view 0
1 2 3 4 5 6 ... 29 30

Summary of Contents

Page 1 - COPYRIGHTED MATERIAL

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:441Getting Up and RunningPHP, which stands for HyperText Preprocessor, is widely used for cre

Page 2

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Figure 1-2You can use the Konquerer file-management tool to view the contents of th

Page 3 - System Requirements

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningFigure 1-3Now that you’ve cd’dtothephp-5.0.0RC1 folder, you’ll see qu

Page 4 - Where Do You Start?

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Figure 1-4Figure 1-512

Page 5 - Running PHP5

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningFigure 1-6Checking Apache for DSO installationYou must have Apache in

Page 6

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Figure 1-7Running the configure ScriptWithin your PHP5 directory (probably named so

Page 7

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningFor your quick install use only –with-mysql and –with-apxs2. If you g

Page 8

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Figure 1-8attacks such as accessing system files and Web documents can be launched

Page 9

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningFigure 1-9If Apache is not already installed and running, you can use

Page 10 - Chapter 1

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Figure 1-10If there isn’t such a line, you need to add one; or if the path is wron

Page 11 - Getting Up and Running

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningClearModulesList line in the file, you need to add the following line

Page 12

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1code that creates a pleasing (hopefully) display of text, graphics, and links with

Page 13

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Figure 1-11Now let’s take a look at the Internet Service Manager, a console applic

Page 14

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningFigure 1-12Figure 1-1321

Page 15

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Figure 1-14Now, the directory you created (such as PHPRC01) contains several subdi

Page 16 - Setting up Apache for PHP

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningFigure 1-15like switches, turning a variety of PHP behaviors on and o

Page 17

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1This gives you access to the functionality of the GD library, which enables you to

Page 18

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningFigure 1-17Provided the message in the MMC reports that the World Wid

Page 19 - Information Server (IIS) 5

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Figure 1-18Testing and TroubleshootingTesting your installation of PHP is really a

Page 20 - Downloading PHP5

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningFigure 1-19Did the file you tested work? Or are you reading this secti

Page 21

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1within Services doesn’t mean they are on. Stop and restart them if you need to rea

Page 22

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and Runningmax_execution_time = 30 ; Maximum execution time of each script, in s

Page 23

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and Runningknow or can easily pick up how to make basic Web pages). You’ll also

Page 24

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1files go upon installation, and how to test your installation. The basic definition

Page 25

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1that you may need to rewrite your code a little bit to work properly with the reco

Page 26 - Testing and Troubleshooting

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningPHP5 can be installed on a great variety of Web server/operating syst

Page 27

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1Installing PHP5 with Linux and ApacheAt the time of this writing, the very first re

Page 28 - Configuring PHP

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and Runninghave an RPM for PHP5, so we’ll provide the instructions for getting a

Page 29 - PHP Extensions

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Chapter 1system can be controlled using the rpm command-line tool, and you’ll see how to in

Page 30 - Exercise

P1: KTXWY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44Getting Up and RunningIf you install the packages in the order listed previously, you shoul

Comments to this Manuals

No comments