Page 1 of 1

dreamweaver and mysql

PostPosted: 21. January 2010 11:16
by daez
i have installed mysql with xampp, but when i go to setup my database connection i get an error, hope someone can help me.

the error is
either:
1. no test server specified for the site
2. the testing server specifided for this site not mapped to c:\xampp\myslq\data\sitedatabase /_mmserverscripts/mmhttpdb.php

but i am not sure what i am supposed to be changing in this.

I have my site files in c:\sitename\publichtml
my xampp is under c:\xampp

i can access and run queries within the database through the admin panel, so its not a database problem at this stage, it appears to be a connection problem.

hope someone can help.. at the moment, i am just setting it up on my local computer, as i cancelled my web host due to not being able to get the site running yet. so i figure if i can get it up and running locally, get it running how i want, then i will look at getting a web host again. but at this stage it was costing me money for something i was not using.

Kind regards in advance

Daez

Re: dreamweaver and mysql

PostPosted: 24. January 2010 14:46
by ChrisColeman
Hi,
there are a few ways to solve your problem, probably the simplest is to add a virtual directory to Apache.At the moment your new Apache installation cannot find the root folder for your testing environment,

-- Firstly you must let Apache know about your development directory - In httpd.conf look for

<Directory "C:/xampp/htdocs">

"This directory gives Apache access to all of your XAMPP pages, you could simply change this but then you would loose access to XAMPP facilities so it's not a good idea"

</Directory>

Instead you need to add a directory for you development environment :-

<Directory "c:\sitename\publichtml">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Now restart APACHE using the XAMPP console and check the log for errors.

Next you should activate virtual directory support in APACHE,

Search for the following file, it's location is dependent upon how you installed XAMPP but should be wasy enough to find :-
C:\xampp\apache\conf\extra\httpd-vhosts.conf
Look at the default configuration already in the file and change it like this, no problem if you use different names for your log files- :-


<VirtualHost *:80>
ServerAdmin postmaster@dummy-host.localhost
DocumentRoot "C:/xampp/htdocs"
ServerAlias http://www.dummy-host.localhost
ErrorLog "logs/dummy-host.localhost-error.log"
CustomLog "logs/dummy-host.localhost-access.log" combined
</VirtualHost>

<VirtualHost *:80>
ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "c:\sitename\publichtml">
ServerAlias server.localhost
ErrorLog "logs/server.localhost-error.log"
CustomLog "logs/server.localhost-access.log" combined
</VirtualHost>
Now restart APACHE again and look for error messages in Apache's error log - If any errors or if APACHE will not start correct the syntax and start Apache again.

Almost done --

Add the following
127.0.0.1 server.localhost
to
C:\WINDOWS\system32\drivers\etc\hosts
-- Which will allow your testing environment to be found by your browser.

Finally you must add the address of testing enviroment to Macromedia - Just click on the sites button, select the site you wish to edit, open the testing server tab, and in the URL prefix add "http://server.localhost". Now whenever DREAMWEAVE trys to open a website it will search in c:\sitename\publichtml.

eg. Or if you had a website at
c:\sitename\publichtml/web1 you would give DreamWeaver a URL prefix of c:\sitename\publichtml\web1, in this way it is fair easy to run many websites in Dreamweaver through a single virtual directory. Of course you can always set up a different virtual directory in Apache for each website - but the gain is hardly worth the effort.

Chriss.

Re: dreamweaver and mysql

PostPosted: 24. January 2010 16:36
by AndyD_OHD
I read this post with interest and wondered whether the original poster made the recommended changes and got things to work....?

Re: dreamweaver and mysql

PostPosted: 27. January 2010 08:48
by daez
AndyD_OHD wrote:I read this post with interest and wondered whether the original poster made the recommended changes and got things to work....?


I have only just managed to get back to check on my post, have just printed out that reply and will try it out shortly. Will let you know how I go.

Re: dreamweaver and mysql

PostPosted: 27. January 2010 10:32
by daez
HHMMM nearly got it there, but keep getting an error when starting apache.

in the error log it says:

Syntax error on line 55 of C:/xampp/apache/conf/extra/httpd-vhosts.conf:
DocumentRoot takes one argument, Root directory of the document tree

what i have at that section is:
<VirtualHost *:80>
ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "C:\racingline\public_html">
ServerAlias server.localhost
ErrorLog "logs/server.localhost-error.log"
CustomLog "logs/server.localhost-access.log" combined
</VirtualHost>


which is what was put in the very much appreciated reply. i even tried changing the line 55 to

ServerAlias http:/www.racingline.localhost

but that just gave me the same error message.

I have done all the other changes, including the windows \ hosts file.

Re: dreamweaver and mysql

PostPosted: 27. January 2010 11:08
by Wiedmann
Code: Select all
DocumentRoot "C:\racingline\public_html">

Syntax error on line 55 of ...: DocumentRoot takes one argument, Root directory of the document tree

The last character (">") is wrong.

Re: dreamweaver and mysql

PostPosted: 28. January 2010 07:31
by daez
Am slowly progresing with this :D , but now I am getting an error in the log.

error now being received is:

[warn]_default_virtualHost overlap on port 80, the first has precedence
Unable to open logs

i checked the logs and iniitally they had become associated with notepad, managed to drop that association (i am using windows 7 so had to do it by command prompt). restarted my computer, but still getting the above error.

Am not at home at moment, so that is all the info I have with me.

Re: dreamweaver and mysql

PostPosted: 28. January 2010 08:06
by Wiedmann
[warn]_default_virtualHost overlap on port 80, the first has precedence
Unable to open logs

I guess a "NameVirtualHost" directive is missing.

Re: dreamweaver and mysql

PostPosted: 28. January 2010 09:19
by daez
ok, have done all that, but still getting the same error, but on the bright side :D there are now no errors in the error log for apache.

i even tried updating the mmhttpdb.php that is in my public_html directory, but still getting the same error.

i am not sure where the file is that the error is talking about. the error indicates that it is the http://server.localhost/_mmserverscripts/mmhttpdb.php that is not configured or that there is no test server.

I am able to access the database through the mysql admin and i can run queries and updates and such. the only location of _mmServerScripts is in my site public_html folder.

and have tried updating that to put in my database, user name and password, but that didn't work either. i know i am missing something here, and knowing my luck it is going to be something so obvious, as usually is the case with me.