[56K WARN] document root troubles

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NiteShift
Forum Newbie
Posts: 6
Joined: Sat Sep 30, 2006 11:23 am

[56K WARN] document root troubles

Post by NiteShift »

Hi guys/gals my name is Lee and I'm from Manchester England. I am a part time uni student and we are doing a module in Software engineering. I am currently looking through a few tutorials on PHP (that is waht we have to program in). The only problem is that I don't have any experience of PHP. I have downloaded WAMP5 but can't find any help files to get me started. I have saved a basic hello.php file in the www directory but yet when I type in http://localhost/hello.php I just get:

Not Found

The requested URL /hello.php was not found on this server.
Apache/2.0.59 (Win32) PHP/5.1.6 Server at localhost Port 80


I'm running Windows XP Home if that helps.

Thanks in advance,

Lee
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Crack open your %Apache Install Folder%/conf/httpd.conf and tell me what DocumentRoot is set to (do a search of the file)
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

What is the physical path to your htdocs directory ?
NiteShift
Forum Newbie
Posts: 6
Joined: Sat Sep 30, 2006 11:23 am

Post by NiteShift »

Image

I have opened the File titled Apache 2 and these ar the files it opens.....what do I need to do now?

Thanks
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Go to the httpd.conf file and search for "DocumentRoot" Give me that entire line.
NiteShift
Forum Newbie
Posts: 6
Joined: Sat Sep 30, 2006 11:23 am

Post by NiteShift »

Ambush Commander wrote:Go to the httpd.conf file and search for "DocumentRoot" Give me that entire line.
When I click on it, it just searches for the best program to open it and if I right click on it there is no option to search it. :cry:
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Open it with Notepad. Then search.
NiteShift
Forum Newbie
Posts: 6
Joined: Sat Sep 30, 2006 11:23 am

Post by NiteShift »

A ha!!! just found it......


DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/wamp/www"
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Is that where you placed your file?
NiteShift
Forum Newbie
Posts: 6
Joined: Sat Sep 30, 2006 11:23 am

Post by NiteShift »

Is that where I would save the hello.php file??
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Yes. You can change it to a more convenient place if you like, but by default that's where you'd put the goods.
NiteShift
Forum Newbie
Posts: 6
Joined: Sat Sep 30, 2006 11:23 am

Post by NiteShift »

Just checked and it is in that file
Post Reply