Trillium Posted December 16, 2006 Share Posted December 16, 2006 I have .shtml pages that include multiple ssi files and php files to display the page. This was working before the hosting service upgraded. The system is now: Apache 2.0.53-3.4 and PHP 5.0.4-13I've been able to reproduce it with a very simple file. One has one include and works fine while the second has two includes and hangs. Multiple includes of standard .html files work okay. ---------------------------blankfile.php---------------------------<?php ?>--------------------------- test files:---------------------------test1.shtml---------------------------<html><head><title>This is a test with one php include that works fine</title></head><body><!--#include file="blankfile.php" --> <p>This is a test.</p></body></html>--------------------------- ---------------------------test2.shtml---------------------------<html><head><title>This is a test with two php include files that hangs</title></head><body><!--#include file="blankfile.php" --> <!--#include file="blankfile.php" --> <p>This is a test.</p></body></html>---------------------------What should be upgraded? Apache or PHP? To what version? My hosting service is skeptical that it's his problem.I had to disable a production system until this is fixed so any help would be appreciated. Thanks.- Trillium Quote Link to comment Share on other sites More sharing options...
steviewdr Posted December 16, 2006 Share Posted December 16, 2006 Why such a mix of ssi and php!!??Also could the error be that you are including the same file (blankfile.php) twice - and it mightn't like that??As for upgrading - none needed. Its a tweaking of your script required IMO.Also - check your apache error logs.-steve Quote Link to comment Share on other sites More sharing options...
Trillium Posted December 17, 2006 Author Share Posted December 17, 2006 The code has been working for two years until the hosting service upgraded the PHP from 4 to 5.The reason for the mixture of php and shtml is that the orginal website (which reasonably large and long standing) runs entirely off of .shtml pages. But they wanted a shopping cart added to their website. Rather than rewrite the entire website (which would cost a lot; they're a not-for-profit org) I made the decision to imbed the php in their .shtml pages to handle the database calls and dynamic data. So each page of the shopping cart, is a .shtml page which includes the standard .shtml headers, footers, and side menus, as well as include the php files to handle the cookie variables, database calls, and display of the dynamic part of the page. When I wrote the system, I discovered that .shtml pages could include php files and they would work, but php files couldn't include the .shtml files and work properly. And to make matters worse, those include files change several times in the year so making them support two sets of include files is out of the question. (They barely can change the html themselves and I have to occassionally fix their html goofs.)I can simulate the problem with more complex examples but I wanted to demonstrate it with the most stripped down version so it would be easy to duplicate.Will an upgrade past the current configuration do the trick?Thanks.LL Quote Link to comment Share on other sites More sharing options...
steviewdr Posted December 18, 2006 Share Posted December 18, 2006 Im not sure if an upgrade will work. I doubt it. Check that your php tags are opened and closed correctly.Also - are you using short or long php tags, e.g.:<?phprather than <????The <? short tags are disabled in php.ini in later versions IMO.Well - your code works in my setup. Have you error reporting turned on? php could be throwing an error if you are defining variables twice or if you have two include_onces etc. etc.-steve Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.