Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12733 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3758 invoked by uid 1010); 11 Sep 2004 09:51:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3734 invoked from network); 11 Sep 2004 09:51:30 -0000 Received: from unknown (HELO mproxy.gmail.com) (216.239.56.243) by pb1.pair.com with SMTP; 11 Sep 2004 09:51:30 -0000 Received: by mproxy.gmail.com with SMTP id w67so6431cwb for ; Sat, 11 Sep 2004 02:51:29 -0700 (PDT) Received: by 10.11.117.9 with SMTP id p9mr23937cwc; Sat, 11 Sep 2004 02:51:29 -0700 (PDT) Received: by 10.11.117.13 with HTTP; Sat, 11 Sep 2004 02:51:29 -0700 (PDT) Message-ID: <4e89b426040911025158f6ce0@mail.gmail.com> Date: Sat, 11 Sep 2004 10:51:29 +0100 Reply-To: Wez Furlong To: Norbert Wagner Cc: internals@lists.php.net In-Reply-To: <20040910205515.54074.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040910205515.54074.qmail@pb1.pair.com> Subject: Re: [PHP-DEV] php_module_startup: more than one additional_module impossible? From: kingwez@gmail.com (Wez Furlong) You might be right about that. The current prototype does allow this though: zend_module_entry modules[2] = { { ... first module ... }, { ... second module ... } }; php_module_startup(&sapimodule, modules, sizeof(modules)/sizeof(modules[0])); There are other ways to fire up additional modules dynamically; take a look at the code in ext/standard/dl.c to see how the dl() function (and "extesion=" init statement) works. --Wez. On Fri, 10 Sep 2004 22:55:18 +0200, Norbert Wagner wrote: > Hi, > > I need to load more than one "additional_module" in my self-made > SAPI-module. > > Looking around at the php/zend-API, I thought that the > php_module_startup(...) function provides such functionality: > > int php_module_startup(sapi_module_struct *sf, zend_module_entry > *additional_modules, uint num_additional_modules) > > But then, It looks to me that the *additional_modules - parameter is > lacking an indirection: Shouldn't it be **additional_modules or > *additional_modules[] instead? > > As long as you try to register only one additional module (which is what > all the other SAPI-Modules do that I have found), everything is fine. > But I'd like to register an arbitrary number of modules during startup > without reading php.ini. > > Any Ideas? I am quite new to PHP, perhaps I have just missed the spot? > > Regards, > Norbert > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >