PDA

View Full Version : Beginners Guide Part 8 Problem


jaymo
01-14-2009, 05:05 PM
Firstly thanks for the great tutorials.

I have followed the videos in order and when it comes to getting the data from the database and I F12 it. I get:

"The requested URL /Test/dwc.php was not found on this server."

I'm sure its something to do with the setup and not the code. The differences in the videos and my setup is I am using WampServer instead of WAMP5 and I didn't know how to move the www Directory to my documents (if that makes any difference)

I'm also not quite clear where that SQL database is located. Does it get stored on the localserver? I know that when i browser to http://localhost/phpmyadmin/, it says access denied to database. I'm new to all this php so I hope you can help. Many thanks :)

edbr
01-15-2009, 01:25 AM
if you type http://localhost do you see your site?

jaymo
01-15-2009, 01:35 AM
hey, well when i go to that i see the WAMP server config. I dont remember the tutorials saying about uploading it to the localserver. Is this needed?

edbr
01-15-2009, 03:19 AM
sorry i cant comment on the tutorials , but if you have a local testing server configured localhost should show you your root folder

jaymo
01-16-2009, 03:16 AM
yeh your right it should. I figured out that I need to add an alias. No instead of file not found it says parse error on line 5:

<?php

require_once("Connections/connection.php")

// Query results from database
$query = sprintf("SELECT * FROM table1");
$result = @mysql_query($query);
$row = mysql_fetch_array($result);


echo $row['field2'];

?>

Also im confused as to where the sql database actually is. Doesnt it have to be exported from SQL manager lite, and then placed on the localserver? Hope someone can help cos im lost! :)

edbr
01-16-2009, 04:15 AM
yes it has to sit on the server , but where is is now? you wamp server has a mysql server an the data base should be there , you will also have to granyt permision for username ans password to use iirt , a standare security

davidj
01-16-2009, 07:55 AM
missing termination semi colon here


require_once("Connections/connection.php")

edbr
01-16-2009, 08:59 AM
return of the jedi

davidj
01-16-2009, 09:21 AM
only passing through ed on my way to Alderaan

edbr
01-16-2009, 09:36 AM
may the force be with you then

jaymo
01-16-2009, 02:47 PM
thanks for the replies. Stupid of me to miss the semi colon, im too used to compiler help for that. I am still getting the pase error on line 5 tho. I exported the database in sql manager but the tutorials dont say anythin about that, so maybe its not needed. Im assuming I dont need the other php file that is present in the video for lesson 8? it should just work once the dwp and connection files are created in dreamweaver?

I must be missing something in the configuration. Any source files anywhere?