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.
- Create database and tables on your host server
- Create a new site (or update one that is already there) within Dreamweaver
- 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:
-
Hard Drive:Applications:Macromedia Dreamweaver MX 2004:Configuration:Connections:Scripts:PHP_MySQL:_mmDBScripts i
f you have a MAC and 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!
- Add the Testing Server Info.
- Choose your server model (for me it was PHP/mysql
- Choose FTP access
- Add your FTP Host (this can be the same as your remote host)
- Your Host directory should be “_mmServerScripts/” (or whatever the server scripts you copied there)
- Use the same username and password as your remote host
- Add the URL prefix. That should be “http://yoursitename.com/”
- Click ‘Test’ and it should connect with no problems
- 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).
- 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!
Thank you for the tutorial. Are you going to be posting a fresh PHP tutorial any time soon?