OK, so I have located the httpd.config file but still no joy, I know it is
something very simple and silly.
I will explain in detail what I have done, I think this will give a better
idea of where I am going wrong.

Loaded Apache from the CD first in its default location c:/program
files/apachegroup/apache/htdocs.
Then loaded MySQL which as far as I can tell is OK.  Then I loaded PHP and
was told to configure the httpd file
Then in start/programs/apache it gave me the config file to edit, this i did
with the following as instructed in the book:
I found the ScriptAlias which gave a path to the apache folder and replaced
it with ScriptAlias /php/ "c:/php/"
Then i added Action application/x-httpd-php /php/php.exe under the Action
section followed by AddType application/xhttpd-php .php under the AddType
section.

According to the book i would now be ready to go!

I was then told to write the following code in my webspace, so i used
Dreamweaver MX, then tried Notepad:
<html> etc etc <body><p>This is a HTML line </p>
<?php echo "This is a PHP line"; phpinfo(); ?>
</body>
I save the file and go to view it in Explorer but i see just the html text
not the php?
Now from what i can see everything looks ok other than that, when i run the
test on apache it says that the syntax is ok so i assume that it is set
correctly.
Now what i cannot understand is, am i saving the php files in the right
place (if there is one?) and should i be running the browser as localhost
which see's the apache page ok when i type http://localhost/ into the
address bar.
One other thing, i tried typing localhost/where the file is located on my
harddrive/ and was given a forbidden page "contact administrator"??

Is there something here that standsout?

Thank you for trying to help.

Andy

"Chris Hewitt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Phil Driscoll wrote:
>
> >There's your problem.
> >Assuming you haven't messed about too much with the apache config, your
php
> >file needs to live inside apache's htdocs directory. Can't remember
exactly
> >where that would be on a windows box - something like c:/program
files/apache
> >group/apache/htdocs maybe.
> >
> Yes, Phil has it. I'd assumed this, I should not have. The directory is
> given by the "DocumentRoot" line in httpd.conf. You did not say exectly
> what error you were getting, I'd assumed that you were just seeing the
> source of your file and that the only problem was php not parsing it.
> Presumably you were getting "Document not found" errors?
>
> Chris
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to