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

> Sorry, I should clarify that-- I have a windows app which pulls gzipped data
> from the web server by loading a php page, so I do want compressed output to
> be sent to the browser. The way I'm doing it now accomplishes what I want,
> but with a slight delay before data begins streaming out... I'm curious if
> there's a way to send it straight to stdout, rather than writing it to a gz
> file and then sending that.
>
> (I figured I could write it to /dev/stdout, but got permission denied trying
> to gzopen it, although I can cat stuff to /dev/stdout if I 'su nobody', whom
> apache is running as... I was guessing it might be a restriction of running
> php as a module or something.)

Ah, I understand. And no, trying to write to stdout will not work from
the module. It is not a permissions thing. It is just a bit more
complicated that simply writing to stdout. You would need to add a new
internal php function to the zlib module to do this. Sort of a
combination of gzwrite() and echo where instead of writing the string to
the file, it just gets displayed.

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