friendica / docker

Docker image for Friendica

Home Page:https://friendi.ca

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce PHP error_reporting scope in container

MrPetovan opened this issue · comments

Is it possible to alter the container PHP configuration to suppress Deprecated and Notice messages as well as disable the error display in the script output?

Well, this would be nice to know since I just rebuilt my node in my k3s due to a MariaDB issue that unintentionally created myself. The "No TLS Detected" issue was easy to work around by the means of using my phone's mobile data but the PHP Warnings and such are enough to drive some people nuts. This goes twice over when one uses the friendica:stable Image. Either way, it works so I'm happy.

Funny this should be here.

If you execute the following command in the container, it accomplishes this, as I found out yesterday:

ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini

Not sure why this or something like it isn't done by default.

I did the "ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini" command but the errors still happen. I wonder if it has something to do with the "Vier" Theme as that is the only time I see any PHP errors when clicking on Home or Network. Currently, I'm using the "frio" Theme and it's not too bad so I decided to stick with it.

Did you restart the container?

Yes, I did.

The question is if it is really a good idea to suppress warnings/errors by default.

It wouldn't be hard to link the production-ready php.ini per default, but are we sure we really do want it? I'm not sure. Maybe we can add it to the README how to treat errors

It’s a good question, and I don’t think there is a simple answer.

Notices and Deprecated messages aren't useful to debug most issues, and the display in the script output isn't ideal either as it breaks pages for the most innocuous reasons.