View stack-trace.php
<?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); |
View Nginx redirect to named location
# 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; | |
} |