Chapter 2 Windows, Apache, MySQL, PHP (WAMP) - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Chapter 2 Windows, Apache, MySQL, PHP (WAMP)

Description:

Source code is the original programming code in which an application was written ... http://www.apache.org/dyn/closer.cgi/httpd/binaries/win32/ Select a mirror ... – PowerPoint PPT presentation

Number of Views:1238
Avg rating:3.0/5.0
Slides: 20
Provided by: benzim
Category:

less

Transcript and Presenter's Notes

Title: Chapter 2 Windows, Apache, MySQL, PHP (WAMP)


1
Chapter 2Windows, Apache, MySQL, PHP (WAMP)
Install GuidePHP Programming with MySQL
2
Objectives
  • Install and configure a Web server
  • Install and configure PHP
  • Install and configure MySQL

3
Understanding Binary and Source Code Installations
  • Binary format (or binaries) refer to compiled
    files, such as executable installation programs
  • Source code is the original programming code in
    which an application was written
  • Source code must be compiled, or processed, and
    assembled into an executable format before it is
    used
  • Compiled programs only need to be recompiled when
    their code changes

4
Installing and Configuring a Web Server
  • Apache is the most popular Web server software
    used on the Internet
  • Microsoft IIS for Windows is the second most
    popular server software.
  • In Windows, a service refers to a program that
    performs a specific function to support other
    programs

5
Installing and Running Apache on Windows
  1. Go to http//www.apache.org/dyn/closer.cgi/httpd/b
    inaries/win32/
  2. Select a mirror download site. One will be
    suggested at the top.
  3. Download the Win32 Binary without crypto (no
    mod_ssl) (MSI Installer) httpd-2.2.16-win32-x86-n
    o_ssl.msi installation file
  4. Navigate to the installation file and from the
    Welcome screen, click Next
  5. Accept the terms of the License Agreement, click
    Next
  6. Read the contents of the Read This First screen,
    click Next

6
Installing and Running Apache on Windows
(continued)
  • Accept the default values, click Next
  • Select a Typical installation, click Next
  • Accept the default Destination Folder directory,
    click Next
  • Click Back to make changes or click Install to
    finish
  • Click Finish

7
Testing Your Web Server
  • Open your Web browser
  • Type http//localhost/ in the Address box, click
    Enter
  • Figure 2-2 Apaches default Web
    page

8
Configuring Apache
  • To configure ports and other settings you must
    edit the httpd.conf file
  • For Windows
  • C\Program Files\Apache Group\Apache2\conf
  • Lines that begin with the pound sign () are
    informational comments
  • Lines without pound signs contain directives

9
Configuring Apache (continued)
  • Figure 2-4 httpd.conf

10
Configuring Apache (continued)
  • Directives define information about how a program
    should be configured
  • The DocumentRoot directive identifies the default
    directory from where Apache serves Web pages.
    Set this to the complete address of the folder
    you wish to serve pages from.
  • There is also a ltDirectory gt setting that must
    be set to the same directory as your DocumentRoot
    directive.
  • The Alias directive identifies other directories
    that Apache can use to serve Web pages

11
Installing PHP Windows Running Apache
  1. Go to http//us.php.net/downloads.php
  2. Select and download PHP 5.2.14 installer
  3. Select a mirror to download from. Save the file
    to your computer.
  4. Once downloaded, navigate to the installation
    file and from the Welcome screen, click Next or
    follow directions.
  5. In the License Agreement screen, click I Agree
  6. In the Installation Type screen, select Standard,
    then click Next
  7. Accept the default destination location, click
    Next

12
Installing PHP Windows Running Apache (continued)
  1. In the Mail Configuration screen, accept the
    default values of localhost, click Next
  2. In the Server Type screen, select the type of Web
    server that you want to use with PHP, click Next
  3. In the Start Installation screen, click Next to
    begin installation
  4. Click OK to close the dialog box of the Web
    server you selected

13
Configuring Apache for PHP on Windows
  1. Click the Start menu and point to All Programs
  2. Select the Edit the Apache httpd.config
    Configuration File command
  3. Add the following to the end of the
    fileScriptAlias /PHP/ C/PHP/AddType
    application/x-httpd-php .phpAction
    application/x-httpd-php /PHP/php-cgi.exe
  4. Save and close the httpd.conf file
  5. Restart Apache

14
Configuring PHP
  • Figure 2-6 The php.ini configuration file

15
Installing and Configuring MySQL on Windows
  1. Go to http//dev.mysql.com/downloads/ Click
    download button under MySql Community Server
  2. Scroll down and select Windows (x86, 32-bit), MSI
    Installer Essentials - Recommended
  3. Navigate to the install file and run it.
  4. In the Welcome screen, click Next to start the
    installation
  5. Accept the default setup type Typical, click
    Next
  6. Click Back to make changes or click Install to
    continue

16
Installing and Configuring MySQL on Windows
(continued)
  1. Choose skip sign-in, click Next
  2. In the Wizard Completed screen, click Finish
  3. In the first screen of the MySQL Server Instance
    Configuration Wizard, click Next
  4. In the Configuration Type screen, select Standard
    Configuration, click Next

17
Installing and Configuring MySQL on Windows
(continued)
  • In the Windows Options screen, accept the default
    values (do not select the Include Bin Directory
    in Windows PATH check box), click Next
  • In the Security Options screen, deselect the
    Modify Security Settings check box, click Next
  • Click Back to change any of the configuration
    operations or Execute to finish

18
Testing the MySQL Server
  • Check to see if MySQL is running
  • For Windows, use the Services window (Task
    Manager gt Services tab)
  • Run the mysqladmin version command
  • For Windows, change to the C\Program
    Files\MySQL\MySQL Server 5.0\bin\ directory and
    run
  • mysqladmin version

19
WAMP/MAMP/XAMMP
  • All in one download and installation for Windows
  • http//www.wampserver.com/en/
  • Another All in one download for Windows, MAC,
    Linux, Solaris
  • http//www.apachefriends.org/en/xampp.html
  • All in one download and installation for MAC
  • http//www.mamp.info/en/index.html
Write a Comment
User Comments (0)
About PowerShow.com