PDA

View Full Version : Connecting to MySQL database through Dreamweaver cs3


Mr Eric
10-11-2007, 03:31 PM
Ok so im trying to connect to MySQL 5 through Dreamweaver cs3
Ive got Apache 2 running good
Ive got PHP 5 running sweet with all the files and code lines
set up to work with the apache server
Ive got MySQL 5 running good and can access it through the command prompt

But i cant connect to MySQL through Dreamweaver
I open up the MySQL Connection Screen in dreamweaver and fill in the information needed, as follows:

Connection name: localhost
MySQL server: localhost
User name: root
password: mypassword

after that i hit select, to select the database
But the following error message:
HTTP Error Code 404 File Not Found. Here are some possible reasons for the problem:

1)There is no testing server running on the server machine.
2)The testing server specified for this site does not map to the http://localhost/_mmServerScripts/MMHTTPDB.php URL. Verify that the URL Prefix maps to the root of the site.

ok so number 1: I know that ive got apache2 server installed and running on my pc ive type this into my browser http://localhost and it says that it works
ive made a php script http://localhost/phpinfo.php and this shows the information about the php installed on my machine so that works.

number 2: this is the one that i think is my problem it must be because of the way i defined my site, ill show you how I defined it:

Site definition/Advanced tab

Local info
site name: Mysite
Local root folder: C:\Documents and Settings\Eric\My Documents\Mysite\
HTTP adress: http://www.Mysite.com/

Remote info
Access: Local/Network
Remote Folder: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\

Testing Server
Server model: PHP MySQL
Access: Local/Network
Testing Server Folder:C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\
URL prefix: http://localhost/

Thats pretty much it I really want connect to MySQL through Dreamweaver and get this error message out of my way so can you please help me i would very much appreciate it
Thank You peace & love :) :grin:

davidj
10-11-2007, 04:43 PM
its a glitch

turn on hidden files and locate and upload your dir and its contents called _mmServerScripts

Please forget dreamweaver when coding PHP. Learn how to handcode it and you will have a much easier time

neonfluxx
10-11-2007, 06:11 PM
I don't agree with that one dj. Dreamwever is easier to use for those who know how to use it correctly. What is the exact error you are getting? What version of windows? I will be able to assist from there.

davidj
10-11-2007, 08:33 PM
I don't agree with that one dj

please qualify that opinion?

ill start...

a Dreamweaver driver who knows the app well and uses nothing but the wizards will eventually run out of buttons and wizards and will ask questions as it is the natural progression of things. A question could be like this...

I have an update function but need it to update 3 tables at the same time and return the time in seconds to the page...

What do you do.

point them to an extension (if one exists)
write a solution for themIf you can persuade me I'm wrong ill adopt your teaching ethic

neonfluxx
10-11-2007, 10:57 PM
I will be more clear with this answer. DJ, you are a trained developer with years of experience in the business and make your living off coding. However the average person trying to build a website doesn't. Very few people can really call themselves a true coder or developer. The average person wants to create a website thats lets the public know who they are. Learning PHP can be a tough process for some and for the average person is not necessary. Lets be honest very few people who come to the form are asking very basic questions and are used to a user interface for doing work. For you and developers you a tainted and like most computer guys you are used to a certain way of doing things. (As am I) Now admit this, wizards are easier for the average user. If the person is serious about web design, then by all means learn php properly with coding. But if you building a website for your boss then why put up with the fuss.

The question is this.

How many members do we see start here asking questions just to learn an easy solution to get a website over with?

How many actually never come back after the question was answered?

So you see it is not always best to learn coding. It really all depends on the level you wish to achieve.

Now you really can't deny that!

Mr Eric
10-12-2007, 01:32 AM
sorry but i wasnt asking a Question about php i just want to know how i can fix this problem.
HTTP Error Code 404 File Not Found. Here are some possible reasons for the problem:

1)There is no testing server running on the server machine.
2)The testing server specified for this site does not map to the http://localhost/_mmServerScripts/MMHTTPDB.php (http://localhost/_mmServerScripts/MMHTTPDB.php) URL. Verify that the URL Prefix maps to the root of the site.

Thanks

Mr Eric
10-12-2007, 04:33 AM
Any Ideas, Anyone? please help

davidj
10-12-2007, 06:45 AM
mr eric

i told you what to do... If this didnt work then i dont know sorry

neonfluxx
10-12-2007, 07:37 AM
Ok Mr. Eric i will tell you the problem and it has nothing to do with learning PHP. It has to with the configuration of your system. You only get that error when there is an isuse in the PHP/MySQL setup. So here is what u do:

