Welcome Guest, Not a member yet? Register   Sign In
Parse errors from models
#1

[eluser]Alhazred[/eluser]
Writing some code, I've found that if there is a parse error inside a model, in example a missing ) or ; and so on, no error message is shown, the controller just stops to be executed when it calls the bugged model and the page stays blank on the controller's address.

In this way if I have a lot of code inside the model is really hard to find the problem.

Is there a way to have a "Parse error" or another error displayed in these cases?
#2

[eluser]TWP Marketing[/eluser]
I find that this kind of error is frequently found by the web server (I use Apache). Check your server error log. Its location depends on which server you are using, mine, under linux, is at /var/log/apache2/error.log
My log will usually reveal the line number and file containing a coding error (fat fingers errors).
#3

[eluser]InsiteFX[/eluser]
I use phpDesigner 8 and it will catch all those errors right in the editor.
#4

[eluser]Aken[/eluser]
You need to turn error reporting on, locally and/or in your php.ini settings.
#5

[eluser]Alhazred[/eluser]
[quote author="Aken" date="1341785611"]You need to turn error reporting on, locally and/or in your php.ini settings.[/quote]
In my php.ini I've set error reporting to E_ALL|E_STRICT
What else should I do?
What do you mean when you say to turn error reporting on locally?
#6

[eluser]Aken[/eluser]
http://stackoverflow.com/questions/84502...ges-in-php




Theme © iAndrew 2016 - Forum software by © MyBB