getting started with web servers, php, and the eclipse pdt appendix i david m. kroenke and david j....
TRANSCRIPT
Getting Started with Web Servers, PHP, and the Eclipse PDT
Appendix I
DAVID M. KROENKE and DAVID J. AUER
DATABASE CONCEPTS, 6th Edition
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 written permission of the publisher. Printed in the United States
of America.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Appendix Objectives
• Know how to install and manage the Microsoft IIS Web server
• Understand the file system structure used by IIS
• Know how to use the Microsoft Internet Explorer Web browser
• Know how to download and store files from Web sites
• Know how to download and install the Java Runtime Environment (JRE)
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
I-3
Appendix Objectives
• Know how to download, install, and use the Eclipse, PHP Development Tools (PDT)
• Know how to download, install, and use PHP
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
I-4
The IIS Web ServerOpening Control Panel
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-5
The IIS Web ServerThe Control Panel Window
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-6
The IIS Web ServerThe Programs Window
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-7
The IIS Web ServerThe Windows Features Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-8
The IIS Web ServerThe Selected Internet Information Services Features
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-9
The Internet Information Service (IIS) ManagerThe Administrative Tools Window
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-10
The Internet Information Service (IIS) ManagerThe Short-cut Menu
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-11
32-Bit versus 64-Bit ODBC I
• The ODBC Data Sources program we have been using is for the 64-bit version of the ODBC data sources administration program, and will create 64-bit ODBC data sources.
• These will only work as long as every component in the Web application program chain is a 64-bit program. But, if any component is a 32-bit program, the 64-bit ODBC data source will not work.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-12
32-Bit versus 64-Bit ODBC II
• In fact, when you are building the Web database applications in this chapter, if everything seems to be correctly done but the system still does not work, the most likely cause is a 32-bit program in the chain.
• To resolve this problem, you will need to use the 32-bit version of the ODBC Data Sources program located at C:\Windows\SysWOW64\odbcad32.exe.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-13
32-Bit versus 64-Bit ODBC III
• To resolve your Web database application problem, create a 32-bit ODBC data source using OBDC Administrator, and then revise your Web page code to use that ODBC data source.
• For more information of the programs in the Windows\SysWOW64 folder, see the Wikipedia article on WoW64 at http:// en.wikipedia.org/wiki/WoW64.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-14
32-Bit versus 64-Bit ODBC IV
• The two icons for the two versions appear as shown below. Note that although the program icons are the same, the program names are different. Data Source (OBDC ) is the 64-bit version, and OBDC Administrator is the 32-bit versions.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-15
The Internet Information Service (IIS) ManagerThe New Program Icons
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-16
The Internet Information Service (IIS) ManagerThe IIS Manager Itself
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-17
The Internet Information Service (IIS) ManagerThe Default Web Site
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-18
The Internet Information Service (IIS) ManagerThe IIS inetpub Directory Structure
and the wwwroot Folder
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-19
The Internet Information Service (IIS) ManagerThe Default Web Site Maps to the wwwroot Folder
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-20
The Internet Information Service (IIS) ManagerThe Default Web Site in the Web Broswer
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-21
Web Site Security ManagementThe Folder and Search Options Command
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-22
Web Site Security ManagementThe View Page in the Folder Options Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-23
Web Site Security ManagementThe Use Sharing Wizard (Recommended) Setting
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-24
Web Site Security ManagementThe Properties Command
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-25
Web Site Security ManagementThe wwwroot Properties Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-26
Web Site Security ManagementThe Users Group Permissions
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-27
Web Site Security ManagementEditing the Users Group Permissions
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-28
Web Site Security ManagementThe Final Users Group Permissions
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-29
Installing the Java Runtime Environment (JRE)The Java JRE Web Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-30
Installing the Java Runtime Environment (JRE)The Java Web Site Determines
the Correct Version of the Java JRE
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-31
Installing the Java Runtime Environment (JRE)The Do You Want to Run or Save {Filename} Message Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-32
Installing the Java Runtime Environment (JRE)The User Account Control Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-33
Installing the Java Runtime Environment (JRE)The Java Setup Dialog Box Welcome Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-34
Installing the Java Runtime Environment (JRE)The Java Setup Dialog Box Complete Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-35
Installing the Eclipse PDTThe PDT All In One / Eclipse PHP Packages
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-36
Installing the Eclipse PDTThe Zend PDT Downloads Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-37
Installing the Eclipse PDTThe C:\Download\Eclipse\Eclipse-PDT-All-In-One Folder
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-38
Installing the Eclipse PDTThe Extract Compressed (Zipped) Folders Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-39
Installing the Eclipse PDTThe Eclipse-PHP Icon on the Windows Start Menu
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-40
Installing the Eclipse PDTThe Open File – Security Warning Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-41
Installing the Eclipse PDTThe Eclipse Splash Screen
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-42
Installing the Eclipse PDTThe Workspace Launcher Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-43
Installing the Eclipse PDTThe Select Workspace Directory Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-44
Installing the Eclipse PDTThe Select Workspace Directory Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-45
Installing the Eclipse PDTThe Windows Security Alert Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-46
Installing the Eclipse PDTThe Eclipse PDT Welcome Screen
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-47
Installing the Eclipse PDTThe PHP – Eclipse Workbench Window
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-48
Installing the Eclipse PDTExiting the Eclipse PDT
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-49
Installing PHPDownloading PHP
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-50
Installing PHPStarting the PHP Installation
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-51
Installing PHPThe PHP 5.3.15 Setup Wizard
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-52
Installing PHPThe End-User Agreement
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-53
Installing PHPThe Destination Folder Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-54
Installing PHPThe Web Server Setup Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-55
Installing PHPThe Choose Items to Install Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-56
Installing PHPThe Installing PHP 5.3.15 Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-57
Installing PHPThe User Account Control Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-58
Installing PHPThe Completed the PHP 5.3.15 Setup Wizard Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-59
Testing PHPThe File | New | PHP Project Command
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-60
Testing PHPThe PHP Project Dialog Box—New PHP Project Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-61
Testing PHPThe PHP Project Dialog Box— PHP Include Path Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-62
Testing PHPThe PHP Project Dialog Box— PHP Build Path Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-63
Testing PHPThe DBC-e06-PHP-Test Project
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-64
Testing PHPThe File | New | PHP File Command
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-65
Testing PHPThe New PHP File Dialog Box—New PHP File Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-66
Testing PHPThe New PHP File Dialog Box—Select PHP Template Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-67
Testing PHPThe phptest.php Web page code
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-68
Testing PHPThe phptest.php PHP code
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-69
Testing PHPExpanding the DBC-e06-PHP-Test Project Structure
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-70
Testing PHPThe Short-cut Menu
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-71
Testing PHPThe Export Dialog Box—Select Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-72
Testing PHPThe Select Page—File System Export Destination
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-73
Testing PHPThe Export Dialog Box—File System Page
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-74
Testing PHPThe Export to Directory Dialog Box
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-75
Testing PHPThe Export Dialog Box—Completed Settings
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-76
Testing PHPThe PHP Information Page in the Web Browser
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-77
Managing the PHP ConfigurationPHP Dynamic Extension *.dll Files
• The Windows Installer installation installs and enables a limited set of the PHP dynamic extension *.dll files that PHP uses to extend PHP functionality to various DBMS products. *.dll files are Microsoft dynamic linked library files, which provide the ability to share program capabilities and functionalities between programs by letting each of the programs use a common *.dll file.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-78
Managing the PHP ConfigurationThe PHP *.dll Files Installed by the Windows Installer for PHP
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-79
Managing the PHP ConfigurationAdding Needed PHP Dynamic Extension *.dll Files
• The full set of the PHP dynamic extension *.dll files can be obtained by downloading the PHP *.zip file used for manual installation.
• Unzip the file in a location other than the PHP directory.
• Copy the needed *.dll files to ..\PHP\ext.• Update the php.ini file.• Reboot the computer.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-80
Modifying the PHP InstallationThe Full Set of PHP *.dll Files
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-81
Modifying the PHP InstallationThe Dynamic Extensions in the php.ini Configuration File
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-82
Managing the PHP ConfigurationInstalling the Microsoft SQL Server Drivers for PHP 3.0
• Download the installation file from www.microsoft.com/download/en/details.aspx?id=20098.
• The installation is actually a file that expands a zipped set of files when run.
• Run the installation file.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-83
Modifying the PHP InstallationThe Dynamic Extension and Help Files
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-84
Managing the PHP ConfigurationInstalling the Microsoft SQL Server Drivers for PHP 3.0
• Copy the needed *.dll files to ..\PHP\ext.– extension=php_sqlsrv_53_nts.dll – extension=php_pdo_sqlsrv_53_nts.dll
• Update the php.ini file.• Reboot the computer.
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-85
Modifying the PHP InstallationOpening the php.ini File in Microsoft Notepad
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-86
Modifying the PHP InstallationThe Added Configuration Files in php.ini
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-87
Managing the PHP ConfigurationUsing the Microsoft SQL Server Drivers for PHP 3.0
• To use the SQL Server drivers instead of the OBDC drivers, modify the Web page php code.– Instead of:
// Execute SQL statement
$RecordSet = odbc_exec($Conn,$SQL);
– Use:// Execute SQL statement
$RecordSet = sqlsrv_query($Conn,$SQL);
KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall I-88
Getting Started with Web Servers, PHP, and the Eclipse PDT
End of Presentation on Appendix I
DAVID M. KROENKE and DAVID J. AUER
DATABASE CONCEPTS, 6th Edition