Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25399 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68658 invoked by uid 1010); 22 Aug 2006 00:20:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 68642 invoked from network); 22 Aug 2006 00:20:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2006 00:20:18 -0000 Authentication-Results: pb1.pair.com header.from=rrichards@ctindustries.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rrichards@ctindustries.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ctindustries.net from 216.117.147.250 cause and error) X-PHP-List-Original-Sender: rrichards@ctindustries.net X-Host-Fingerprint: 216.117.147.250 unknown Linux 2.4/2.6 Received: from [216.117.147.250] ([216.117.147.250:56219] helo=ctindustries.net) by pb1.pair.com (ecelerity 2.1.1.8 r(12602M)) with ESMTP id DB/72-31235-D094AE44 for ; Mon, 21 Aug 2006 20:00:14 -0400 Received: from [127.0.0.1] (dsta-aa203.pivot.net [66.186.171.203]) (authenticated bits=0) by ctindustries.net (8.12.8/8.12.8) with ESMTP id k7LNviCx004247; Mon, 21 Aug 2006 19:57:45 -0400 Message-ID: <44EA4986.5010500@ctindustries.net> Date: Mon, 21 Aug 2006 20:02:14 -0400 User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Edin Kadribasic CC: "internals@lists.php.net" , ilia@prohost.org References: <44DB9EEA.7030309@ctindustries.net> <44DBA43C.7040200@emini.dk> In-Reply-To: <44DBA43C.7040200@emini.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0634-0, 08/21/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV 0.88.4/1696/Sun Aug 20 16:21:18 2006 on ctindustries.net X-Virus-Status: Clean Subject: Re: [PHP-DEV] libxml2/threading/win 2003 From: rrichards@ctindustries.net (Rob Richards) Now that 5.1.5 and 4.4.4 have been released, is it possible to get these changes and updated lib in? Ilia, not sure if this interrupts your RC schedule at all, but this change should resolve many of the windows crashes reported under 2003, so would like to get this into 5.2. Rob Edin Kadribasic wrote: > Hi Rob, > > Since we're adding a DllMain function, shouldn't it be located in > main/main.c. We might need to hook up other thread initialization > stuff in there in the future. > > Edin > > > Rob Richards wrote: >> In order to resolve reported crashing on win 2003, I have had to >> change the static libxml builds to use the flag LIBXML_STATIC_FOR_DLL. >> >> This now requires a DllMain to be added within any dll that is >> building libxml2 in statically. >> PHP 4.x - domxml (use php_domxml.c.diff.txt patch) >> PHP 5.x/HEAD added within libxml.c (apply libxml.c.diff.txt to PHP 5 >> and HEAD - was made against HEAD) >> >> This changes the threading a bit to work in the same manner as if >> libxml2 were built and linked to as a shared lib. >> >> Along with these changes new libxml libraries are needed. >> debug builds: >> http://ctindustries.net/libxml/libxml2-2.6.26.threads.zip >> http://ctindustries.net/libxml/libxslt-1.1.17.debug.php.zip >> >> release builds: >> http://ctindustries.net/libxml/libxml2-2.6.26.threads.zip >> http://ctindustries.net/libxml/libxslt-1.1.17.php.zip >> >> So far I have been testing these against 5.2 builds and ran a few >> tests with domxml in PHP 4.4 to make sure all was good. I would >> appreciate it if anyone running win builds make these changes to >> their local builds and let me know if anyone runs into any problems >> (there really shouldnt be any, but in any case..). Would like some >> additional outside testing before committing this stuff. >> >> Rob >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> Index: libxml.c >> =================================================================== >> RCS file: /repository/php-src/ext/libxml/libxml.c,v >> retrieving revision 1.51 >> diff -u -r1.51 libxml.c >> --- libxml.c 6 Aug 2006 17:41:39 -0000 1.51 >> +++ libxml.c 10 Aug 2006 20:25:31 -0000 >> @@ -1043,6 +1043,13 @@ >> } >> /* }}} */ >> >> +#ifdef PHP_WIN32 >> +PHP_LIBXML_API BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD >> fdwReason, LPVOID lpvReserved) >> +{ >> + return xmlDllMain(hinstDLL, fdwReason, lpvReserved); >> +} >> +#endif >> + >> #endif >> >> /* >> >> >> ------------------------------------------------------------------------ >> >> Index: php_domxml.c >> =================================================================== >> RCS file: /repository/php-src/ext/domxml/Attic/php_domxml.c,v >> retrieving revision 1.218.2.50.2.2 >> diff -u -r1.218.2.50.2.2 php_domxml.c >> --- php_domxml.c 18 Mar 2006 10:46:27 -0000 1.218.2.50.2.2 >> +++ php_domxml.c 8 Aug 2006 11:47:17 -0000 >> @@ -5520,6 +5520,13 @@ >> /* }}} */ >> #endif /* HAVE_DOMXSLT */ >> >> +#ifdef PHP_WIN32 >> +__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD >> fdwReason, LPVOID lpvReserved) >> +{ >> + return xmlDllMain(hinstDLL, fdwReason, lpvReserved); >> +} >> +#endif >> + >> #endif /* HAVE_DOMXML */ >> >> /* >> >> >