BrandNewbie Question

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

Locked
Caged
Forum Newbie
Posts: 10
Joined: Fri Nov 29, 2002 2:11 am

BrandNewbie Question

Post by Caged »

Ok, this is probally gonna sound stupid, but hey we all gotta learn some how. I'm using apache, and just learning php. On a tutorial i read it said to make a file and save it as info.php and put it in the root map of my server. What is the Root Map of My Server? :?:
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

The root of your webserver is where you would put pages that you want to be accessible via the URL. IIRC Apache's root is the htdocs folder - if you find where you installed Apache to and look for that folder it should contain the pages that are displayed when you do http://localhost/ .

Hope it helps,
Mac
Caged
Forum Newbie
Posts: 10
Joined: Fri Nov 29, 2002 2:11 am

Post by Caged »

Cool, that got it sorta....but I think i'm doing something else wrong....as you can tell i'm just trying to practice to sorta understand the concept of this. but I opened note pad and typed this

<?php
echo("Hello world!");
?>


and i saved it as hello.php and typed this in:
http://localhost/hello.php

I don't get a 404 no more, but I get a download box that pops up when i connect to that address, Any clues what i might have configured wrong??
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

PHP isn't configured properly because the webserver can't recognise the .php extension as something it can do anything with. Which version of Apache are you using?

Mac
Caged
Forum Newbie
Posts: 10
Joined: Fri Nov 29, 2002 2:11 am

Post by Caged »

Version 2.0.43 And I'm using PHP 4.2.3 on Windows XP OS
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

I'm locking this topic because it has been continued in a new thread and this'll get confusing otherwise.

To see what's happening with the problem go to:
viewtopic.php?t=4698

Mac
Locked