Forum Moderators: phranque

Message Too Old, No Replies

Second SSI include not executing

Development server running Red Hat Linux 8.0

         

dabarth

2:01 pm on Jun 23, 2005 (gmt 0)

10+ Year Member


I have two websites. The production website is on a virtual hosting environment. The development website is on a PC clone running Red Hat Linux 8.0. The development site has been up and running great for about 3 years.

The site uses .shtml SSI pages with cgi scripts and php code as includes. I just recently ran accross a problem where the addition of a second php include does not execute on the development server.

Here is test.shtml

<html>
<head></head>
<body>
<!--#include virtual="/stuff1.php"-->
<!--#include virtual="/stuff2.php"-->
</body)
</html>

Here is stuff1.php

<?php
echo "Hello world from stuff1.php\n";
?>

Here is stuff2.php

<?php
echo "Hello world from stuff2.php\n";
?>

Here is the output of test.shtml on the browser

Hello world from stuff1.php

Here is the html output of test.shtml

<html>
<head></head>
<body>
Hello world from stuff1.php

<?php
echo "Hello world from stuff2.php\n";
?>
</body)
</html>

I can't seem to find the cause of this problem. Any Ideas out there?

Thanks,

jdMorgan

6:59 pm on Jul 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



dabarth,

That's odd...

The only thing I see wrong is that you're missing a space before the closing "-->" in each line. The correct format is "<!--#directive -->" with no space ahead of the directive, and one space after it. But that's such a common error, that I doubt it would cause problems.

Have you tried reversing the order to call stuff2.php first, and if so, what happens?

Jim

jatar_k

7:08 pm on Jul 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



also see
[bugs.php.net...]

it is a known bug though I can find anything newer than 2004 that gives reference that it is fixed