Closed jefkin closed 5 years ago
Hi @jefkin
thanks for reporting the bug!
Your assumption was correct, there are a sub-optimal regex in use within the function substitution logic. The issue will be fixed with release 1.7.3 of the doppelgaenger library.
Best regards, Bernhard
DOPPELGAENGER process fails to handle additional spaces between the 'function' keyword and the function name.
Worse, this is a silent failure at startup, appearing to be a good setup for the app, but leading to 500 errors on access to the app servlets like: exception 'AppserverIo\Psr\Servlet\ServletException' with message 'Please configure an error page for status code 500' in /opt/appserver/src/AppserverIo/Appserver/ServletEngine/Utils/ErrorUtil.php:291 Stack trace:
0 /opt/appserver/src/AppserverIo/Appserver/ServletEngine/RequestHandler.php(263): AppserverIo\Appserver\ServletEngine\Utils\ErrorUtil->handleErrors(Object(AppserverIo\Appserver\ServletEngine\RequestHandler),
Object(AppserverIo\Appserver\ServletEngine\Http\Request), Object(AppserverIo\Appserver\ServletEngine\Http\Response))
1 [internal function]: AppserverIo\Appserver\ServletEngine\RequestHandler->shutdown()
2 {main}
The PHP error log reports: [09-May-2019 15:44:53 Europe/Berlin] PHP Fatal error: Cannot redeclare\\::doGet() in /opt/appserver/var/tmp/localhost//cache/.php on line 85
Examining the cached file, in comparison to other working class files revealed that there were two entries for doGet, the original one (WITHOUT the DOPPELGAENGEROriginal suffix) and the one created by the Doppelgaenger process.
Probably the issue here is two fold: