PDA

View Full Version : Connection not defined (localhost)


mick106153
07-16-2009, 10:30 AM
Why does this keep recurring?
If I go to the bindings tab and click (for example) "Recordset (ProductCategories)" a window - DataSources - pops up. It reads "Connection not defined (localhost)" and the only option is "OK"
Of the course the connection IS defined and has been over and over again.
When I attempt to define by filling in the "MySQL Connection" dialog, everything works, I select the appropriate data base and it tests OK but when I click OK in that dialog I'm told…

"Cannot create new Connection because the file already exists.

Please rename either the connection or the file.

("and the path to the connection in here")"

Of course doing that raises all kinds of other problems but if I'm successful I can again have access to (for example) "Recordset (ProductCategories)" for the duration of the session. Next time I start DW the problem returns.
I've searched DW's help and these forums and found no mention of "Connection not defined (localhost)" or "Connection not defined".

Please help!

Mick

Ray Borduin
07-16-2009, 10:33 AM
What server language are you using? That can sometimes happen when the server language isn't identified properly initially by DW.

mick106153
07-16-2009, 10:57 AM
Server version: 5.0.51b
phpMyAdmin - 2.11.8.1
MySQL client version: 5.0.24a

Mac Dual 2.7G5 OS X 10.4.11

DW CS4 10.0 Build 4117

mick106153
07-16-2009, 01:31 PM
Ray are you there?

Mick

Ray Borduin
07-16-2009, 02:25 PM
I'm here... turns out I don't know everything. You could try submitting a support incident and we could have someone debug what might be going on.

Is your page saved in the site at the time when the connections don't show? That could be the issue.

mick106153
07-16-2009, 02:52 PM
Yes saved or not makes no difference.
The only clue I saw was improper case usage in one example. But that's not the cASE here.
Shall I still take this to support?

Mick

Justin Nemeth
07-22-2009, 04:02 PM
Do you have a testing server defined? Basically, DW will upload a few files to your testing server so it can determine if the db connection is working. If your testing server is not setup correctly, that is likely the issue.

mick106153
07-22-2009, 05:14 PM
I did take it up with support and they suggested trashing the mmServerScripts folder from the local site root. I did that and that enabled me to maintain a connection long enough to realize that my mucking about had imposed the 2 following variations:
mysql_select_db($database_localhost, $localhost);
mysql_select_db($database_connintuHorses, $connintuHorses);
randomly thus causing me to notice the problem only sometimes.
I think the presence of that difference caused other things to change in an attempt to adapt to my weirdness but I'm not smart enough to know if that's true.
In any event, careful scrutinizing of the entire site and settling on a common definition has seemed to have fixed the problem - for now.
I think the corrupt mmServerScripts folder may have been the incipient cause.
Time will tell.

Mick