This is a discussion on Simple Ping Tool - Display Each Line within the PHP Language forums, part of the PHP Programming Forums category; Rami Elomaa wrote: > > Make sure you're not using output buffering, check php.ini for this. Do > ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Rami Elomaa wrote:
> > Make sure you're not using output buffering, check php.ini for this. Do > your other scripts work as expectedly? If you do like this: > <?php > while($i++<5) { > print($i); > sleep(5); > } > ?> > does it print the numbers one-by-one with 5 second intervals or are they > all printed at once, after 25 seconds when the script exits? > It's the latter when running through a browser. I did find output buffering to be enabled. I disabled it, restarted httpd, but the same results. ; output_buffering = 4096 output_buffering = Off 12345 is outputted only after the script exits. Matt |
|
|||
|
Matt wrote:
> > ; output_buffering = 4096 > output_buffering = Off > > 12345 is outputted only after the script exits. > > Matt Here's something interesting. Running php(info) shows: output_buffering no value no value Shouldn't this be: output_buffering Off Off |
|
|||
|
At Sun, 27 May 2007 12:03:40 -0700, Matt let h(is|er) monkeys type:
> Matt wrote: >> >> ; output_buffering = 4096 >> output_buffering = Off >> >> 12345 is outputted only after the script exits. >> >> Matt > > Here's something interesting. Running php(info) shows: > output_buffering no value no value > > Shouldn't this be: > output_buffering Off Off You may have a separate php.ini for the CLI and isapimodule versions explaining the diffrence. I did my tests in a browser btw. Can't reproduce the problem you have when trying it in a browser. Your safety mechanism using the regex (haven't seen the pattern) and the escape command look ok. You may want to check man ping for all options and the effects they have in case you missed some potentially risky ones (not that I think that's the case as long as you don't run ping as root.) and modify your regex accordingly. Sh |