php-windows Digest 16 Feb 2005 16:36:15 -0000 Issue 2577

Topics (messages 25590 through 25593):

Re: Parsing a PHP file - Newbie alert
        25590 by: Chris Ramsay
        25592 by: Jason Barnett

Problem using Include Function with PHP5/Apache2.0/W2K3 Server
        25591 by: Dave Adler

PHP IIS HTTP 404
        25593 by: Stefan

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
[snip]
i could be wrong (been a while since I looked up phpinfo function) but
i do believe you must do

echo phpinfo();

Please feel free to correct me...
[/snip]

Indeed, you can just do:

<?php phpinfo(); ?>

HTH ;)

--
Chris Ramsay, Web Developer
The Danwood Group Ltd.
Tel #: +44 (0)1522 882 288
DDI #: +44 (0)1522 834 482
Fax #: +44 (0)1522 884 488
Email: chris[dot]ramsay[at]danwood[dot]co[dot]uk
Web  : http://www.danwood.co.uk

--- End Message ---
--- Begin Message ---
Please keep email responses to the newsgroup / list.  Helps me stay
organized and I help out when I can.

Andrew Hargreaves wrote:
On Tue, 15 Feb 2005 19:20:52 -0500, Jason Barnett
<[EMAIL PROTECTED]> 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.


I'm at work now but I'll give it a go tonight when I get in and let you know hwo that goes.

Regards

Andrew H

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
I am new to PHP and Apache. I am trying to use the include function to 
include a file that has my web page header and menu, similar to what I used 
to do with SSI.

So I have a file called menu.inc that is in the /includes folder off of the 
doc root.

the file has HTML in it to display a menu and header

IN my main page, I have the line

<?php include("/includes/menu.inc"); ?>

Which I would expect to insert the HTMP from menu.inc at the location of the 
line of code.

The content of the include file doesn't display. Instead, I get a link that 
says function.main and below that I get a link that says function.include

I can run other PHP code with no problem. The include files are in a folder 
below the doc root called Includes.

This is running on Windows 2003 Server. I did a default install of Apache 
2.0 and PHP 5.

This is probably a settig in httpd.conf or php.ini but I can't seem to find 
it in the docs.

Any help would be greatly appreciated.

Thanks in advance,

David

--- End Message ---
--- Begin Message ---
Hi
I've a strange problem
When I try to send a form with method="POST" to a php-file I always get an
HTTP 404 error.
I really don't know why, because the file exists on the server.

I use IIS 5.1

Tnx.
Stefan

--- End Message ---

Reply via email to