In this lesson, we'll check out your local environment.
The control panel
Start the XAMPP control panel. The start the Apache web server, and the MySQL database server.
That's it! Your PC is now acting like your Reclaim server, at least enough for this course.
Your Reclaim server has a URL, like
flatteringhippos.com. What about the web server your running locally? Does it have a URL?
localhost. There's no
.org, or anything.
Try it. Open a browser, and point it at
localhost. If everything's OK, you'll see a XAMPP info page.
If you don't see that, it may be that you need to change your port. A port is a number, that's an optional part of a URL. Web servers watch specific ports, waiting for messages.
The default port for web servers is 80. So
localhost:80 are the same thing. See the get software lesson for help on changing the port.
Getting web pages on
Remember that a URL is a path to a file, more-or-less. So, suppose you wanted to make a page with the URL
localhost:8080/animals/llamas.html, or whatevs). Where would you put it?
Open Explorer or Finder, and look at the folder where XAMPP is installed. For me, it's on the D: drive.
There's a folder called
htdocs. That's your "web root." It's where files available over
Suppose I make a file in
The file's URL would be
(I'm ignoring ports from now on.)
The Windows path to the file is
D:\xampp\htdocs\rosie-truth.html. The root of
D:\xampp\htdocs. So the URL of the file is
Notice the file name! Lowercase, and dashes for spaces. So not
Rosie truth.Html, but
Say I want a file with the URL
localhost/animals/llamas.html. What would the Windows path of the file be, on my system?
The root of
localhost/animals/llamas.html would be at
Hey, in URLs you use forward slashes, /. In Windows paths, you use backslashes, \. What's the deal?
Aye, you're right. In just about every context, use / to separate the folder names in a path. Microsoft chose to use \ when they launched MSDOS 1.0, decades ago. So, in Windows, use \ in file paths. URLs for files on a Windows server (which your PC is at the moment) use /, though. So it's
localhost/animals/llamas.html in a browser, not
In this course, you won't need to use \ often. Our tools are usually smart enough to handle the difference.
Running PHP on
You need PHP programs to run on your server. XAMPP already set that up for you. You don't need to do anything.
XAMPP installed MySQL, and phpMyAdmin, a tool for managing databases. To run it, go to the CP, and click the right Admin button:
phpMyAdmin is complex, so it might take a few seconds to start.
We'll talk more about phpMyAdmin in the DB part of the course.
If you want to shut down your servers, click their Stop buttons. Then Quit the CP.