Title: ISM 4130 Presentation 1
1ISM 4130 Presentation 1
Sample System Implementation and Installation of
Apache, PHP, and MySQL
Robert Geiger - Team Leader Steven Miller
Deputy Team Leader Steve Bowman Programmer /
Analyst Brian Dollar Programmer /
Analyst Todd Whitcomb Programmer /
Analyst Corey Radford DBA / Web Admin Jarrod
Mitchell DBA / Web Admin Katie Noland QA /
Security Tricia Casteline QA / Security Lymarie
Santiago QA / Security
September 11, 2003
2What Is Apache??
- Apache is the worlds most popular web server.
It is estimated that around 5,000,000 servers
worldwide use Apache software to deliver web
content to users like you and I. - Apache is highly configurable, robust, secure,
and because it was built on the GNU Public
license it is Open Source and it is FREE to
anyone!
3What Is PHP??
- PHP stands (somehow) for Hypertext Preprocessor,
it is an open source, powerful scripting language
that can be embedded within HTML code to give a
website program-like functionality. It is also
FREE!
- PHP is a simple programming language that does
not include the extensive typing of variables.
The declared variable a1 for example, can be
string, a integer, or Boolean depending on its
use.
- PHP has many functions but primarily exists to
interface with server-side databases and to offer
additional flexibility (easier site
administration) and functionality (real-time
updating capability) to site owners and operators.
4What Is MySQL??
- MySQL is a powerful, open source database
software based (obviously) on the SQL standards
for database creation and management. It employs
many features that make it perfect for the web.
It is not generally considered to be an Oracle
substitute because its features are focused
around the reliability and speed that the web
demands.
5So How Do They All Work Together??
2
PHP Script
Apache Web Server
1
Web Page On Browser
5
3
4
6
PHP
MySQL Server
6Accessing the Apache Website
http//www.apache.org/dist/httpd/Announcement.html
Click here to download the latest version of
Apache
7Download the .msi Installer
MSI Installer here
8Preparing to Install Apache Web Server
- Before beginning the installation of Apache Web
Server you need to make sure that no other
services are using the sockets and ports required
by Apache!! - If you have installed Microsoft Visual
Studio.Net with the IIS 5.0 component, Microsoft
PWS (personal web server), or any other web
server you need to make sure you disable and stop
the service from running. - IF YOU FAIL TO DO THIS, APACHE WILL NOT FUNCTION
PROPERLY!
9Disabling foreign Web Services
- Click Start button and navigate to
Settings?Control Panel?Administrative Tools
10Disabling foreign Web Services
From Administrative Tools, select Services
11Disabling foreign Web Services
Select the appropriate web service you wish to
disable, right-click and select Properties.
12Disabling foreign Web Services
Second, make sure that the startup type is set to
Disabled so that the service does not start
again when you reboot.
First, stop the services by clicking the stop
button.
13Installing Apache
14Installing Apache
15Installing Apache
i.e. Microsoft.com
Name of host computer
Admin Email Address
Usage Control Allow only one user to control
web server or allow ALL users to control web
server.
16Installing Apache
Choose Typical Install
17Installing Apache
Be sure to leave the default installation path
18Installing Apache
19Configuring Apache to Work With PHP
- httpd.conf is the control and configuration file
for the Apache web server. Within the file you
need to make a few changes so that Apache will
not only recognize the .php extension but will
allow you to take full advantage of PHPs
features.
- In some cases, PHP needs to be set up as a
module of Apache, but typically, and for our
purposes today, PHP is going to be configured as
a standard CGI binary. To do this you need to
configure several directives within the
httpd.conf file.
- httpd.conf, by default, is installed into the
C\Program Files\Apache Group\Apache2\conf\
directory on Windows Operating Systems, if you
cannot find it there, you can do a search by
using the windows key f combination and typing
in httpd.conf or you can sometimes find it in
the Apache program group on the Windows start
menu under Programs..
- When Apache is first installed it cannot access
PHP program files because the files are stored
the servers directory structure. To remedy this
situation, you can use the ScriptAlias directive
and create a virtual path for Apache to use to
access the folder that contains the PHP files.
- You will also need to use the AddType directive
to specify which file extensions Apache should
process as PHP files. Finally, use the Action
directive to tell Apache that it should pass
files to the PHP program before displaying the
files in the web browser.
20Configuring Apache to Work With PHP
The quickest way to httpd.conf
21Configuring Apache to Work With PHP
Scroll down to the bottom of the file and add the
line ScriptAlias /php/ c/php/ to the
configuration settings.
22Configuring Apache to Work With PHP
Scroll down to the bottom of the file and add the
line AddType application/x-httpd-php .php
.phtml to the configuration settings.
23Configuring Apache to Work With PHP
Scroll down to the bottom of the file and add the
line Action application/x-httpd-php
/php/php.exe to the configuration settings.
This directive tells Apache to pass files to the
PHP program before displaying them in the web
browser.
Save and close the httpd.conf file. You are now
ready to install and configure PHP.
24Accessing the PHP Website
http//www.php.net
Click here to download PHP!!
25Downloading the PHP Installer
Download the installer
26Preparing to Install PHP
STOP!!
DO NOT ATTEMPT TO INSTALL PHP UNLESS APACHE WEB
SERVICES HAS BEEN STOPPED!!!
27Installing PHP
28Installing PHP
Choose Advanced Install
29Installing PHP
Leave the default path intact!
30Installing PHP
You may backup your files if you wish although it
is not a requirement.
NOTE The screens following this one deal with
default directories for uploaded file and
sessions file storage. If you have no need to
change the configuration of these directories you
can simply click through them.
31Installing PHP
i.e. smtp-server.cfl.rr.com
If using smtp function, add appropriate email
address
32Installing PHP
Display All Errors
33Installing PHP
Select Apache
34Installing PHP
Select all 3 choices
NOTE After this screen you may click through to
finish the installation.
35Configuring PHP
- php.ini is comprised of the directives that
control the behavior of PHP a directive is a
name followed by an equal () sign and then a
value. By changing the value associated with a
given directive, you can change the way PHP
operates. For example, log_errors Off will
disable error logging within PHP.
- php.ini, by default, is installed into the
c\windows or c\winnt directory on Windows
Operating Systems, if you cannot find it there,
you can do a search by using the windows key f
combination and typing in php.ini.
- php.ini contains control settings for dynamic
extensions, this is very important when working
across multiple platforms and with multiple
applications. You can enable a specific
extension type by navigating to the section
labeled Dynamic Extensions in the php.ini and
then removing the semicolon () that exists
before the extension type.
- Extensions that you might consider enabling
- php_gd.dll (allows PHP to generate images on the
fly) - php_gd2.dll (use this if above is not listed)
- php_msql.dll (allows PHP to interface with mySQL)
- php_java.dll ( just in case you want to add Java
functionality)
36Configuring PHP
php.ini location
37Configuring PHP
Remember to delete the semicolon () before the
directive and then save your changes before you
exit.
php_gd2.dll
mySQL Extension
38Verify That PHP Is Installed Correctly
- Start a text editor such as notepad and type the
following code
lt?php phpinfo() ?gt
- Save the file as test.php into the c\program
files\apache group\apache\htdocs folder in
Windows Operating Systems.
- Start a web browser and type http//127.0.0.1/tes
t.php if the web server and PHP are
functioning correctly, the Web browser will
display an informational page describing the
current state of PHP.
39Verify That PHP Is Installed Correctly
If youve done everything correctly, this web
page should be displayed in your browser.
40Accessing the MySQL Website
http//www.php.net
Click here to download MySQL!!
41Downloading the MySQL Installer
Click here to download MySQL!!
42Installing MySQL
Open the compressed zip file and extract the
files into a temporary folder for installation.
43Installing MySQL
44Installing MySQL
Proceed with a Typical setup. After clicking
next, the program will install with no further
configuration options.
45(No Transcript)