3

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

2
  • switch on display_errors and error_reporting in your PHP.ini file, and you should get the errors showing up in the browser. Commented Jan 8, 2013 at 12:48
  • I tried this but doesn't worked. My error was $this->userDisplayName() instead of $this->zfcUserDisplayName() in a phtml view in my zend framework 2 app I don't know why PHP didn't show the error Commented Jan 8, 2013 at 13:53

2 Answers 2

1

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
Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.