Uninstall everything you did. The PHP / Apache / MySQL and install wamp server. This will install everything properly and should be able to connect to a database easily. This will install eveything you need. also

Connection name: localhost <----- this is incorrect, this should be the name you want to call the connections file with the connections script in it.
If you call it localhost I can almost guarantee an issue will occur when the database tries to connect.

This was all correct:

MySQL server: localhost
User name: root
password: mypassword


So recap,
1. Uninstall all you installed PHP / MySQL / Apache
2. Install Wamp Server: http://wampserver.com/en/
3. Use proper connection names like "dbconfig or config"

I am assuming you are using windows since you never answered my question the first time. If you are on mac than use MAMP
http://www.mamp.info/en/index.php

Both are free. Please write back with your results.

davidj
10-12-2007, 07:46 AM
back to neon

i understand your point of view regarding DW wizard code generation. Of course you know im going to disagree. Its easier because pushing a button is easier than taking the time to learn a language. Like its easier to squeeze the throttle of one of those electric carts which the old folks use than to use your legs.

If the user wants to build a personal site and no money changes hands then fine i accept it is a helping hand to those who don't want to or need to learn the language...

My question is how do you teach these people when they run into problems? remember they don't understand code so you cant explain what to do. The chances are there are no extensions to meet their requirements so you cant point them to one so please tell me how to teach them without writing a solution for them.

its like this...

Dreamweaver is like learning a spoken language phonetically. you learn sounds instead of words. by stringing those sounds together you could successfully ask for a meal in a restaurant or buy a newspaper or some fruit. you look at your phrase book which tells you you have to make this sound when asking for a drink.... OOOOooooooHHHHHhhhhhFFrrrrrrr-OOOuuuuuuu. But what happens when you want to talk about the weather or discuss what was on TV last night....You look through your book but there is no sound for this!

Its better to understand the language then you can say whatever is on your mind

we get these .... err .... PHP tourists quite often holding their phrase books asking for new sounds to solve new problems

They pop in to our local shop (the DWC) and ask for a hotdog.... I, being a shop keeper, ask them if they want mustard or ketchup? All they hear from my lips is...

wwwwWWWeeeeeYYYYYYYYrrrrrrrQQQQWWSSSssss
sssssRRTTTTTTTTTGGGGGGGGGGGGGGGGGG BBBBBBBttrrGFFFFGGHHHHHHHHHHHHHHHHHH

they franticaly search their phrase book but allas they cant find the sound! They are stuck. I tell them to go away and learn the language then neon replies by saying he disagrees!

neonfluxx
10-12-2007, 08:15 AM
You know I have a rebuttal. Most people in the forum are beginners and they want a quick and easy fix. Thats what dreamweaver provides. I know it's hard for you to grasp but people do like the shortest route between A & B. Like this members question has nothing to do with learning php. That error only occurs due to poor configuration issue. Learning PHP won't do crap if he can't get PHP / MySQL to work right. Something I frequently find in forums is people answer questions with out fully knowing what to do. If they are a PHP tourist than that answer just gives more caliber to what I'm saying. Most people are not true developers and I'm sorry to inform that nor do they care to be! Have you ever heard the term "simple answers for simple problems". Like I said previously DJ, you are tainted by your expert knowledge. When you we starting out I'm sure you wanted easy answers.

Question: when you go to a garage you ask the attendant to tell you whats wrong don't you? If he replied "get a book and learn mechanics thats your problem, you would probably punch the dude in the face. SAME DIFFERENCE.


So bottom line is easy answers,

His Error Message: There is no testing server running on the server machine.

That is a configuration issue and no learning PHP for developing will aid in his problem. Configuring server knowledge, Maybe. PHP for developing, NOT.

I promise you that, and since I am Certified in Windows, Linux and Mac I think I would know.

davidj
10-12-2007, 09:45 AM
not necessarily

that error appears when your trying to plug Dreamweaver into to Mysql (Could be the _mmserverscript dir has not transfered onto the live / test server).

The guy said that PHP and MYSQL is working fine so you could quite easily write PHP by hand in DW without having to waste time debugging this problem which is why i suggested learning the stuff

That was the first problem of using DW before he has even wrote any code


Most people in the forum are beginners and they want a quick and easy fix.Thats what Dreamweaver provides

disagree with quick as the time chasing for answers of which they don't understand cancels out the term QUICK

I know it's hard for you to grasp
resorting to insults in a debate does nothing to add weight to your argument

but people do like the shortest route between A & B
and what if that route involves A & B & C (with B being the DWC) then the route isn't that short is it

Like this members question has nothing to do with learning php

