Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97182 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25634 invoked from network); 25 Nov 2016 13:11:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2016 13:11:35 -0000 Authentication-Results: pb1.pair.com header.from=axot@axot.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=axot@axot.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain axot.org from 74.125.83.45 cause and error) X-PHP-List-Original-Sender: axot@axot.org X-Host-Fingerprint: 74.125.83.45 mail-pg0-f45.google.com Received: from [74.125.83.45] ([74.125.83.45:32878] helo=mail-pg0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/F4-21589-68838385 for ; Fri, 25 Nov 2016 08:11:35 -0500 Received: by mail-pg0-f45.google.com with SMTP id 3so29971586pgd.0 for ; Fri, 25 Nov 2016 05:11:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axot-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=syiuQ2DyAVj9i34CzXmavCsl0l4fUZimpHsCZKRnIr8=; b=Wzgf7zoQFcv3w+xSFCbgodfn1Qg6XM1KoTU9H2e5Jt7udCuDve9QbAWW2uo+UhF7ii g+bXpqrI/Udxl1sfybsQgdxcoRiZszv/bBmQysysa/EZELuFDONhcTwtVqlviv/o/AZF fyqIND0V72vmPC1EzP5zt674icP48bRwra7sMZVuTPT2B3cnV9hlZR/oDTJzQJSMM/Ou Oj/hqua3a4zQc2kE1CXZWRf1cfcg0qdUFViiYHpaC96MKOoGwiZggTMibhwbxxsa3QcT sa6Oa81anTek28t3IVK6FBdLh4HSeCbPT7pLYc/dl5py/wf3MaeMs+3w0Wae7dQJ8IeW jstg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=syiuQ2DyAVj9i34CzXmavCsl0l4fUZimpHsCZKRnIr8=; b=kZBFUrGirhfbbdWP02iyftA+XgnkrM5gFwY4VLTGVwiJeR4JMo+5B0VKpyQ8r4NVv6 0Yjsgm9qFk6GTmCZ6313Ty9p4v71NRHVB0OlM7/zt9lDWAm17F8B93MJkKb4sdoxcg4Y 9YQ/73ZCMsGHL1f3AMrqEa/ni3PqXWTBgjBciy0lGLaD0UX4T7DSLEIOOrFnVY1DXsVR KZupuOUlNf5SG1ArtbTlNIKkptoMrWvffcF78OnTcslRSsoGkBefUPMCs/esyuPt5X8c nwWWLI1G9E6vSU9FZx/6wZZHVdxR1Tydws0LxDnTrdOEXGfdfwkKtaNWoJkIjUpHlegb 9wPw== X-Gm-Message-State: AKaTC015F8aar4ggXGXN4heTzS/aiEF/w1LQIlP/ypPLU/QwDCj8noqTfclu2LWd/6gVBg== X-Received: by 10.99.5.21 with SMTP id 21mr14143238pgf.32.1480079491653; Fri, 25 Nov 2016 05:11:31 -0800 (PST) Received: from mbp.home.axot.org (ae084119.dynamic.ppp.asahi-net.or.jp. [14.3.84.119]) by smtp.gmail.com with ESMTPSA id q20sm50112895pgn.39.2016.11.25.05.11.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 05:11:30 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) In-Reply-To: Date: Fri, 25 Nov 2016 22:11:28 +0900 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Kalle Sommer Nielsen X-Mailer: Apple Mail (2.3251) Subject: Re: [PHP-DEV] How to handle error in sapi From: axot@axot.org (Zheng SHAO) > php_apache_sapi_read_post() is invoked very early on > (php_module_startup > sapi_activate > sapi_read_post_data), and > therefore we are too early at initialization that you cannot really > throw an exception to the user. What you can do however is to call > php_apache_sapi_log_message() and try to log the error in the Apache > error log instead, which seems more reasonable to me. When timeout happened in POST data reading, `php_handler` function should return 408 error to Apache. For now, it will ignore the error and execute PHP Code then return 200 = to Apache. What can we do to handle the error in this case? Regards, --=20 Zheng SHAO axot@axot.org