November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

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>