yes it does. If he didn't want to rely on the panels he wouldn't need to hook Dreamweaver up to MYSQL and therefore wouldn't get the error!


Learning PHP won't do crap if he can't get PHP / Mysql to work right

let me remind you of post 1...


Ive got Apache 2 running good
Ive got PHP 5 running sweet with all the files and code lines
set up to work with the apache server
Ive got Mysql 5 running good and can access it through the command prompt

But i cant connect to Mysql through Dreamweaver


errr.... he he


Something I frequently find in forums is people answer questions with out fully knowing what to do

or what the original question was ....


If they are a PHP tourist than that answer just gives more calibre to what I'm saying. Most people are not true developers and I'm sorry to inform that nor do they care to be!

never apologise for giving away information only apologise when its wrong!


Have you ever heard the term "simple answers for simple problems".

again i ask how do you simplify an answer to a question when the user doesn't understand the language he asked the question in?


you are tainted by your expert knowledge

i took the time and interest to want to learn.. The path was never set out for me... I was a soldier for along time and never thought id be doing this. I have this thing where i need to learn stuff i don't understand.


When you we starting out I'm sure you wanted easy answers.

what i would have wanted was for someone to teach me. Take me to one side and start from the beginning. How much is that worth commercially? Allot of money and i offer that for FREE. What i don't do and i find offensive is this....

I want a solution that does this... write it for me because i don't want to learn this or NEED to learn it because your going to write it for me anyway... let me know when you have done it!

There is no other way than my example above to, as you put it, show them the simple way because if i was to start to explain how to do it i would first require them to run through the tutorials i made to give them a foundation of understanding before i explained the solution. Then by doing that they are, in effect, learning to hand code!

Question: when you go to a garage you ask the attendant to tell you whats wrong don't you? If he replied "get a book and learn mechanics thats your problem, you would probably punch the dude in the face. SAME DIFFERENCE.

wrong analogy...

first I'm paying the mechanic to tell me whats wrong and he will because he is getting paid. I have no interest in learning mechanics therefore i pay someone to tell me.

however....

If i was fixing my own car and walked into a garage and said "I'm fixing my own car but know F-all about mechanics so tell me whats wrong (FOR FREE)" then the mechanic is likely to punch me in the face !


So bottom line is easy answers,
His Error Message: There is no testing server running on the server machine.


the error message is a generic one which points to POSSIBLE CAUSE not ACTUAL CAUSE. All i did was look at the first post where he said....

Ive got Apache 2 running good

and assumed there was a testing server running! maybe I'm wrong! he he

I promise you that, and since I am Certified in Windows, Linux and Mac I think I would know.

OK then fix his problem Mr certified...

[slaps him across the face with a velvet glove]

davidj
10-12-2007, 10:10 AM
tumbleweed........

Mr Eric
10-12-2007, 02:45 PM
davidj what do you mean by:
turn on hidden files and locate and upload your dir and its contents called _mmServerScripts

i know where the _mmServerScripts folder is, where do you want me to upload it to, be more specific as i am a newbie.
neonfluxx ill download Wamp sever.
thanks

davidj
10-12-2007, 03:05 PM
just copy it to your remote dir from your local area

im not saying it will work because its an area i dont bother with but i can remember way back getting that error and thats what i did to resolve it.

neonfluxx
10-12-2007, 05:29 PM
It's funny david as you have an answer for everything but no real solution. Typical with people who feel threatened by the individual with the answers. You are talking out of you butt because you don't want the new guy to put you in your place. Lets see what happens after he removes everything and installs wamp. If I'm right would you admit it. Nope, therefore heres your glove being shoved up your anus.

davidj
10-12-2007, 06:36 PM
i thought it was a Dreamweaver not connecting to mysql issue

where did wamp come into it? He already had the server technologies installed and he said were running fine?

If installing WAMP provides a solution then thats great as you have helped someone out. Isn't that why we are here?

Mr Eric

please try Neons solution and report back with the results


Typical with people who feel threatened by the individual with the answers

It sounds like someone else feels intimidated

You are talking out of you butt because you don't want the new guy to put you in your place.

So your saying i would deliberately talk Shite about a technical issue because I'm scared ill get embarrassed if I'm proved wrong about something? hehe

what are you certified in again?


If I'm right would you admit it

he will post here if you are so everyone will see your right. I dont have to admit it then do i?

Like i said i dont hook Dreamweaver up to Mysql so errors you get by doing so is beyond me! I can remember that error from years ago and the solution i suggested worked for me. Maybe your solution may work for him.


heres your glove being shoved up your anus.


bit sensitive arnt you..

hehe...

neonfluxx
10-13-2007, 12:45 AM
And we can go one with this all day since you have an answer for everything. Never sensitive, just have a fighting spirit. Thats what go me through the war an thats how i would run right through you. Why do you keep answering if I'm the sensitive the one there slappy. cheerio

Mr Eric
10-13-2007, 02:04 AM
Is there any video tutorials on the net that can help me define a site and to help me locate and set the right local, remote and testing server folders?

i think that you davidj is on the right track, you told me to put the _mmServerScripts folder in remote dirctory. its definetly the way ive mapped out my folders. Because i know that all my other techonlogies (PHP5, MySQL5, APACHE2) are working great.

i was thinking that it would be much easier to do it if i had some visual aid.
So any tutorials?

Thanks for your help davidj & neonfluxx

Mr Eric
10-13-2007, 05:12 AM
okey boys, i think i got my folders worked out in the dreamweaver site definition.

but now when i try to connect to MySQL database through dreamweaver
i got this error message:

HTTP Error Code 403 Forbidden

hmm what does this mean??

this is what is typed into the MySQL Connection box in dreamweaver:

Connection name: localhost
MySQL server: localhost
User name: root
password: mypassword

now i can remember neon telling me that im not suppose to have localhost in
the connection name but what else should i have there?

thanks

neonfluxx
10-13-2007, 05:32 AM
Okay Mr. Eric lets do this again and for the last time. Obviously you haven't installed wamp like I told you. You are still trying to work with apache / php / mysql directly. This is very difficult depending on the system configuration.

So do this and this is the last time i will explain:

1. Install wamp
2. after you install wamp go into phpmyadmin and create a database
3. Type the

screw this let me do a vtm for you to make this easy. follow the instructions and do what i do and you will be fine.

Mr Eric
10-13-2007, 05:45 AM
dont worry about the message i sent about the http 403 error that happend just because i changed the Documentroot from htdocs to another directory
but when i changed it back to htdocs ive still got the same 404 error message.
neon whats a vtm?
ok so you want me to install wamp
then create database
then type the what???

neonfluxx
10-13-2007, 06:41 AM
video training, i'm going to make you a video of what to do stand by for a while.

Mr Eric
10-13-2007, 06:56 AM
haha sick thanks neon you rock, but how am i going to receive the video?

Mr Eric
10-13-2007, 07:19 AM
if you want to send it by email heres my adress epitcher_90@hotmail.com

neonfluxx
10-13-2007, 08:05 AM
I will post a link for you to watch it on line. I will rip it down when u r done.

neonfluxx
10-13-2007, 08:22 AM
Mr eric here is the link

http://www.productionjunky.com/vtm/mreric/

now do it

domedia
10-13-2007, 01:05 PM
Nice one Neon!

Mr Eric
10-13-2007, 01:06 PM
Ok neon this is really great stuff but unfortunately im at a friends place right now and its night time here in australia and i cant get access to my pc until tommorrow but i will get on my comp as soon as i get home and do everything that your telling me in the movie, ive just downloaded the same program you used to make this video but my friends internet is slow so when i start recording the video half way through the screen goes red. so i would very very much appricate if you could leave this video on the net so that i can watch it tommorrow
this is really really good work thank you so much
ill post another message tomorrow when ive watched and done every thing as instructed
bye

neonfluxx
10-13-2007, 06:44 PM
Hey domedia I was thinking of redoing this for pc with dwc logo on it and directed to the members not just mr eric. I was also thinking of doing one for mac. I was considering doing some css videos and spry as well. Would that be okay.

neonfluxx
10-14-2007, 07:40 AM
Eric I am removing the VTM tomorrow.

Mr Eric
10-14-2007, 10:50 AM
hey neon when i got home today i opened the url to the video but it only loads the 2 firsts seconds of the video, then stops. ive only got 56kbs dial up. cant get broadband where i am. so can you please send me the video to my email epitcher_90@hotmail.com ill download it from there. ive downloaded wamp5 1.7.3.
thanks :)

domedia
10-14-2007, 06:24 PM
Hey domedia I was thinking of redoing this for pc with dwc logo on it and directed to the members not just mr eric. I was also thinking of doing one for mac. I was considering doing some css videos and spry as well. Would that be okay.
You bet. Will put online like the other tutorials with credits to you.

neonfluxx
10-14-2007, 07:05 PM
i will make them today. I will do one for PC and Mac.

neonfluxx
10-14-2007, 07:20 PM
sorry Eric, I don't email the files to anyone. I would recommend find a computer with high speed and doing it there. The VTM is for online training only.

davidj
10-14-2007, 09:29 PM
please Mr Eric

