Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php built-in webserver errors log (Zend Framework 2 App)

I use php built-in webserver to debug locally my websites.

php -S localhost:8080

Sometimes if something is wrong I have a generic 500 error in stdout and I don't understand where is the problem.

 127.0.0.1:51936 [500]: /dashboard

Is there a method to have a more descriptive error like the error.log?

EDIT:

My error was

$this->userDisplayName()

instead of

$this->zfcUserDisplayName()

In a PHTML view in my Zend Framework 2 App

like image 745
chrvadala Avatar asked Nov 24 '25 18:11

chrvadala


2 Answers

I honestly haven't worked with the php built-in feature yet, so I have no experience and nuch much clue but... in apache you set your LogLevel directive to debug... so how about trying these settings in php.ini

display_errors: On
error_reporting: E_ALL
log_errors: On
like image 88
Alex Avatar answered Nov 27 '25 06:11

Alex


SOLVED!

This was a bug of the current Zend Framework stable version (2.0.6)

I have updated my project to developer branch (dev-master) and now it work correctly. I have a correct stacktrace for each error.

Link to the issue: https://github.com/zendframework/zf2/issues/2991

Thanks to all

like image 25
chrvadala Avatar answered Nov 27 '25 06:11

chrvadala



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!