Re[10]: [PHP] Re: system(), flush() and so on...
Hello Darren, Something quick is like that? for($i = 0; $i < 10; $i++) { print $i."\n"; flush(); sleep(3); }; Yeah? There it is: www.xemi.info/flush.php DG> Then I'm not sure. Perhaps someone in-the-know will respond to your DG> question. Else, file a bug report. Your script runs fine on my 'puter, DG> FYI. DG> Otherwise, it would be worthwhile to write something quick to test flush() DG> with. If it is also not working, it will provide more evidence as to the DG> cause of the problem. Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re[8]: [PHP] Re: system(), flush() and so on...
Good day, Then I'm not sure. Perhaps someone in-the-know will respond to your question. Else, file a bug report. Your script runs fine on my 'puter, FYI. Otherwise, it would be worthwhile to write something quick to test flush() with. If it is also not working, it will provide more evidence as to the cause of the problem. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: faeton [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 3:57 PM To: Darren Gamble Cc: PHP General List Subject: Re[8]: [PHP] Re: system(), flush() and so on... Hello Darren, It's quick because of the fact that it's tracing a host near to my server. If you have noticed - ping from my server to login.icq.com that is being traced by default is only 10ms. Try that: www.xemi.info/test.php?host=www.google.com or something like that I waited too long... And still haven't got any results. DG> For whatever reason, your traceroute command is returning results very DG> quickly. It may be functioning normally. DG> Perhaps you should try a command that will take much longer to execute, such DG> as "du / --max-depth=1". -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[8]: [PHP] Re: system(), flush() and so on...
Hello Darren, It's quick because of the fact that it's tracing a host near to my server. If you have noticed - ping from my server to login.icq.com that is being traced by default is only 10ms. Try that: www.xemi.info/test.php?host=www.google.com or something like that I waited too long... And still haven't got any results. DG> For whatever reason, your traceroute command is returning results very DG> quickly. It may be functioning normally. DG> Perhaps you should try a command that will take much longer to execute, such DG> as "du / --max-depth=1". -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re[6]: [PHP] Re: system(), flush() and so on...
Good day, For whatever reason, your traceroute command is returning results very quickly. It may be functioning normally. Perhaps you should try a command that will take much longer to execute, such as "du / --max-depth=1". Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: faeton [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 3:32 PM To: Darren Gamble Cc: [EMAIL PROTECTED] Subject: Re[6]: [PHP] Re: system(), flush() and so on... Hello Darren, You can try it yourself : www.xemi.info/test.php What do you think? Server config: RedHat 7.1, Apache 1.3.20, PHP 4.0.6 loaded as a module. PS. I tried everything. Simply everything. DG> I am not sure what the problem is, then. I presume that you installed these DG> via RPMs, and have PHP operating as an Apache module. Does the simple DG> script provided fail as well? DG> Have you tried some simple scripts with sleep() and flush() to see if DG> flush() works? DG> If you don't hear from anyone else on the list, you may want to try posting DG> a bug report. Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[6]: [PHP] Re: system(), flush() and so on...
Hello Darren, You can try it yourself : www.xemi.info/test.php What do you think? Server config: RedHat 7.1, Apache 1.3.20, PHP 4.0.6 loaded as a module. PS. I tried everything. Simply everything. DG> I am not sure what the problem is, then. I presume that you installed these DG> via RPMs, and have PHP operating as an Apache module. Does the simple DG> script provided fail as well? DG> Have you tried some simple scripts with sleep() and flush() to see if DG> flush() works? DG> If you don't hear from anyone else on the list, you may want to try posting DG> a bug report. Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re[4]: [PHP] Re: system(), flush() and so on...
Good day, I am not sure what the problem is, then. I presume that you installed these via RPMs, and have PHP operating as an Apache module. Does the simple script provided fail as well? Have you tried some simple scripts with sleep() and flush() to see if flush() works? If you don't hear from anyone else on the list, you may want to try posting a bug report. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: faeton [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 3:01 PM To: Darren Gamble Cc: [EMAIL PROTECTED] Subject: Re[4]: [PHP] Re: system(), flush() and so on... Hello Darren, Linux RedHat 7.1, Apache 1.3.20, PHP 4.0.6 DG> Oops, you're right. I did not read that line nor was I aware of that. DG> I just tried . It works DG> exactly as it says it should- outputs the lines as they come in. I also DG> know flush() works fine (at least for me). DG> Perhaps you could provide some information about your O/S and PHP version? Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[4]: [PHP] Re: system(), flush() and so on...
Hello Darren, Linux RedHat 7.1, Apache 1.3.20, PHP 4.0.6 DG> Oops, you're right. I did not read that line nor was I aware of that. DG> I just tried . It works DG> exactly as it says it should- outputs the lines as they come in. I also DG> know flush() works fine (at least for me). DG> Perhaps you could provide some information about your O/S and PHP version? Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re[2]: [PHP] Re: system(), flush() and so on...
Good day, Oops, you're right. I did not read that line nor was I aware of that. I just tried . It works exactly as it says it should- outputs the lines as they come in. I also know flush() works fine (at least for me). Perhaps you could provide some information about your O/S and PHP version? Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: faeton [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 2:35 PM To: Darren Gamble Cc: [EMAIL PROTECTED] Subject: Re[2]: [PHP] Re: system(), flush() and so on... Hello Darren, -- manual cut The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module. -- manual cut Hehe. The problem is not in flushing ability of system() foo, but flush() itself is not working :( I've tried to install PHP as a module (as written above), cgi, compiled with apache. But nothing worked. DG> flush() will just empty the contents of the output buffer when it's called. DG> You should do this after you output the command, yes, or the user will have DG> to wait until the rest of the page is loaded. But this won't let you see DG> the output as it is generated by the system() function. DG> You may want to try popen instead. This gives you a pipe to the process, so DG> you _should_ be able to read in lines of the output and display them as they DG> appear, whilst using flush() (although I have never tried this myself so I DG> can not vouch for it). Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] Re: system(), flush() and so on...
Hello Darren, -- manual cut The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module. -- manual cut Hehe. The problem is not in flushing ability of system() foo, but flush() itself is not working :( I've tried to install PHP as a module (as written above), cgi, compiled with apache. But nothing worked. DG> flush() will just empty the contents of the output buffer when it's called. DG> You should do this after you output the command, yes, or the user will have DG> to wait until the rest of the page is loaded. But this won't let you see DG> the output as it is generated by the system() function. DG> You may want to try popen instead. This gives you a pipe to the process, so DG> you _should_ be able to read in lines of the output and display them as they DG> appear, whilst using flush() (although I have never tried this myself so I DG> can not vouch for it). Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: system(), flush() and so on...
Good day, flush() will just empty the contents of the output buffer when it's called. You should do this after you output the command, yes, or the user will have to wait until the rest of the page is loaded. But this won't let you see the output as it is generated by the system() function. You may want to try popen instead. This gives you a pipe to the process, so you _should_ be able to read in lines of the output and display them as they appear, whilst using flush() (although I have never tried this myself so I can not vouch for it). Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: faeton [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 2:21 PM To: Julio Nobrega Trabalhando Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: system(), flush() and so on... Hello Julio, Hm... I don't even know what to specify :) The exact problem is using system("traceroute host.com"), but it should've returned its results line by line, instead of executing the whole command and then outputting its result. That is done by flush(), which is executed by system() foo itself, but i couldn't understand why i have needed result on some servers and on others - vice versa. JNT> Hi, please be more specific. Including what error you are getting, what is JNT> the tools being used, and their versions. JNT> Here's a quick help for producing better questions, wich will in turn make JNT> us answer faster and with more quality: JNT> http://www.tuxedo.org/~esr/faqs/smart-questions.html JNT> PS: btw, I am far away from being a 'hacker', don't get me wrong whole JNT> list people :-) Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: system(), flush() and so on...
Hello Julio, Hm... I don't even know what to specify :) The exact problem is using system("traceroute host.com"), but it should've returned its results line by line, instead of executing the whole command and then outputting its result. That is done by flush(), which is executed by system() foo itself, but i couldn't understand why i have needed result on some servers and on others - vice versa. JNT> Hi, please be more specific. Including what error you are getting, what is JNT> the tools being used, and their versions. JNT> Here's a quick help for producing better questions, wich will in turn make JNT> us answer faster and with more quality: JNT> http://www.tuxedo.org/~esr/faqs/smart-questions.html JNT> PS: btw, I am far away from being a 'hacker', don't get me wrong whole JNT> list people :-) Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: system(), flush() and so on...
Hi, please be more specific. Including what error you are getting, what is the tools being used, and their versions. Here's a quick help for producing better questions, wich will in turn make us answer faster and with more quality: http://www.tuxedo.org/~esr/faqs/smart-questions.html PS: btw, I am far away from being a 'hacker', don't get me wrong whole list people :-) -- Julio Nobrega Don't eat the yellow snow. "Faeton" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Salute, PHP list :), > > Aloha, ppl. > Could anybody explain 2 me what da heck is wrong with flush(). What > is needed for it to run as needed? :) If I'm to mistaken that should > be an php module for apache? And what if it's compiled together with > apache? I dunno what 2 do. > > > > Ivan 'Faeton aka xetrix' Danishevsky > ICQ(240266) [EMAIL PROTECTED] www.xemichat.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]