amir103
05-02-2009, 07:37 PM
I've been running a php script on my shared hosting account, and this code typically runs for days as it indexes web pages. It constantly sends status info to the browser through 'echo'. Anyway, I got a dedicated server and after installing LAMP etc etc I ran the script and noticed that it doesn't show realtime information anymore - here's what i mean - take a look at this small script which echoes each second as it passes:
<?php
$counter = 1;
while ($counter < 200) {
sleep(1);
echo $counter."<br />";
$counter++;
}
?>
When I run this on my shared hosting account, it actually displays each second as it passes in realtime, while on the dedicated it keeps 'loading' for 200 seconds and then suddenly displays all the numbers. What must be configured differently for this to happen? (I obviously want it to run in realtime) They're both running php 5, and I don't think its so much the type of hosting but something with php.ini, any ideas why this is happening? I can post both php.ini files if it helps.
<?php
$counter = 1;
while ($counter < 200) {
sleep(1);
echo $counter."<br />";
$counter++;
}
?>
When I run this on my shared hosting account, it actually displays each second as it passes in realtime, while on the dedicated it keeps 'loading' for 200 seconds and then suddenly displays all the numbers. What must be configured differently for this to happen? (I obviously want it to run in realtime) They're both running php 5, and I don't think its so much the type of hosting but something with php.ini, any ideas why this is happening? I can post both php.ini files if it helps.