PLEASE NOTE: All CMIT modules have now been withdrawn,
and are unavailable for the 2010/11 academic year
These web pages and lecture notes are left as reference for those students requiring CMIT modules to complete their programme only, and are not an indication of modules currently offered.
Page 1 2
Installing XAMPP on your own PC
To run your PHP programs on your own PC, you'll need to install a "distribution" of PHP. As PHP is closely linked to the web, it often comes packaged with such things as a web server and database package.
If you don't have your own PC, then you can still use the University computers to write your PHP, in which case you can jump straight into configuring Dreamweaver.
If you want to install PHP on your own computer, we recommend that you install PHP and Apache via the Apache Friends' XAMPP package.
You should ensure that you complete these instructions fully, to ensure that you have secure system as a result. Read the notes on security at the end of the page!.
- Windows XP
- 250 MB free disk space
- about 15 minutes
Note: There's also an Apple Mac OS X package, though it's a little less 'polished', so may not work as reliably as the PC version...
- Download the XAMPP package from the Apache Friends' Website: http://www.apachefriends.org/en/xampp.html. Make sure you choose the correct package for your operating system. These instructions will follow the installation on Windows XP.
- Double click on the downloaded file to run the installer.
as the installer language (or another if you prefer....).
- Choose an install location (the default is ALWAYS the best option here). Click "
" to start copying files - there are a lot of them - and wait until you see a dialogue box saying "finished". Click on OK to continue setting up.
- Choose to install the applications as services ("
- Say "
" to install Apache, which is a free webserver. This will allow you to access your PHP files as if they were on the web. Later, we'll see how you can share files on the web using this software.
- And say "
" to MySQL. This is a database server that PHP can use to store the information for data-oriented web applications. Using it is optional, but I'd recommend installing it just in case!
- But just say "
" to installing FileZilla FTP Server. This is only required if you need to transfer files to your new webserver from a remote computer. Installing it is optional, but adds an extra security risk.
- Now click "
" to run the control panel, which will allow you to start and stop your new web and database servers.
- The control panel should look like this - you can also run it from the desktop icon or start menu option (under "
"). Check that both Apache and MySQL say " ".
You now have your own webserver and database server!
Securing Apache and MySQL
An important step in running server software is making sure it is secure from malicious intruders.
- Run the XAMPP control panel as above, and click the " " button next to the Apache entry.
- Choose your language (English is often a good idea) and Click " " on the orange menu that appears.
- You should see a page which runs through some basic security checks.
- Below the checks, there is a link to fix any problems that appear in the checks - click it or click here.
- You should now choose a secure password for the MySQL database server. Leave other settings alone - authentification should be set to "cookie" and the "safe plain password" should be unchecked.
- You are also able to secure your web server, so that you need to log in to view any pages that are posted to it. This is not strictly necessary if you are not publishing any sensitive information, but it is a useful additional security measure, if you don't want anyone to see your work-in-progress! To set this up, type a username and password in the boxes provided.
- All done! There are a number of interesting examples and demonstrations included in the XAMPP package, which you can access from http://localhost/xampp/ or by clicking the
- Store the PHP programs you write in subfolders of c:\xampp\htdocs. For example, for the lottery application you might create a folder called c:\xampp\htdocs\lottery, which can be accessed using http://localhost/lottery/.
Next page (Configuring Dreamweaver)