From ea2e67876a55ffce2d38bff920ce7afdc7aff847 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 29 Oct 2018 16:48:42 +0300 Subject: [PATCH] Stop Apache if PHP wasn't started successful. --- sapi/apache2handler/sapi_apache2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 23eef816a81..283ec5722da 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -482,7 +482,9 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp zend_signal_startup(); sapi_startup(&apache2_sapi_module); - apache2_sapi_module.startup(&apache2_sapi_module); + if (apache2_sapi_module.startup(&apache2_sapi_module) != SUCCESS) { + return DONE; + } apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null); php_apache_add_version(pconf);