From: Operating system: Mac OS X 10.7.2 (Lion) PHP version: 5.4.0RC3 Package: Built-in web server Bug Type: Bug Bug description:PHP cli-server does not report syntax errors in the router
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. -- Edit bug report at https://bugs.php.net/bug.php?id=60496&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60496&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60496&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60496&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60496&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60496&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60496&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60496&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60496&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60496&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60496&r=support Expected behavior: https://bugs.php.net/fix.php?id=60496&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60496&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60496&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60496&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60496&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60496&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60496&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60496&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60496&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60496&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60496&r=mysqlcfg