php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54948 provide functions to handle gracefully requests error
Submitted: 2011-05-28 20:21 UTC Modified: 2011-05-29 17:57 UTC
From: giorgio dot liscio at email dot it Assigned:
Status: Open Package: *Web Server problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: giorgio dot liscio at email dot it
New email:
PHP Version: OS:

 

 [2011-05-28 20:21 UTC] giorgio dot liscio at email dot it
Description:
------------
hi, it is needed [a function|| a set of functions] that allows to execute code when http request errors are thrown during the "startup" time

for example if a post request breaks the post_max_size directive, in the user space i can't handle it, unless using error_get_last() that i will need parse to identify the problem ( and i can parse only the last one )

affected directives are, probably:

max_file_uploads
post_max_size
max_input_time [?]

thank you in advance


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-29 14:33 UTC] bjori@php.net
-Status: Open +Status: Feedback
 [2011-05-29 14:33 UTC] bjori@php.net
You can register your own custom error handler to deal with those (see 
set_error_handler()).

Unsure what else you are asking for.. A specific callback function when ini 
settings cause errors? Doesn't make sense to me..
 [2011-05-29 16:04 UTC] giorgio dot liscio at email dot it
set_error_handler is set in the user space

so AFTER errors related to

max_file_uploads
post_max_size
max_input_time [?]

are thrown
 [2011-05-29 16:26 UTC] giorgio dot liscio at email dot it
i try to explain better:

there is no way now to detect in the user space when the ini setting "post_max_size" generates a warning (thrown in Unknown on line 0) because is generated in the startup time of the execution (to see the error set display_startup_errors in php.ini)

a better solution can be set a $_SERVER key that show me if the http request has generated an error or not during the startup time
 [2011-05-29 17:57 UTC] giorgio dot liscio at email dot it
-Status: Feedback +Status: Open
 [2011-05-29 17:57 UTC] giorgio dot liscio at email dot it
*status changed to open
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 12:01:26 2019 UTC