禁止伪造PHP imap_open()注意:不安全的服务器播发了AUTH = PLAIN [英] Suppress bogus PHP imap_open() Notice: insecure server advertised AUTH=PLAIN

查看:256
本文介绍了禁止伪造PHP imap_open()注意:不安全的服务器播发了AUTH = PLAIN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的日志文件中出现了这些虚假的警告,我想在不消除合法消息的情况下将其删除:

PHP注意:未知:安全问题:不安全的服务器在第0行的未知"中播发了AUTH = PLAIN(errflg = 1)

(我正在连接到仅在没有第三方用户的服务器上监听localhost的IMAP服务.)

解决方案

您可以做的一件事是使用 imap_alerts 函数,将此代码放在imap_close之前.

imap_errors();
imap_alerts();

这些功能的作用是返回所有已发生的错误和警报,然后刷新它们.如果不调用这些函数,则在调用imap_close()或页面死亡时会发出通知.

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.)

解决方案

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.

这篇关于禁止伪造PHP imap_open()注意:不安全的服务器播发了AUTH = PLAIN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