php imap_search 出现问题
我正在使用以下代码来获取 1 天以来的所有邮件 -
$yesterday = date("Y-m-d", strtotime ("-1 days"));
$searchQuery = 'SINCE "'.$yesterday.'"';
if($this->open($folder)) {
$imap_search = imap_search($this->_imap, $searchQuery);
}
这在我的开发 Windows 计算机上运行良好,但当我将其放在测试生产服务器上时,它不起作用。我什至尝试过 ALL 作为搜索参数,但它似乎没有获取任何内容。与邮件帐户的连接($this->_imap 对象)似乎没问题。
有什么想法吗?
I am using the following code to fetch all mails since 1 day less -
$yesterday = date("Y-m-d", strtotime ("-1 days"));
$searchQuery = 'SINCE "'.$yesterday.'"';
if($this->open($folder)) {
$imap_search = imap_search($this->_imap, $searchQuery);
}
This works fine on my dev windows machine but when i put it on the test production server it doesn't work. I have even tried ALL as the search parameter but it does not seem to fetch anything. The connection to the mail account (the $this->_imap object) seems to be fine.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于没有其他人回答,我将把它作为一个维基,供在我之后寻找相同问题的人使用。我遇到的问题是服务器上使用的 php 版本(5.2.1)。似乎它有一个 bug 导致它出现段错误。升级 php 版本解决了我的问题。
Since noone else answered, I will put it as a wiki for whoever comes in after me looking for the same issue. The problem I faced was with the php version used on the server (5.2.1). Seems like it has a bug which causes it to segfault. Upgrading the php version fixed the issue for me.