Re: Re: Parsing a PHP file - Newbie alert
| From: | Andrew Hargreaves | Date: | Wed, 16 Feb 2005 18:02:46 +0000 |
| Subject: | Re: Re: Parsing a PHP file - Newbie alert | ||
| References: | 1 2 3 4 5 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-25596@lists.php.net to get a copy of this message | ||
>
> Andrew Hargreaves wrote:
> > On Tue, 15 Feb 2005 19:20:52 -0500, Jason Barnett
> > <jason.barnett@telesuite.com> wrote:
> ...
>
> >>>When I tried to run my first PHP file to show the PHP Info (<?php
> >>>phpinfo(); ?>) the browser, Firefox 1.0 did nothing.
> >>
> >>Assuming index.php is in the docroot and it contains the phpinfo() call:
> >>
> >>Is this a local server and is the server actually running? Try browsing
> >>to http://localhost/index.php if this is the case.
> >
> >
> > I knew I forgot to add something. yes the file is in the htdocs folder
> > of my apache2 folder on a local server that is running, as confirmed
> > by checking services.msc
> >
> > As the file is on my local PC I have been opening it directly (File,
> > Open File), as opposed to using
> > http://localhost/index.php. Could this
> > method have caused the problem?
>
> Absolutely! It's a common mistake. If you try to open a PHP file
> directly then your browser would have no idea to send the script through
> PHP. But when you browse to that webpage on your local machine
> (http://localhost/index.php) Apache should do all of that work for you.
> Assuming of course that Apache is set up properly; if it's not, then
> tell us what happened when you tried going to this webpage.
>
> >
Ok, some progress has been made but not in a good way.By browsing to
http://localhost/index.php, I receive the message
"The connection was
refused when attempting to contact localhost", same for
127.0.0.1/index.php so I think I need to look at the DNS settings now.
I'll let you know how I get on.
Andrew