Simple Ping Tool - Display Each Line

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 > ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 05-27-2007
Matt
 
Posts: n/a
Default Re: Simple Ping Tool - Display Each Line

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
Reply With Quote
  #12 (permalink)  
Old 05-27-2007
Matt
 
Posts: n/a
Default Re: Simple Ping Tool - Display Each Line

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
Reply With Quote
  #13 (permalink)  
Old 05-27-2007
Schraalhans Keukenmeester
 
Posts: n/a
Default Re: Simple Ping Tool - Display Each Line

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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0