The problem is described in a little more detail here:
http://bugs.php.net/bug.php?id=17868

Basically, if you have a document which has two or more include statements, each including a chunk of PHP code, only the first statement gets parsed by PHP. PHP is called everytime, but only the first statement gets executed as PHP code. All the rest just return the PHP code itself.

For example:

test.php:
<?php
printf("Hello!<BR>\n");
?>

test.shtml:
First Include:<BR>
<!--#include virtual="test.php"-->
Second Include:<BR>
<!--#include virtual="test.php"-->


Requesting test.shtml via Apache 2 would return the following:

First Include:<BR>
Hello!<BR>
Second Include:<BR>
<?php
printf("Hello!<BR>\n");
?>


The same thing happens even if the included PHP code is different each time -- only the first include gets parsed by PHP and the rest just return the code. This problem appeared with Apache 2 -- earlier versions would have parsed both include statements.

Michael



At 01:17 PM 1/20/2003 +0100, you wrote:

"Michael D. Petersen" <[EMAIL PROTECTED]> wrote... :

> I have been following PHP Bug #17868 for some time now (since upgrading to
> Red Hat 8.0 and Apache 2.0) with quite a bit of interest.  This is the bug
> where multiple include statements don't work and only the first one gets
> parsed by PHP.

Yes, only the first one gets parsed by all the subsequent get executed.
This speeds the process up - what's the problem?


--
Maxim Maletsky
[EMAIL PROTECTED]

--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to