Forum Moderators: coopster
The site uses .shtml SSI pages with cgi scripts and php code as includes. Muliple includes on the same .shtml page using exec cgi-bin work just fine.
I just recently ran accross a problem where the addition of a second php include in the same .shtml page 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 in 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,
that's a tough one. It seems strange that the first works and the second doesn't, I can't see why it would look at the two of them differently.
have you tried anything else to trick it into working?
I wonder if outputting some text between the 2 includes would change anything.
To be honest I am not sure, I assume there is no extra information in any logs or you don't get any errors.
Edit...a bit more research shows this is caused by a problem in apache 2. If you can use a different version of apache, you should be ok.
I have been beating myself over my head on this one. I have googleed up and down the web and there appears to be no one who has mentioned this as bug.
Guess I need to spend the weekend installing the latest apache stuff.
Thanks for the info.
Dave,
The threads I read stated that the fix wouldn't be happening anytime soon.
For a good read on exactly this visit
[bugs.php.net...]