Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

Re: [PHP3] gzipping to stdout? From: Rasmus Lerdorf (rasmus <email protected>)
Date: 03/25/99

> I'm running PHP 3.0.7 as an Apache module, and using the zlib functions to
> generate compressed output. (it isn't human-readable-- it's going to be used
> by another program.)
>
> Currently I'm writing data to a temporary gz file, then calling readfile to
> send it to the client. Unfortunately, this way there's a slight delay while
> the file is being created before data begins getting sent out. Is there any
> way to do this directly? I tried doing gzopen("/dev/stdout", "wb"), but I
> got a Permission Denied error.

Well, stdout from a web page goes to the browser. You obviously don't
want to send it there. I would popen() the receiving application
directly, or alternatively set up a named pipe and write to that.

-Rasmus

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>