23.03.2017 Views

wilamowski-b-m-irwin-j-d-industrial-communication-systems-2011

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

62-2 Industrial Communication Systems<br />

Client side<br />

Server side<br />

Web Browser<br />

e.g. Firefox, IE, etc.<br />

CGI<br />

PHP scripts,<br />

Perl scripts, etc.<br />

Database<br />

HTML, CSS, JavaScript<br />

Interpreter<br />

HTTP<br />

Daemon<br />

FIGURE 62.1<br />

as, PostgreSQL, Oracle, MySQL, to create powerful and dynamic server-side applications. Significant<br />

Web sites that are written in PHP include Joomla, Drupal, WordPress, Facebook, etc.<br />

Database comes to picture when it comes to storing huge amount of information and retrieving the<br />

information back when needed by the Web site. The database can contain information collected from<br />

the user or from the administrator. MySQL (written in C and C++) is an open-source relational database<br />

management system (RDBMS) that is based on the structure query language (SQL) for processing the<br />

data in the database and manages multiuser access to a number of databases. In a relational database,<br />

there are tables that store data. The columns define what kind of information will be stored in the table<br />

and a row contains the actual values for these specified columns. The language provides a standard<br />

syntax for accessing relational databases. MySQL works on many different system platforms, including<br />

Linux, Mac OS X, Microsoft Windows, OpenSolaris and many others.<br />

PHP (hypertext preprocessor) and MySQL (a portable SQL server) together have made the task of<br />

building and accessing relational databases much easier [2]. This chapter introduces you to PHP and<br />

MySQL and explains how to use these two together in order to build dynamic Web sites [7].<br />

62.2 Installations<br />

Before you begin to design a Web site, you need to set up an environment that facilitates your development.<br />

You can set up a test site on your computer by locally installing the following softwares.<br />

1. Apache—an open-source Web server<br />

Download from: http://tomcat.apache.org/index.html<br />

2. PHP—an open-source general purpose scripting language designed specifically for the Web<br />

Download from: www.php.net/<br />

3. MySQL—an open source database management system<br />

Download from: www.mysql.com/<br />

After the above softwares are downloaded and installed, you need to configure the Apache server to<br />

process the PHP code. You also need to create an MySQL account in order to use it in your PHP code.<br />

Sometimes you may find it difficult to install and configure these softwares but the Web sites where you<br />

download the software will provide you with general instructions to install and configure them. If you<br />

find it difficult to install these softwares will it would be easier for you to find software packages (often<br />

called software bundles) that can install and configure them automatically. A few software packages<br />

of independently created programs are WAMP server (for Windows environment), LAMP server (for<br />

Linux users), MAMP server (for Mac OS) and SAMP server (for Solaris OS).<br />

62.2.1 WAMP Server<br />

Data flow in a client–server partition.<br />

WAMP is an open-source software used to run dynamic Web sites on the Windows environment. The<br />

WAMP package principal components are: Apache Web server, MySQL database management system,<br />

PHP (or Perl/Python) scripting languages and PhpMyAdmin.<br />

© <strong>2011</strong> by Taylor and Francis Group, LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!