PHP + database + webserver

12 October 2006

In a previous post I talked about how an aspiring digital historian might learn some fundamental software technologies applicable to building a dynamic website. Today I’ll try to better explain how those work together to produce web pages.

In the simplest kind of website, a person using a browser requests an HTML page by clicking a link or typing a URL. The browser then sends that request across the great wide internet to a webserver–a specialized kind of software program living on a network server. The webserver finds the requested HTML file on it’s filesystem and returns it to the requesting browser. The browser interprets the HTML and displays the resulting page on the user’s screen.

Antietam on the Web (AotW), and many other sites, however, need more sophisticated functions than can be provided by plain old HTML. In our case we’ve chosen a combination of tools including PHP and a mySQL database to help get the job done.

PHP+database+webserver flowchart_small

You probably already know Jenny Goellnitz from her Civil War work on the web, notably on the Wheatfield at Gettysburg, troops of Ohio at Gettysburg, Federal Colonel Strong Vincent, and Confederate surgeon Hunter McGuire. Her magnum opus is And Then A.P. Hill Came Up, the premier internet source on the Confederate General.

Dunker Church at Sharpsburg (J. Goellnitz photo)Goellnitz photo: Burnside BridgeGoellnitz photo: Guns at Antietam
Goellnitz photos: Dunker Church, Burnside Bridge, Guns at Sharpsburg

Jenny recently returned from a trip to Sharpsburg and added an excellent virtual tour of the battlefield to the A.P. Hill site. Take a look; she’s done a fine overview of the field and the day, with pieces of the Park’s driving tour map and some very nice photographs of her own in accompaniment.

I’ve been having conversations with someone who wants to put masses of historical information on the web. He’s passionate about the material, but has no experience with web technology. and doesn’t have an IT shop or a CHNM or other academic resources available. He has a late-model Windows PC at home, and is pretty good in Word.

The structure I use for AotW and recommend for similar projects is built with open source (i.e., free) parts including an apache webserver running on linux, a mySQL database, a little XHTML, and a set of PHP scripts and templates. These are widely used, readily available, and trustworthy tools for this kind of work.

the dummy

Warning: there’s no getting around it. You will need to learn some basic programming to build such a site, but it shouldn’t be too frightening. This stuff is pretty easy. 10 years ago I was a webnoob, too. If I can do it …

In this first installment*, I identify some basic web technologies you’ll need to learn, and point to some resources.