Re: How to handle error in sapi

From: Date: Fri, 25 Nov 2016 13:11:28 +0000
Subject: Re: How to handle error in sapi
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-97182@lists.php.net to get a copy of this message
> 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, -- Zheng SHAO axot@axot.org

« previous php.internals (#97182) next »