Friday, 25 March 2011

Week 6 - The Server Side

Yesterday, the basic ideas behind servers have been introduced during the lecture.

A server in computing is a software application that gives a service on behalf of the client. They respond to incoming requests and provide a service. There are different types of servers such as:
  • Mail
  • Database
  • File
  • Application
  • Web
  • Image
  • Sound
In the coming weeks, we will be using PHP (PHP: Hypertext Preprocessor). PHP is a server side scripting language used to produce dynamic websites. To start developing in PHP, one needs to install as a minimum, a web server, PHP and a database server.

Therefore XAMPP have been downloaded from http://www.apachefriends.org/en/index.html, where it contains the following:
  • Apache HTTPd (Web Server)
  • MySQL
  • Filezilla FTP server
  • phpMyAdmin
  • Open SSL
  • PHP
After installing XAMPP, the control panel was started, and the servers have been stopped and started, but the buttons where not working properly. This is because I have to start the service by right clicking on the Control Panel icon of XAMPP and choose ‘Run as Administrator’.

XAMPP Control Panel

Then the http and https services have been checked if they are activated

Http

Https

As you can see, for https, the statuses for most of the components are deactivated, but at the bottom it says the following: 'Some changes in configuration may sometimes cause false negatives. All reports viewed with SSL (https://localhost) do not function!'

I also checked the security status of the XAMPP installation where I found that all components have been unsecured. Therefore to fix the problems for mysql, phpmyadmin and the XAMPP directory, http://localhost/security/xamppsecurity.php , have been used.

XAMPP Security (Unsecure)

XAMPP Security (Secure)

When I started FTP the service on the Control Panel, I clicked on Admin to set the Filezilla service on XAMPP, where I followed the steps that are found in http://tutpages.com/download/images/xampp/filezila/chmod.html to assign users.

Filezilla Server


Then I connected the FTP program to the XAMPP server FTP service.

Filezilla FTP Client


To get a phpinfo() report, I created a php file named 'hello.php'. This was created inside the htdocs document and the following URL has been inserted in the browser 'http://localhost/hello.php'.   At first, it displayed 'Object not found', but when I rebooted the system, the following phpinfo() report have been displayed.

phpinfo() report


I also tested the default guestbook and got a visitor report using the 'Webalizer' tool.

guestbook

visitor report


I also modified the html file found in 'C:\xampp\htdocs\index.html' by adding an image and a style sheet to it and typed 'http://localhost/index.html' in the URL and got the following:

index.html

Running from a different computer

 

No comments:

Post a Comment