Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49767 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37808 invoked from network); 19 Sep 2010 16:52:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2010 16:52:12 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 unknown Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:41296] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/24-15948-1BF369C4 for ; Sun, 19 Sep 2010 12:52:02 -0400 Received: from [192.168.1.31] (ppp-93-104-53-198.dynamic.mnet-online.de [93.104.53.198]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 6E201448FF; Sun, 19 Sep 2010 18:51:58 +0200 (CEST) To: Jeff Brown Cc: internals@lists.php.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Sun, 19 Sep 2010 18:51:56 +0200 Message-ID: <1284915117.2340.7.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Cannot register classes after MINIT From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Sat, 2010-09-18 at 20:01 +0000, Jeff Brown wrote: > I have recently tried registering a class (via zend_register_class) > inside of a PHP_FUNCTION, though this may sound weird and an > unecessary function I ask that you ignore this request.I have noticed > that registering goes fine but every time I declare a class after the > call to my function, e.g:create_class_function('class_name');class > Test { } > My PHP process crashes, not declaring the Test classes causes no > crash, I also noticed that If I move my code to the MINIT part no > crash occurs and all goes well as with other PHP extensions. I have no idea why it crashes, but in general there are a few assumptions around "built in" classes, like not freeing them on request shutdown etc. Adding them at run time really is no good idea ... johannes