gpt4 book ai didi

PHP imap_open() : invalid remote specification when trying connect to GMAIL

转载 作者:可可西里 更新时间:2023-11-01 13:28:49 35 4
gpt4 key购买 nike

我正在尝试从 Gmail 中检索邮件并收到以下错误:

Can't open mailbox {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX: invalid remote specification

我的服务器安装了 OpenSSL 和 IMAP,以下是来自 phpinfo() 的 openssl 和 imap 信息;

openssl
OpenSSL support enabled
OpenSSL Library Version OpenSSL 0.9.7l 28 Sep 2006
OpenSSL Header Version

imap

IMAP c-Client Version 2007e
Kerberos Support enabled

我现在很迷茫,请大家帮忙!

最佳答案

我也遇到过类似的问题。我可以根据个人经验告诉您,虽然您可能安装了 IMAP 和 OpenSSL,但您可能需要重新编译 php install "--with-imap-ssl[=DIR]."我想做同样的事情并收到同样的错误。我还安装了相同的 OpenSSL 和 IMAP 版本。我已经重新编译了 php,这是我的配置:

./configure --prefix=/usr/local/apache2/php --with-imap=/usr/local/imap-2007f/ --with-curl=/usr/local/curl/ --enable-sockets --with-imap-ssl=/usr/local/ssl --with-openssl --with-apxs2=/usr/local/apache2/bin/apxs --with-kerberos --without-iconv

当然,您不需要使用相同的配置,因为它是根据我的需要定制的。

如果你不熟悉编译 php,你可以在这里找到源代码:
http://www.php.net/downloads.php
假设您使用的是 UNIX,这里有一个关于如何编译 php 和 apache 的基本教程。它还包括如何使用 curl 编译它们,您可以使用 curl 的所有说明并将它们分别替换为 ssl 和 imap,它应该可以工作。 http://thermo.sdsu.edu/testhome/phpinstall.html

关于PHP imap_open() : invalid remote specification when trying connect to GMAIL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6727276/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com