2. Server-Side Scripting and Databases


In this section of my tour of my websites, I will look at server-side scripting and databases. These are key components of the dynamic pages such as the guestbook, the search engine and the contact form.

MySQL

I use MySQL, which is a popular open-source relational database management system. MySQL stores all the tables, columns and rows of the database, as well as data contained within them.


PHP

I use PHP, which is a popular open-source server-side scripting language. PHP was designed specifically for the web, and has a huge library of pre-defined functions which can perform a wide variety of tasks.


Administration

cPanel

cPanel is an online web-hosting control panel which handles the administration of my websites. It is provided by my web hosting company.

cPanel is is a graphical interface, which has a series of different functions controlling all the aspects of website administration: e-mail, FTP, statistics, security, domains and databases.


phpMyAdmin

phpMyAdmin is an open-source software tool written in PHP which handles the administration of MySQL. It is accessed through cPanel.


phpMyAdmin provides a graphical user interface which supports a wide range of operations with MySQL, such as creating and deleting tables, importing and exporting data. This makes the administration of MySQL much quicker and easier than with MySQL's basic command-line interface.


PHP and MySQL On My Local PC

I prefer to write my PHP and MySQL database pages on my local PC. This allows me to test and develop these pages offline, before uploading them to my web site host and making them "live". To do this, I need a web server running on my local PC, and I use Apache.

Apache

Apache is a popular open-source web-server. It is usually used for hosting websites on the Internet, but it is also possible to run Apache on a local PC to serve dynamic web pages.


I run Apache from a console window on my PC, which means that I have to start and stop it manually. The other option is to run Apache as a Windows service, which runs all the time, and does not suit my needs.

Apache is a modular server, with only the most basic functionality included in the core server. Extended features such as PHP are available in various modules, and are configured by placing directives in a plain text configuration file, httpd.conf.

PHP has its own configuration file, php.ini, which is also a plain text file containing directives. MySQL requires some directives in this file.

As with Apache, I run MySQL from a console window on my PC, so it must also be started and stopped when required. And finally, phpMyAdmin is installed on my PC in Apache's document root folder.


In the next section of the tour, I will look at the Search Engine.