We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to disable debug message?

e.g.

Notice: Trying to get property of non-object in C:\xampp\htdocs\test\app\cache\c__xampp_htdocs_test_app_views_index.volt.php on line 109

https://localhost/test/xxx -> XxxController handler class cannot be loaded

If user saw these message, they may guess what framework is used in website.

How to disable these debug message?

Modify your php.ini file and turn off error reporting. Even better would be to log them to a file so the errors aren't lost.



6.9k

Now I turned off error reporting in php.ini, some error is disabled. but "XxxController handler class cannot be loaded" still display on screen, I tried different setting in php.ini, but I still cannot disable this message.



98.9k
Accepted
answer

You have to log exceptions in a file to avoid that, by default exception messages are sent to stdout:

https://github.com/phalcon/forum/blob/master/public/index.php#L65

Now I turned off error reporting in php.ini, some error is disabled. but "XxxController handler class cannot be loaded" still display on screen, I tried different setting in php.ini, but I still cannot disable this message.