From the course: PHP Essential Training

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Common problems

Common problems

- [Instructor] When we encounter an error in our code, the more information that we have about that error, the easier it's going to be to resolve it. In this movie, we'll look at the warnings and errors that PHP generates and learn how they can help you to resolve problems. The first and most important thing is to make sure that error reporting is turned on. We can't deal with our errors if we can't see them. So we want to make sure that PHP is reporting errors as they happen to us when we're in development. There are two ways to do this. The first is that we can set the error reporting in the php.ini file. And we saw how to do that back in the configuration chapter. You just edit your php.ini file to have display errors on, error reporting equal to whatever settings we want to have for that, and then restart our web server so it reloads that php.ini file. We can also set the error reporting on-the-fly in our PHP code.…

Contents