Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress bogus PHP imap_open() Notice: insecure server advertised AUTH=PLAIN

Tags:

php

imap

I'm getting a mess of these bogus warnings in my log file, and I’d like to suppress them without suppressing legitimate messages:

PHP Notice: Unknown: SECURITY PROBLEM: insecure server advertised AUTH=PLAIN (errflg=1) in Unknown on line 0

(I’m connecting to an IMAP service that is only listening to localhost on a server with no third-party users.)

like image 946
danorton Avatar asked Mar 19 '12 07:03

danorton


1 Answers

One thing you can do is use the imap_errors and imap_alerts functions, place this code before your imap_close.

imap_errors();
imap_alerts();

What these functions do is return all errors and alerts that have occured and then flushes them. If you do not call these functions they are issued as notices when imap_close() is called, or the page dies.

like image 187
arosolino Avatar answered Oct 20 '22 02:10

arosolino