April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Disable / Hide PHP Notices & Warnings – Server wide

Disable / Hide PHP Notices & Warnings – Server wide

A client’s website was continuously getting PHP Notices regarding PHP session clean up issues. The solution turned out to be more complicated than initially thought, sessions need to be moved into RAM.

A quick solution for this is to disable PHP from displaying Notices

error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING

Put the above in your php.ini at /etc/php.ini.

The above will disable deprecation messages, notices and warning messages.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>