Re: Funny php://stdout behaviour

From: Date: Tue, 23 Jan 2001 23:58:35 +0000
Subject: Re: Funny php://stdout behaviour
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36294@lists.php.net to get a copy of this message
> When calling the php4 code below, sometimes the browser receives > -the "HTML estandar text" > -sometimes the "Text generated from PHP" (but NEVER both!) > -and ocassionaly the error: > "Warning: fopen("php://stdout","w") - Bad file descriptor in > /home/sites/site74/web/_proc/pruebas/stdout-test.php on line 7 > unable to open device" I actually was getting prompted to download the .php file sometimes... That was a known bug with an earlier release of PHP4 under high load, I think... Or maybe that was the one where turning the engine on/off in different domains was messing up?... Or maybe both conditions had to be true. Meanwhile, not sure how fopen() is involved. Maybe try whatever corresponds to stdout on your OS, be it "/dev/0" or "/dev/stdout" or whatever -- Just to see if you can duplicate it with the normal file-system stuff. And try the same thing with some other files/pages etc. One thing that occurs to me -- stdout starts off by being the browser, so it's kinda funky to open it -- You've already got it open... I *think* it really only makes sense to fopen() stdout from the command line. At least, I'm not clear on what it would mean to open it from a HTTP environment... -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#36294) next »