Set up a local test server

From PGVWiki
Jump to navigation Jump to search

What it is

A brief description on how to set up your own local server for testing and working on your PhpGedView installation. This lets you run a complete website on your desktop and is a much easier and better way to design or modify your website than doing it over the web. It's free and easy to use. It's also a great way to try the software and learn how to use it , as well as any number of other things.

What it isn't

This installation is not recommended for production servers in live environments, if you use it in one you do so entirely at your own risk and may not hold the authors or owners of this site responsible if it goes wrong.

What you need

Any computer better than a 486 with 64 MB of RAM will do. If you have a reasonably late model machine, say something less than 4 years old, then you can run this server in the background on your main machine, you won't even notice the overhead increase.

PhpGedView requires recent versions of PHP and MySql and a webserver to make it all work. You can download and install all these packages individually then configure them as recommended, but this is complicated and not easy unless you have very advanced computer skills. If you wish to run a live server, ie one connected to the internet, then you really should learn how to configure the individual packages, and that is beyond the scope of this article.

For a test server however, the easiest way to set all these up is to grab one of the great all-in-one server packages like XAMPP. Get the package for your operating system, the full download in zip format is recommended. It does not require installation within Windows, you can move copy or delete this installation instantly with no problems. The software you will install is just the same as that used by the websites you browse every day, but it is configured for ease of use, not with security in mind. All folders are installed in default directories with default passwords and this is the best way for our purposes, since we just want a quick installation we can use right away.

XAMPP Lite works just as well with the latest PhpGedView Version 4 beta 4, but it may not support other software if you intend to experiment.

You can set XAMPP up on a thumbdrive too, and this may suit some peoples purpose better. This allows you to carry your webserver and PhpGedView installation in your pocket and run it from any PC with a USB port. But, be warned! There are lots of files in the package, and thumbdrives are very slow when faced with a lot of files. Setup and use can be slow.

It should also be possible to burn your server and software to a CD once you have it installed and configured, we will look into that in another article


Once you have downloaded the XAMPP package, unzip it to its destination folder according to the directions, it really is that easy. It should go in the base directory of your hard drive. You can install multiple servers and experiment with different configurations, but only running one at a time is recomended


Now go to the folder you created for your server, XAMPP by default, open it and find xampp-control.exe, and create a shortcut from this to your desktop. This allows you to start the Apache webserver and MySql services with a couple of clicks.

Run xampp-control.exe and click Apache and MySql, don't worry about the other services for now, and don't tick the Svc box unless you want your server to always start with windows.

The usual way to "connect" is by entering or http://localhost in your web browser. However, other applications may use port 80 - eg Skype - so you might need to look at conflicts. Run the useful utility, xampp-portcheck.exe that is included in the full parcel, and you will see which ports are free/used. (In Skype, you can tell it not to use port 80)

Do not give Apache web access at this time, if your firewall pops up a window asking for permission, deny it. You may need to configure your firewall to allow local access if you can't access your site in the next step.

After you start the services, open your browser, type http://localhost/ , in the address bar and hit Enter. This should open a welcome page to your new server, just like a web site you access on the net. If you don't get a welcome page or get error messages instead, then check the instructions for installing XAMPP and try again. You can delete this directory and start over at any time.

PhpGedView on your Desktop

Once you have XAMPP installed and working, you are ready for PhpGedView, so if you don't have it handy, download and install the latest version. If you feel adventurous give the CVS version a try.

Open the htdocs folder in the XAMPP directory, this is your "public root folder", and where all your "web accessible" software resides, really in this case it's desktop accessible hence the quotes. Unzip your PhpGedView files into the directory, then follow the directions for installing PhpGedView. You should now have a PhpGedView folder within htdocs and this contains the installation, and the themes folder where you can modify your themes if you so desire.

Congratulations, you now have your very own test site. You can access it at any time now by opening xampp control, starting Apache and MySql and typing http://localhost/phpgedview/ in your browser.