Mathematics 152
Setting up a Windows computer to use EasyPHP and HAPedit
You will need a "PHP Setup 2004" CD, available in class.
Last Modified: September 14, 2004
Note: these instructions are specific to EasyPHP version 1.7, which is
on the CD.
1. (Optional) If you want to use the same browser with which things
have
been tested, install a recent version of Netscape (at least 7.0).
Version 7.1 is on the CD, in the Setup Netscape folder. Just open
this folder,
click on SETUP, and follow instructions. Make Netscape your
default
browser when offered the opportunity.
If you prefer to use Internet Explorer, things ought to work OK, but
the project instructions have not been tested with IE.
2. Click on easyphp1-7 setup on the CD. Choose "Yes." Choose
"Next," accept the license agreement, then choose "Next" again.
Change the install directory to C:\EasyPHP. (Any
drive
is OK, but you'll find it convenient to have the folder easily
accessible.) Complete the installation. Your browser will come up
with a welcome page in French.
Just close it.
From the Start menu, drag the shortcut to EasyPHP onto the desktop, and
start EasyPHP. You should now see a large lower-case "e"
(the EasyPHP icon) in your
system tray at the lower right of the screen. Right-click, choose
Configuration...EasyPHP, and change the language to English. If the red
dot next to the
"e" icon is not flashing, right-click the icon and choose
"Start." Right-click, choose
Configuration...PHP Extension, and check php_gd2. Click Apply and
then Close. If you do not do this, graphics will not work!
3. You now have a subfolder C:\EasyPHP\www. Copy the folders
affine
and geo from the CD into this subfolder. If you get complaints
about read-only files, just try again.
4. Open your browser and type in the URL
http://localhost/affine/index.html.
By
clicking
on links of this Web page, you should now be able to look at affine
geometry
Web pages, with your own computer functioning as the Web server!
Someone elsewhere on the Internet could see the same Web page. If
you do not see any diagrams, you probably forgot the end of step 2.
Close your browser.
5. Open C:\EasyPHP\php and create a new folder called "manual."
Copy
the file php_manual_en.chm from the CD into this folder.
Double-click
on the
file,
and you will see the entire PHP manual.
6. On the CD, click on the Zip file hapedit. Extract all files into
c:\hapedit.
Open this folder, right-click on HAPedit, create a shortcut, and drag
it onto the
desktop.
Click on this shortcut, and choose English as your language. If
you are not asked for a choice of language, select Options...Choose
your language... from the main menu.
HAPedit may ask you automatically if you
want
to provide a php manual local folder. If not, choose Help...Php
manual
folder. Select the folder C:\EasyPHP\php\manual.
7. Launch HAPEdit, choose Project...New...Add Project. Navigate
to
C:\EasyPHP\www\affine and select this as the root folder.
Double-click
the Affine project, then click the file AddPoints.php. You should
now
see the PHP source code.
Press F9, and change the URL to
http://localhost/affine.
Now Netscape will launch and show you the result of executing this PHP
file.
While you are editing this file, Help...Index should
bring
up the PHP manual. This manual is so good that you should not need to
own
any
other PHP references.
8. Close Netscape, and use HAPEdit to open AddPoints.html. Press
F9
to start Netscape. You will now see a complete Web page showing
how
to add two points in affine geometry (which you will learn how to do
later
in the course.)
9. Restart your computer. PHP files will not work. That's
because
you need to run EasyPHP to restart the server. Run it from the
start
menu, or use a desktop shortcut if you created one earlier. If
necessary, right-click the big "e" icon in the tray at the lower right
and
choose Start. When the red dot is flashing, your server is
running. If
by
any chance your PHP files don't work from HAPedit, choose a project and
right-click
on
it. Make sure the associated URL is something like
http://localhost/affine.
10 . If you get tired of restarting the server, you can right-click the
"e"
icon,
choose Configuration...EasyPHP, and check the first option (Start on
windows startup). This will start
EasyPHP
and the server automatically when the computer starts up. Doing
this makes sense only if you are using PHP a good fraction of the time,
if you want your friends to be able to see your PHP Web pages, or if
you want to submit your homework just by emailing a link to the php
file. You can learn your IP address by going to the Windows
control panel, choosing Network Connections, double-clicking your Local
Area Connection, clicking the Support Tab, and noting the IP
address. On the Harvard network, this address, though nominally
temporary, appears not to change. If,
while your server is running, someone types a URL like
http://140.247.xxx.yyy/affine/index.html into their browser (but
changes
the xxx.yyy to complete your IP address), they should see the affine
geometry Web page running off your own server.
11. (Optional) If you want to try create stylish-looking Web pages,
click on
ts3lite.exe
on the CD to install TopStyle 3.10 Lite. This is a freeware style
sheet
editor. However, the simple style sheet required for the projects can
be created in HAPEdit.