Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30476 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55895 invoked by uid 1010); 6 Jul 2007 03:55:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55878 invoked from network); 6 Jul 2007 03:55:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jul 2007 03:55:57 -0000 Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain l-i-e.com from 67.139.134.202 cause and error) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:1861] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/C3-26602-84DBD864 for ; Thu, 05 Jul 2007 23:55:56 -0400 Received: (qmail 89668 invoked by uid 98); 6 Jul 2007 03:55:56 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.01 (clamdscan: 0.88.7/3603. Clear:RC:1(127.0.0.1):. Processed in 0.087744 secs); 06 Jul 2007 03:55:56 -0000 Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 6 Jul 2007 03:55:56 -0000 Received: from 24.1.37.132 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Thu, 5 Jul 2007 22:55:56 -0500 (CDT) Message-ID: <2181.24.1.37.132.1183694156.squirrel@www.l-i-e.com> In-Reply-To: <5D.83.24942.9FE66864@pb1.pair.com> References: <34.E2.21924.65914864@pb1.pair.com> <58695.216.230.84.67.1183064548.squirrel@www.l-i-e.com> <5D.83.24942.9FE66864@pb1.pair.com> Date: Thu, 5 Jul 2007 22:55:56 -0500 (CDT) To: "Jakob Buchgraber" Cc: internals@lists.php.net Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] Exception thrown without a stack frame From: ceo@l-i-e.com ("Richard Lynch") On Sat, June 30, 2007 9:55 am, Jakob Buchgraber wrote: > Okay, I can now reproduce the problem. Here is the code: > class Foo { > public function __destruct() { > throw new Exception(); > } > } > > $a = new Foo(); > ?> > > I couldn't reproduce it before as I didn't assign the instance of Foo > to > a variable, however Christian Hoffmann pointed me out that I need to > do > this in order to get the desired error. The only solution I know of is: Don't do that. :-) Or, accept the fact that your code running in the destructor is happening outside the realm of time and space as far as PHP is concerned. Bascially, anything that goes wrong before PHP starts interpreting your script (i.e., custom file upload, custom session, custom php.ini settings extension) and anything that happens after PHP has finished the last line of your code (session_close function, desctrutors, etc) is going to have a not-so-informative message about which PHP file / line caused the problem, or a lack of a stack or whatever, because PHP is not in a stable state of existence at that point. Deal with it, or don't do what you're doing are the only real options... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?