Update request startup error messages

This commit is contained in:
Eric Norris 2019-10-26 12:34:43 -04:00 committed by Jakub Zelenka
parent 7aadbcb8f4
commit 09237f6126
No known key found for this signature in database
GPG key ID: 1C0779DC5C0A9DE4
12 changed files with 25 additions and 23 deletions

1
NEWS
View file

@ -16,6 +16,7 @@ PHP NEWS
. Fixed bug GH-8995 (WeakMap object reference offset causing TypeError). . Fixed bug GH-8995 (WeakMap object reference offset causing TypeError).
(Tobias Bachert) (Tobias Bachert)
. Added error_log_mode ini setting. (Mikhail Galanin) . Added error_log_mode ini setting. (Mikhail Galanin)
. Updated request startup messages. (Eric Norris)
- COM: - COM:
. Fixed bug GH-8750 (Can not create VT_ERROR variant type). (cmb) . Fixed bug GH-8750 (Can not create VT_ERROR variant type). (cmb)

View file

@ -68,4 +68,4 @@ array (
'host' => '.SYNTAX-ERROR.', 'host' => '.SYNTAX-ERROR.',
), ),
) )
Notice: Unknown: Unexpected characters at end of address: @two (errflg=3) in Unknown on line 0 Notice: PHP Request Shutdown: Unexpected characters at end of address: @two (errflg=3) in Unknown on line 0

View file

@ -36,4 +36,4 @@ Warning: imap_open(): Couldn't open stream in %s on line %d
imap_open(): Argument #4 ($flags) must be a bitmask of the OP_* constants, and CL_EXPUNGE imap_open(): Argument #4 ($flags) must be a bitmask of the OP_* constants, and CL_EXPUNGE
imap_open(): Argument #5 ($retries) must be greater than or equal to 0 imap_open(): Argument #5 ($retries) must be greater than or equal to 0
Notice: Unknown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0 Notice: PHP Request Shutdown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0

View file

@ -13,6 +13,6 @@ a=1&b=2&c=3&d=4&e=5&f=6
var_dump($_POST); var_dump($_POST);
?> ?>
--EXPECT-- --EXPECT--
Warning: Unknown: Input variables exceeded 5. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 Warning: PHP Request Startup: Input variables exceeded 5. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
array(0) { array(0) {
} }

View file

@ -13,6 +13,6 @@ a=1&b=2&c=3&d=4&e=5
var_dump($_POST); var_dump($_POST);
?> ?>
--EXPECT-- --EXPECT--
Warning: Unknown: Input variables exceeded 4. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 Warning: PHP Request Startup: Input variables exceeded 4. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
array(0) { array(0) {
} }

View file

@ -52,4 +52,4 @@ Stack trace:
#1 {main} #1 {main}
thrown in %s on line %d thrown in %s on line %d
Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0 Warning: PHP Request Shutdown: Cannot call session save handler in a recursive manner in Unknown on line 0

View file

@ -52,4 +52,4 @@ Stack trace:
#1 {main} #1 {main}
thrown in %s on line %d thrown in %s on line %d
Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0 Warning: PHP Request Shutdown: Cannot call session save handler in a recursive manner in Unknown on line 0

View file

@ -52,17 +52,17 @@ session_destroy();
@unlink(__DIR__ . DIRECTORY_SEPARATOR . "rfc1867_sid_invalid.post.txt"); @unlink(__DIR__ . DIRECTORY_SEPARATOR . "rfc1867_sid_invalid.post.txt");
?> ?>
--EXPECTF-- --EXPECTF--
Warning: Unknown: Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0 Warning: PHP Request Startup: Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0
Warning: Unknown: Failed to read session data: files (path: ) in Unknown on line 0 Warning: PHP Request Startup: Failed to read session data: files (path: ) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 Warning: PHP Request Startup: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
Warning: Unknown: Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0 Warning: PHP Request Startup: Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0
Warning: Unknown: Failed to read session data: files (path: ) in Unknown on line 0 Warning: PHP Request Startup: Failed to read session data: files (path: ) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 Warning: PHP Request Startup: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
string(%d) "" string(%d) ""
bool(true) bool(true)
array(2) { array(2) {

View file

@ -89,4 +89,4 @@ bool(true)
session_set_save_handler(): Argument #1 ($open) must be of type SessionHandlerInterface, MySession2 given session_set_save_handler(): Argument #1 ($open) must be of type SessionHandlerInterface, MySession2 given
good handler writing good handler writing
Deprecated: Unknown: Session callback must have a return value of type bool, int returned in Unknown on line 0 Deprecated: PHP Request Shutdown: Session callback must have a return value of type bool, int returned in Unknown on line 0

View file

@ -965,6 +965,8 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
function = "PHP Startup"; function = "PHP Startup";
} else if (php_during_module_shutdown()) { } else if (php_during_module_shutdown()) {
function = "PHP Shutdown"; function = "PHP Shutdown";
} else if (PG(during_request_startup)) {
function = "PHP Request Startup";
} else if (EG(current_execute_data) && } else if (EG(current_execute_data) &&
EG(current_execute_data)->func && EG(current_execute_data)->func &&
ZEND_USER_CODE(EG(current_execute_data)->func->common.type) && ZEND_USER_CODE(EG(current_execute_data)->func->common.type) &&
@ -995,14 +997,13 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
default: default:
function = "Unknown"; function = "Unknown";
} }
} else { } else if ((function = get_active_function_name()) && strlen(function)) {
function = get_active_function_name();
if (!function || !strlen(function)) {
function = "Unknown";
} else {
is_function = 1; is_function = 1;
class_name = get_active_class_name(&space); class_name = get_active_class_name(&space);
} } else if (EG(flags) & EG_FLAGS_IN_SHUTDOWN) {
function = "PHP Request Shutdown";
} else {
function = "Unknown";
} }
/* if we still have memory then format the origin */ /* if we still have memory then format the origin */

View file

@ -11,8 +11,8 @@ var_dump(isset($_POST['foo']));
var_dump(strlen(file_get_contents('php://input'))); var_dump(strlen(file_get_contents('php://input')));
?> ?>
--EXPECT-- --EXPECT--
Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0 Warning: PHP Request Startup: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0
Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0 Warning: PHP Request Startup: POST data can't be buffered; all data discarded in Unknown on line 0
bool(false) bool(false)
int(0) int(0)

View file

@ -11,7 +11,7 @@ a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
var_dump($_POST, $HTTP_RAW_POST_DATA); var_dump($_POST, $HTTP_RAW_POST_DATA);
?> ?>
--EXPECTF-- --EXPECTF--
Warning: Unknown: POST Content-Length of 2050 bytes exceeds the limit of 1024 bytes in Unknown on line 0 Warning: PHP Request Startup: POST Content-Length of 2050 bytes exceeds the limit of 1024 bytes in Unknown on line 0
Warning: Undefined variable $HTTP_RAW_POST_DATA in %s on line %d Warning: Undefined variable $HTTP_RAW_POST_DATA in %s on line %d
array(0) { array(0) {