Re: RE: [PEAR-CVS] cvs: pear /Cache OutputCompression.php
| From: | Christian Stocker | Date: | Thu, 25 Apr 2002 13:40:39 +0000 |
| Subject: | Re: RE: [PEAR-CVS] cvs: pear /Cache OutputCompression.php | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5800@lists.php.net to get a copy of this message | ||
Hi
I suggest the attached diff. It adds a second optional parameter to
printContent. If this is set to true, it dies with $content, otherwise it
prints the content. This should not break any other scripts and still has
the possibility to die :)
If noone objects, i will commit it (then we still have a die in pear,
but not by default..)
chregu
On Thu, 25 Apr 2002, Naoki Shima wrote:
> The server where I deployed serves around 1000 connections at a time.
> I couldn't find any other way to workaround this problem.
> I believe that PEAR needs to be as stable as it can be and also works
> in a blackbox way.
> I have submitted this bug to bugs.php.net and hope it's gonna be fixed soon.
> I think adding inline documentation might help not to confuse people.
> If you have any other way to workaround without modifying the API,
> please let me know.
>
> Best regards,
>
> Naoki Shima
> -----Original Message-----
> From: Christian Stocker [mailto:usenet@chregu.tv]
> Sent: Thursday, April 25, 2002 9:03 PM
> To: pear-dev@lists.php.net; pear-cvs@lists.php.net
> Subject: RE: [PEAR-CVS] cvs: pear /Cache OutputCompression.php
>
>
> In <LLEGIABELPNEABIBKDFEOEOCCJAA.naoki@avantexchange.com>, Naoki Shima
> wrote:
>
> >> could you please explain this?
> >> tc
> >
> > I have submitted this bug report to PEAR-DEV few days ago. The copy of
> > the message sent follows:
>
> I'm really really not happy about having a die() in the "middle" of a
> class.. We should either make a function printAndDieContent() or you do
> the die() by yourself in your code. But having this die within a method,
> will certainly confuse some people.
>
> What do others think about that?
>
> chregu
>
> >
> > I've deployed PEAR Cache OutputComression on fairly busy site. It worked
> > well when I viewed the page via Netscape 6.2. However, when I viewed the
> > page using
> > IE 6.0/5.0, it just displays white page as when data is not sent to the
> > browser.
> > When I was hacking the code in Cache/OutputCompression.php, I found out
> > that it needed to call exit() just after printContent() does the
> > print(). I have modified "print $content;" to "die($content);" in
> > printContent().
> > I've confirmed that destructor is called even when die() is called
> > during the execution by calling
> > error_log() to send mail inside the destructor, so I guess the
> > garbageCollection() is called properly. There're about 200 processes of
> > apache on 5 of each load-balanced servers and it seems working fine for
> > 3 days now.
> > I could not find any other way to work around this problem. Should I
> > commit this change to cvs?
> >
> > Naoki Shima
> > naoki@avantexchange.com
> > murahachibu@php.net
>
> --
> PEAR CVS Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
--
nam...christian stocker adr...bremgartnerstr. 66, ch-8003 zurich
pho...+41 1 451 6021 www...http://phant.ch/chregu
mob...+41 76 561 8860 ema...chregu@phant.ch
wor...+41 1 240 5670 gpg...0x5CE1DECB