View Full Version : PHP, A Beginners Guide...

11-08-2007, 05:47 AM
Hey there,
My question is in regard to the "www directory" setup. At the beginning of the "Configuring Dreamweaver" tutorial, you had mentioned that you pointed the "www directory" to a directory within "My Documents."
I think this is the step I'm missing because I get an error when previewing my pages that says something like this... "NOT FOUND...The requested URL /web_root/TEST/foo.php was not found on this server."
Any help would be awesome.

Cheers and thanks very much for your tutorials.

11-08-2007, 07:41 AM
which directory did you point the WWW to?

11-08-2007, 05:34 PM
Thanks for the reply.
...in fact, I don't even know how to "point" or link the www directory anywhere. In the tutorial, this was done without showing it. Basically, I'd like it to point to my site folders I have stored in My Documents/website/projects/project/... I think in the tutorial, there was a ".../web_root/TEST/" path.
I'm just starting out with this so I'm sorry if my questions are very novice.
Cheers and thanks

11-08-2007, 06:38 PM
try setting an alias from the wamp icon in your systems tray

just click alias and select new then follow the onscreen instructions

11-09-2007, 01:23 AM
Thanks for the info however, now I get this error happening:

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\Documents and Settings\foo\My Documents\My_Web\project_foo\web_root\TEST\connect ions\connection.php on line 8

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Documents and Settings\foo\My Documents\My_Web\project_foo\web_root\TEST\foo.php on line 10

any ideas?


11-09-2007, 04:22 AM
one more thing to add to my last post..
I noticed the when one creates an alias, it'll alias localhost/foo. However, in your tutorial, it looks like you were able to somehow remap localhost instead.
Is there more to this?

11-09-2007, 07:32 AM
no you got it right

in the tutorial i set my WWW dir to the dir in my documents so i did this from the installation point. If you forget to do this you can use an alias to get round it

11-09-2007, 08:38 PM
Thanks for the help thus far..

Ok, so I changed my alias to something like "localhost/foo." Do I need to change my testing server within DW to "http://localhost/foo" or just leave it as "http://localhost" as in the tutorial. Also, do I need to change anything in the "connection.php" script? At the moment, the line of code in question reads:
"$link = @mysql_connect('localhost', $username, $password);"

Thanks again.

11-09-2007, 08:45 PM
if your working from foo then change it to foo

11-09-2007, 09:04 PM
should the alias go as deep as:

c:\Documents and Settings\MY Name\My Documents\My_Web\project\web_root\TEST\(php files are here)?
Because I'm still getting the same message when trying to preview the page.
That error being: "Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in"


11-10-2007, 07:41 AM
post your connection script

11-10-2007, 05:01 PM
I was changing the 'localhost' to 'localhost/alias' but still nothing. It should
basically a mirror image from your tutorial script:

$database = "zippics";
$user = "bz";
$password = "**********";

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

//mysql_select_db($database, $link);



11-11-2007, 06:06 AM
I got it and you'll never guess what a silly mistake it was on my part.
I defined $user yet called $username.

Thanks for your help.

11-11-2007, 10:29 AM
great. nice work

you will encounter allot of those errors / mistakes in your time and the fact you successfully found it means your well on your way to becoming a good programmer