|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-12-15 03:32 UTC] laruence@php.net
[2011-12-15 03:32 UTC] laruence@php.net
-Status: Open
+Status: Duplicate
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
Description: ------------ Even when enabled in a router php's built-in webserver does not report any errors coming from the router or included scripts. Note that it's currently necessary to do php execution from a router using a require instead of by using `return false;` because of virtual paths where a "/fake-nonexistent-path" may be desired to be routed to "/somescript.php" instead of attempting to serve the file "fake-nonexistent-path" in the docroot. The api does not seem to have a way to `return false;` telling the server to serve a completely different file so the only way to have this behavior is to use a require call. Obviously it would also be nice for errors to be reported simply so that you can fix bugs in the router itself as well. Test script: --------------- # ./router.php <?php ini_set('display_errors', 1); error_reporting(E_ALL); require_once( "./a.php" ); # ./a.php <?php this is a syntax error; Expected result: ---------------- The page output is expected to have an error report something like: Parse error: syntax error, unexpected 'is' (T_STRING) in /path/to/a.php on line 3 Actual result: -------------- The outputted page is blank. No php error report or anything at all.