Edit report at https://bugs.php.net/bug.php?id=60496&edit=1

 ID:                 60496
 Updated by:         larue...@php.net
 Reported by:        php at danielfriesen dot name
 Summary:            PHP cli-server does not report syntax errors in the
                     router
-Status:             Open
+Status:             Duplicate
 Type:               Bug
 Package:            Built-in web server
 Operating System:   Mac OS X 10.7.2 (Lion)
 PHP Version:        5.4.0RC3
 Block user comment: N
 Private report:     N

 New Comment:

the same as #60523. since that one has been assigned, so I am going to close 
this 
one, thanks


Previous Comments:
------------------------------------------------------------------------
[2011-12-12 01:13:48] php at danielfriesen dot name

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 this bug report at https://bugs.php.net/bug.php?id=60496&edit=1

Reply via email to