Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-20 Thread Marek Kilimajer
File a bug report. stream_set_blocking() started to work for files only since version 4.3, so it is likely full of bugs. Actualy, using cli php 4.3.2 I got this results some weird results. Your version run infinitely but changing echo 'Fooo!'."\n"; to echo 'Fooo!'; (removing newline) resulted i

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-20 Thread Eugene Lee
On Sat, Sep 20, 2003 at 02:14:54AM -0400, Robert Cummings wrote: : On Sat, 2003-09-20 at 01:53, Dan Anderson wrote: : > : > I find your responses to my e-mails quite humorous. Upon review -- : > aside from a single WTF -- I don't think I was condescending in any way : > shape or form. I was just

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 01:53, Dan Anderson wrote: > I find your responses to my e-mails quite humorous. Upon review -- > aside from a single WTF -- I don't think I was condescending in any way > shape or form. I was just trying to offer help. The particular shape of your help was non newbie frien

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 02:02, Curt Zirzow wrote: > hmm.. on second thought... > > * Thus wrote Robert Cummings ([EMAIL PROTECTED]): > > [...] > > if( ($char = fread( $stdin, 1 )) !== false ) > > How are you calling this script? I'm not sure how cgi will handle > fread > > With a traditi

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Curt Zirzow
* Thus wrote Dan Anderson ([EMAIL PROTECTED]): > I find your responses to my e-mails quite humorous. Upon review -- hmm... its almost (is) saturday lets all drop it. cheers. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Curt Zirzow
hmm.. on second thought... * Thus wrote Robert Cummings ([EMAIL PROTECTED]): > [...] > if( ($char = fread( $stdin, 1 )) !== false ) How are you calling this script? I'm not sure how cgi will handle fread With a traditional CGI script is what is read on POST data from a form, and php t

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
I find your responses to my e-mails quite humorous. Upon review -- aside from a single WTF -- I don't think I was condescending in any way shape or form. I was just trying to offer help. After reading about wrappers, I find it doubly humorous that you didn't just disregard my e-mail when I asked

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 01:52, Curt Zirzow wrote: > * Thus wrote Robert Cummings ([EMAIL PROTECTED]): > > I wanted t play around with the CGI (not CLI) version of PHP and get a > > feel for the I/O stuff, specifically STDIN. So I whipped up the > > following script: > > > > /

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Curt Zirzow
* Thus wrote Robert Cummings ([EMAIL PROTECTED]): > I wanted t play around with the CGI (not CLI) version of PHP and get a > feel for the I/O stuff, specifically STDIN. So I whipped up the > following script: > > /// > > #!/usr/bin/p

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 01:01, Dan Anderson wrote: > One more thing: > > gdb doesn't do a damned thing for debugging PHP scripts. Look for the > errors and warnings output to the browser. (or tty if you're using > /usr/bin/php). Oh you had to tie another on on. I guess I look really stupid. Hmm

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 00:59, Dan Anderson wrote: > Why are you using php:// below? If stdin is a file './stdin' will Because it is the correct way to retrieve input from standard input. http://www.php.net/wrappers.php > suffice (or the path instead of ./). If you want to run the PHP script

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
One more thing: gdb doesn't do a damned thing for debugging PHP scripts. Look for the errors and warnings output to the browser. (or tty if you're using /usr/bin/php). -Dan On Sat, 2003-09-20 at 00:33, Robert Cummings wrote: > I wanted t play around with the CGI (not CLI) version of PHP and

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
Why are you using php:// below? If stdin is a file './stdin' will suffice (or the path instead of ./). If you want to run the PHP script in stdin you should use one of the following: include() include_once() require() require_once() See the manual at php.net for pertinent sections... > if( ($