give these a shot

http://www.dreamweaverclub.com/vtm/php-mysql-apache.php

if you want to use dreamweavers built in functions after you have tried these then i accept that hand coding is not for every one and i therefore leave you in another's hands who has certificates

Mr Eric
10-14-2007, 10:13 PM
ok neon ill find pc with broadband, but where will you be posting the link to your new vtm?

neonfluxx
10-15-2007, 01:17 AM
Domedia i am done with the video. I will pm you a link to download the zip.

Mr Eric
10-15-2007, 06:46 AM
hey neon can you please send me the link so that i can download the zip?
thanks

neonfluxx
10-15-2007, 08:08 AM
As I said before. The tutorials are only available online. I have given them to domedia and he will be posting them soon i think.

Mr Eric
10-15-2007, 12:29 PM
OK ive found my problem i looked at the tutorial video on how to configure dreamweaver, davidj told me the url http://www.dreamweaverclub.com/vtm/php-mysql-apache.php

so i looked at it, when i tried to connect to mysql through dreamweaver didnt work, so i went into http.conf file and went to change the documentroot, to a diffrent directory and i relised that all the time that when ive been having this problem ive been typing the \ back slash all the time instead of the / forward slash and this caused my error.
so all this just because of a simple stupid little human error
pfft haha
thanks for all your help neonfluxx

davidj
10-15-2007, 01:47 PM
was it dreamweaver that had the incorrect setting Mr Eric

Mr Eric
10-16-2007, 07:05 AM
no it wasnt dreamweaver it was httpd.conf apache2 file, i didnt map out the correct DocumnetRoot directory.

davidj
10-16-2007, 07:13 AM
using the wrong slash

its a mine field

neonfluxx
10-16-2007, 08:07 AM
as I stated. Its a configuration issue. Not a php one. and all the php in the world wouldn't help. If he had done wamp like i showed in the VTM none of that would have happened. Oh DJ :P

davidj
10-16-2007, 09:02 AM
let me remind you again of the original post


Ive got Apache 2 running good
Ive got PHP 5 running sweet with all the files and code lines
set up to work with the apache server
Ive got MySQL 5 running good and can access it through the command prompt


this is exactly how my setup is. All running good

I suggested that he learns PHP as he stated the above technologies are running great so by opening notepad he could write some php with no problems.

you came by and said learning PHP wont solve his problem and he needs to install WAMP. I said he wouldn't have a problem if he learnt to code PHP!

Please tell me what your certified in? something to do with windows, linux and a mac

neonfluxx
10-16-2007, 06:25 PM
Posted from PM: Message from Mr. Eric to Neonfluxx

AWESOME
i just watched your video and done everything that you instructed, everything is running good and i now can make a database connection in dreamweaver. thanks for all your help you are the greatest :wink:

So DJ, he was able to connect straight away with my VTM. You see DJ it was configuration issue and a simple one at that. You are a gifted PHP coder but coding wouldn't help. So I was right after all. Thanks for your input though DJ.

neonfluxx
10-17-2007, 12:23 AM
Please tell me what your certified in? something to do with windows, linux and a mac

Obviously you need some server classes if thats all you can come up with.

(Runs away laughing)

Stops looks back at dj and the tears are flowing. :wink:

Mr Eric
10-17-2007, 02:57 AM
yeah Neons video is really good, it helped me out heaps
thanks neonfluxx

neonfluxx
10-17-2007, 08:42 AM
Your very welcome MR Eric. Glad to see you finally on your way. You to DJ :wink:

davidj
10-17-2007, 08:46 AM
Posted from PM: Message from Mr. Eric to Neonfluxx

AWESOME
i just watched your video and done everything that you instructed, everything is running good and i now can make a database connection in dreamweaver. thanks for all your help you are the greatest :wink:

Aha Bless
your first thank you post... You wallow in it and enjoy it...

When you get one of those posts every other day you become accustomed to them... Although they are nice to receive, in time you will take them privately with grace and dignity.

but since its your first ill let you off

neonfluxx
10-21-2007, 06:46 AM
you still just can't say i was right. Just cause you are truly without dignity as per your own words. so much for your grace. lol One thing you will learn. I only comment about things I know about. If i am not sure i will not answer at all. But i don't make answers just for the sake of answering the questions. Common sense DJ thats all you need there.

davidj
10-21-2007, 10:26 AM
you still just can't say i was right.
you got him to reinstall server side software... Its like someone saying "i cant launch note pad" and you saying "just reinstall windows" and claiming victory for the resolution!... hehe

domedia
10-22-2007, 03:22 PM
This is not constructive guys. Closing thread.