So If you have used Dreamweaver to do rapid development of a website, you will quickly learn of it’s limitations.  In areas it can shorten development time, and in other areas, it still requires good old fashioned programming knowledge to get the job done.

Well, in this last project I am doing, I require a database interaction (which means handling data entry forms as well as listing and updating as well.  This is one of the functions that Dreamweaver can save time on… a lot of time because it creates the tables and database update code for you.  Sure, there will be some minor modification that comes up, but it is much less by far than creating everything from scratch.

So what is required to use this functionality and where is it on Dreamweaver, and how do you avoid the “Unidentified error occurs when testing a PHP / MySQL connection”?

Before you even get started, you do need to have your database schema in place (all of your tables and even some of your data if needed).  You will need the usually database username, password, and localhost info available as well before you get started.

These are the steps I took to finally get this working and finally get rid of that Unidentified Error when trying to get the data objects working.

  1. Create database and tables on your host server
  2. Create a new site (or update one that is already there) within Dreamweaver
  3. Upload the server scripts into the directory “_mmServerScripts/”(or whatever you call your test server scripts directory)  at the same level as your /www directory on your server.  You won’t see this directory within Dreamweaver and will only be able to see it with another FTP Program.  You can find these test server scripts on your computer at:
    1. Hard Drive:Applications:Macromedia Dreamweaver MX 2004:Configuration:Connections:Scripts:PHP_MySQL:_mmDBScripts if you have a MAC and
    2. C:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts if you have a PC

These scripts will depend upon the testing server model you choose, so make sure they match!

  1. Add the Testing Server Info.
    1. Choose your server model (for me it was PHP/mysql
    2. Choose FTP access
    3. Add your FTP Host (this can be the same as your remote host)
    4. Your Host directory should be “_mmServerScripts/” (or whatever the server scripts you copied there)
    5. Use the same username and password as your remote host
    6. Add the URL prefix.  That should be “http://yoursitename.com/”
    7. Click ‘Test’ and it should connect with no problems
  2. Upload your ‘Connections’ folder that gets created on your computer to your server.  Keep it in the same directory on the server that it is on your computer (site map).
  3. There, you should now be able to add data objects and Dreamweaver will be able to connect automatically to your database and see your tables.

I took a bit to figure out as there were no clear instructions.  If this doesn’t work, it could be something else.

Good luck!

Related terms: