I have an app I built for a client. It goes out and scrapes needed data. I have it hosted on a few servers on different hosts. Today I put it on a new host and the behavior has changed. In the past it would output the results as it found them. Now it seems to want to do all the processing and then write the output. This is a problem because the script will often time out. When the output is spit out as its found timeouts are not bad because all my clients need is to see the results. When it tries to do all the processing first and times out the results are not displayed at all. Even worse they could be sitting there for a long time before they get no results. I'm pretty sure this is an PHP.ini issue but I do not know the setting to change. This could also be an Apachie thing too but I'm not sure what I will do if it is. thanks for your help
Between the two environments, is PHP setup the same? Is one in CGI mode and the other an Apache API? Is the scraping occurring on a batch process (cron)? -Bing
HI BingP, Thanks for the reply. When using phpinfo it seem the two setups are very similar. They are both CGI mode. This is not a cron job.
Setting the time limit to 0 is a good start, but to output to the browser as it loads try this: function flush_buffers() { ob_end_flush(); ob_flush(); flush(); ob_start(); } ob_start(); //content flush_buffers(); //content flush_buffers(); //etc.etc. PHP:
Can't you just compare the two php.ini files and find every little difference and see which one is likely to be causing it?