Re: Bug 5474 [FIX: change to zend engine included]

From: Date: Thu, 04 Jan 2001 05:43:03 +0000
Subject: Re: Bug 5474 [FIX: change to zend engine included]
Groups: php.dev 
Request: Send a blank email to php-dev+get-42903@lists.php.net to get a copy of this message
Hi! I wanted to find a fix before I sent off the bug report, but I messed up. I found a fix. Destructors for all persistent objects belonging to any extension were never called. This routine needs to be replaced in Zend/zend_list.c: void plist_entry_destructor(void *ptr) { zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr; zend_rsrc_list_dtors_entry *ld; if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) { switch (ld->type) { case ZEND_RESOURCE_LIST_TYPE_STD: if (ld->plist_dtor) { (ld->plist_dtor)(le->ptr); } break; case ZEND_RESOURCE_LIST_TYPE_EX: if (ld->plist_dtor_ex) { ld->plist_dtor_ex(le); } break; EMPTY_SWITCH_DEFAULT_CASE() } } else { zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)",le->type); } } That should do it. Should help MySQL, pgsql, mssql, and others. Will run previously untested code, so additional debugging of other code is advised. Sincerely, Steven Roussey Network54.com http://network54.com/?pp=e

« previous php.dev (#42903) next »