summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2003-05-26 18:33:20 +0000
committerDerick Rethans <derick@php.net>2003-05-26 18:33:20 +0000
commit33bed67b99c1e45681b17f407eba1f09aca485d1 (patch)
tree88446fa88adf79654a8e187ea2e38c6df4dc0972
parent3d3416d10ec46b233dccdacc13330ac63281b39a (diff)
downloadphp-git-33bed67b99c1e45681b17f407eba1f09aca485d1.tar.gz
- Fixed a bug in reporting start-up errors with the CLI: No HTTP header shall
be shown.
-rw-r--r--NEWS1
-rw-r--r--sapi/cli/php_cli.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 528869bedf..93013c6893 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,7 @@ PHP 4 NEWS
- Added KOI8-R, CP866, and CP1251 support for htmlentities().
(Antony Dovgal, Moriyoshi)
- Added domdocument->free() to free XML-documents from memory. (Rob Richards)
+- Fixed a bug in error reporting with the CLI for start-up errors. (Derick)
- Fixed spurious fsync calls during socket communication. (Sascha)
- Fixed a possible vhost issue in thttpd. (Sascha, dgl@dgl.cx)
- Fixed including from HTTP URLs. (Sascha)
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 422fe53a6e..5e5fdfd6cd 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -238,6 +238,13 @@ static char* sapi_cli_read_cookies(TSRMLS_D)
return NULL;
}
+static int sapi_cli_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
+{
+ /* We do nothing here, this function is needed to prevent that the fallback
+ * header handling is called. */
+ return SAPI_HEADER_SENT_SUCCESSFULLY;
+}
+
static void sapi_cli_send_header(sapi_header_struct *sapi_header, void *server_context TSRMLS_DC)
{
if (sapi_header) {
@@ -301,7 +308,7 @@ static sapi_module_struct cli_sapi_module = {
php_error, /* error handler */
NULL, /* header handler */
- NULL, /* send headers handler */
+ sapi_cli_send_headers, /* send headers handler */
sapi_cli_send_header, /* send header handler */
NULL, /* read POST data */