#5927 [Com]: Incorrect shutdown order of modules

From: Date: Wed, 21 Apr 2004 08:18:10 +0000
Subject: #5927 [Com]: Incorrect shutdown order of modules
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-58509@lists.php.net to get a copy of this message
ID: 5927 Comment by: xuefer at 21cn dot com Reported By: ddebene at messagingdirect dot com Status: Closed Bug Type: Dynamic loading Operating System: Redhat Linux 6.1 PHP Version: 4.0.1pl2 New Comment: this should be a feature request as of current php4.3.6, it still shutdown a before b Previous Comments: ------------------------------------------------------------------------ [2000-12-30 11:48:13] sniper@php.net No feedback, considered fixed. --Jani ------------------------------------------------------------------------ [2000-11-27 05:34:22] sniper@php.net Is this still happeningn with latest snapshot from http://snaps.php.net/ ? --Jani ------------------------------------------------------------------------ [2000-08-02 17:39:10] ddebene at messagingdirect dot com This occurs with statically or dynamically linked modules, but I am only experiencing it myself with dynamically linked extensions. I have configured PHP to load two extensions I have created at run time, let's call them A and B. A relies on behaviour of B. I have ordered them in the php.ini file so that A is before B, and thus A gets initialized before B (which is required for B to work properly). However, on shutdown, A is also shutdown before B, and since B requires A to be still running to shut down, there is a core dump. Modules should be getting shut down in the reverse order that they are started, to preserve dependencies. I've actually patched this myself, here is the simple fix: Zend/zend_hash.c 539c539 < p = ht->pListHead; --- > p = ht->pListTail; 542c542 < p = p->pListNext; --- > p = p->pListLast; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=5927&edit=1

« previous php.bugs (#58509) next »