View Full Version : Problem logging to local host

06-23-2009, 05:35 PM
I trying the excellent training videos from dj for php & mysql. Am having a problem getting DW to behave the way I want it to. (Obviously my error) Here is the information:

This is my connections.php

// this is a database connection script
$database = "dwc";
$username = "bjs";
$password = "bjspwd";
// end of login

$link = @mysql_connect('localhost'.$username,$password);
$db = mysql_select_db($database, $link);


This is my dwc.php

require_once("connections/connections.php");//database connections
$query = sprintf("SELECT * FROM table1");
$result = @mysql_query($query);
$row = mysql_fetch_array(@result};
echo @row['field2'];


NOTE The database does exist!!

When I try to preview in my browser using this

404 error:The requested URL /test/dwc.php was not found on this server.

This is the information from DW Site set up

Local Info:
Site Name: dwc
Local Root Folder: C:\Users\CARO\Documents\localroot\test\
Images Folder: C:\Users\CARO\Documents\localroot\test\images\
Links relative to document
HTTP Address; http://localhost

Remote Info:
Access: Local Network
Remote Folder: C:\Users\CARO\Documents\webroot\test\

Testing Server: PHP MYSQL
Access: Local/Network
Testing Server Folder: C:\Users\CARO\Documents\webroot\test\
URL Prefix http://local/test/

I get this error message when setting up the site using the above parameters.

Error Message: The site URL prefix [/test] for the testing server does not match the site URL prefix [] specified in HTTP Address for the site. This may causse pages using site relative links to display incorrectly at runtime. Proceed anyway?

I proceed and I get the problem of the 404 error.



06-23-2009, 06:25 PM
More information - if I look at the www.directory through wamp it does not point to the required file for the php I am trying to load. Or rather, the file I am trying to load is not there - the folders that are there are webroot and website and an index.php file that came from a previous tutorial I was trying.