Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86495 invoked by uid 1010); 22 Apr 2004 01:15:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86401 invoked from network); 22 Apr 2004 01:15:45 -0000 Received: from unknown (HELO utopia.in.force-elite.com) (216.255.199.145) by pb1.pair.com with SMTP; 22 Apr 2004 01:15:45 -0000 X-AuthUser: chip@force-elite.com Received: from [172.31.200.1] (206.127.79.51:59209) by utopia.in.force-elite.com with [XMail 1.17 (Linux/Ix86) ESMTP Server] id for from ; Thu, 22 Apr 2004 01:15:41 -0000 To: Sterling Hughes , internals@lists.php.net In-Reply-To: <1CA1D9B6-93F7-11D8-9EC0-000A95E073A0@php.net> References: <1082583400.12577.19.camel@powah.cc.force-elite.com> <1CA1D9B6-93F7-11D8-9EC0-000A95E073A0@php.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-qUFC8uEeloLm+BnpUoZI" Message-ID: <1082596603.15932.5.camel@powah.cc.force-elite.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Wed, 21 Apr 2004 19:16:43 -0600 Subject: Re: [PHP-DEV] xmlSetGenericErrorFunc Abuse From: chip@force-elite.com (Paul Querna) --=-qUFC8uEeloLm+BnpUoZI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 2004-04-21 at 18:50, Sterling Hughes wrote: > Its actually quite different than that problem. This is a problem for=20 > people who use threads.=20 I am afraid that you are completely wrong. httpd -V: Server version: Apache/2.1.0-dev Server built: Feb 15 2004 14:26:54 Server's Module Magic Number: 20030821:3 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled) -D APR_USE_FLOCK_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=3D"/home/httpd/local" -D SUEXEC_BIN=3D"/home/httpd/local/bin/suexec" -D DEFAULT_PIDLOG=3D"logs/httpd.pid" -D DEFAULT_SCOREBOARD=3D"logs/apache_runtime_status" -D DEFAULT_LOCKFILE=3D"logs/accept.lock" -D DEFAULT_ERRORLOG=3D"logs/error_log" -D AP_TYPES_CONFIG_FILE=3D"conf/mime.types" -D SERVER_CONFIG_FILE=3D"conf/httpd.conf" Yes. That is correct, I am using the PREFORK MPM, which is not multi-threaded. If I was using the worker MPM, i wouldn't even bother submitting this because I know the PHP-Devs do not care about thread safety. and here is an example backtrace of this happening: #0 php_apache_sapi_send_headers (sapi_headers=3D0x2857ce98) at /usr/home/httpd/src/php-src/sapi/apache2handler/sapi_apache2.c:140 #1 0x28472714 in sapi_send_headers () at /usr/home/httpd/src/php-src/main/SAPI.c:747 #2 0x284230de in php_header () at /usr/home/httpd/src/php-src/ext/standard/head.c:60 #3 0x28478f50 in php_ub_body_write ( str=3D0x8143154 "
\nWarning: I/O warning : failed to load external entity \"docbooka/xsl/html/docbook.xsl\" in Unknown on line 0
\n", str_length=3D142) at /usr/home/httpd/src/php-src/main/output.c:704 #4 0x28477fa9 in php_body_write ( str=3D0x8143154 "
\nWarning: I/O warning : failed to load external entity \"docbooka/xsl/html/docbook.xsl\" in Unknown on line 0
\n", str_length=3D142) at /usr/home/httpd/src/php-src/main/output.c:119 #5 0x2846b6e2 in php_printf (format=3D0x28502600 "%s
\n%s:=20 %s in %s on line %d
\n%s") at /usr/home/httpd/src/php-src/main/main.c:400 #6 0x2846c05e in php_error_cb (type=3D2, error_filename=3D0x284fba9c "Unknown", error_lineno=3D0, format=3D0x2850223d "%s", args=3D0xbfbfe604 "=C3=B40\024\b\n") at /usr/home/httpd/src/php-src/main/main.c:736 #7 0x2849f356 in zend_error (type=3D2, format=3D0x2850223d "%s") at /usr/home/httpd/src/php-src/Zend/zend.c:930 #8 0x2835fec4 in php_libxml_internal_error_handler (error_type=3D0, ctx=3D0x0, msg=3D0x0, ap=3D0xbfbfe654 "") at /usr/home/httpd/src/php-src/ext/libxml/libxml.c:351 #9 0x2835ffb0 in php_libxml_error_handler (ctx=3D0x0, msg=3D0x287339fb "%s") at /usr/home/httpd/src/php-src/ext/libxml/libxml.c:377 #10 0x286a48ab in xmlReportError (err=3D0x826b580, ctxt=3D0x826b400, str=3D0x8269300 "failed to load external entity \"docbooka/xsl/html/docbook.xsl\"\n", channel=3D0x2835ff98 , data=3D0x0) at error.c:381 #11 0x286a4d4b in __xmlRaiseError (schannel=3D0, channel=3D0x286a4f3e , data=3D0x826b400, ctx=3D0x826b400, nod=3D0x0, domain=3D8, code=3D1549, level=3DXML_ERR_WARNING, file=3D0x0, line=3D0, str1=3D0x8249a20 "docbooka/xsl/html/docbook.xsl", str2=3D0x0, str3=3D0x0, int1=3D0, int2=3D0, msg=3D0x28724b40 "failed to load extern= al entity \"%s\"\n") at error.c:573 #12 0x286c2b88 in __xmlLoaderErr (ctx=3D0x2857ce40, msg=3D0x28724b40 "faile= d to load external entity \"%s\"\n", filename=3D0x8249a20 "docbooka/xsl/html/docbook.xsl") at xmlIO.c:426 #13 0x286a69f2 in xmlNewInputFromFile (ctxt=3D0x826b400, filename=3D0x8249a20 "docbooka/xsl/html/docbook.xsl") at parserInternals.c:1465 #14 0x286c4eed in xmlDefaultExternalEntityLoader (URL=3D0x82499e0 "docbooka/xsl/html/docbook.xsl", ID=3D0x0, ctxt=3D0x826b400) at xmlIO.c:3176 #15 0x286c4f91 in xmlLoadExternalEntity (URL=3D0x8249a20 "docbooka/xsl/html/docbook.xsl", ID=3D0x0, ctxt=3D0x826b400) at xmlIO.c:3233 #16 0x286b6f60 in xmlCreateURLParserCtxt (filename=3D0x826d300 "docbooka/xsl/html/docbook.xsl", options=3D16398) at parser.c:11039 #17 0x286b7dfe in xmlReadFile (filename=3D0x826d300 "docbooka/xsl/html/docbook.xsl", encoding=3D0x0, options=3D136754176) at parser.c:12093 #18 0x2899ac0e in xsltParseStylesheetFile (filename=3D0x826d300 "docbooka/xsl/html/docbook.xsl") at xslt.c:2129 #19 0x2899b110 in xsltLoadStylesheetPI (doc=3D0x824ca00) at xslt.c:2357 #20 0x28a043ad in transform_run (f=3D0x8257f60, doc=3D0x826d300) at mod_transform.c:182 #21 0x28a044d2 in transform_filter (f=3D0x8257f60, bb=3D0x825a120) at mod_transform.c:249 #22 0x0806d8db in ap_pass_brigade (next=3D0x2857ce40, bb=3D0x2857ce40) at util_filter.c:511 #23 0x0807412b in default_handler (r=3D0x8256050) at core.c:3513 #24 0x080630be in ap_run_handler (r=3D0x8256050) at config.c:151 #25 0x08063582 in ap_invoke_handler (r=3D0x8256050) at config.c:358 #26 0x08060a03 in ap_process_request (r=3D0x8256050) at http_request.c:246 #27 0x0805c639 in ap_process_http_connection (c=3D0x8250128) at http_core.c:253 #28 0x0806b6e2 in ap_run_process_connection (c=3D0x8250128) at connection.c:42 #29 0x08061c57 in child_main (child_num_arg=3D0) at prefork.c:623 #30 0x08061d47 in make_child (s=3D0x8099db8, slot=3D0) at prefork.c:663 #31 0x0806256c in ap_mpm_run (_pconf=3D0x8098018, plog=3D0x80c2018, s=3D0x8099db8) at prefork.c:937 #32 0x08067633 in main (argc=3D2, argv=3D0xbfbfebe8) at main.c:665 #33 0x0805c1c8 in _start (ap=3D0xbfbfecec "/usr/home/httpd/local/bin/httpd") at /usr/src/lib/csu/i386-elf/crt1.c:104 > People who use threads for serving dynamic=20 > webpages with PHP should be castrated and then shot (well, at least=20 > castrated, we don't want this problem proliferating.) The solution=20 > here is either to use a global context of our own, if libxml2 allows us=20 > to do so, use a mutex, or just laugh very hard and very loud when=20 > people tell us they have a problem using php in threaded environments. =20 > On that note.... >=20 Please don't be so quick to judge. Thanks,=20 -Paul Querna > bwahhhahahahhahahaha. >=20 > -Sterling --=-qUFC8uEeloLm+BnpUoZI Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAhxz794h19kJyHwARAixzAJsH8e7XWLz5lVWkKuPwdw0fXcSJTgCdGDxv go/LJnSn5r+nTENZ1+eZ37w= =aKWh -----END PGP SIGNATURE----- --=-qUFC8uEeloLm+BnpUoZI--