This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
register_shutdown_function(function () { | |
file_put_contents(__DIR__ . '/tmp/stack_trace_' . uniqid('', true), var_export($GLOBALS['dbg_stack'], true)); | |
}); | |
register_tick_function(function () { | |
$GLOBALS['dbg_stack'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | |
}); | |
declare(ticks=1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Solution 1 | |
# Use only codes greater than 418, do not use common status codes 404, 402, 403, etc | |
location /location1 { | |
error_page 463 = @app; return 463; | |
} | |
# Solution 2 (drawbacks unknown) | |
location /location2 { | |
try_files /dev/null @app; | |
} |