I know that many people won't have
any trouble with this, but it took me ages to figure out what went
wrong, so I thought I would jot it
down and post it here in case it's helpful. And also to remind me in
case I ever have to do it again.
This is a tutorial on how to configure
the settings in Dreamweaver to connect to a local database using
Apache, PHP and MySQL, so that
you can edit your site with testing locally. This assumes that you
have already set up your computer to run the above applications.
If you don't know how to do this read the excellent tutorial here.
I'd also follow the advice about installing PHPMYADMIN, if I were you.
Also make sure you have updated your Dreamweaver to the latest version.
You can create a database using the
phpmyadmin tool. Do this first so that you have something to connect
to. It doesn't matter what you call it. Use all lower case though.
A definition to clarify a few things.
Apache serves pages from the htdocs sub folder
in the Apache folder. This is where you put your "root" folder. For
this example, let's call it "mysite".
Then you need to set up your site in Dreamweaver.
For the purposes of this tutorial I set up the local site to be the
same folder as "mysite". So open the new site dialogue
box.
Local Info
Site Name: mysite
Local root folder: C:\Program Files\Apache
Group\Apache\htdocs\mysite\
Default
images folder: C:\Program Files\Apache Group\Apache\htdocs\mysite\images\
I
didn't bother with HTTP address. That may come in a later version.
Remote info: None. At this stage.
Testing server.
Server model: PHP MySQL
Access: Local/network
Testing server folder: C:\Program
Files\Apache Group\Apache\htdocs\mysite\
URL Prefix: http://localhost/mysite/
The URL prefix
is critical. It wasn't until I added the "mysite" on
to the end of it that it worked.
You can now follow the standard instructions for connecting to a database
through the Dreamweaver interface.
Hopefully, as I go through the process, I'll add
more to this tutorial.