PHP imap_open():尝试连接到GMAIL时无效的远程规范 [英] PHP imap_open(): invalid remote specification when trying connect to GMAIL

查看:120
本文介绍了PHP imap_open():尝试连接到GMAIL时无效的远程规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Gmail检索邮件,并出现以下错误:

I'm trying to retrive mails from Gmail and got following error:

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

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

OpenSSL and IMAP are installed in my server, following are openssl & imap info from phpinfo();

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

我现在真的很困惑,请帮忙!

I'm really confused now, please help!

推荐答案

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

I have been having a similar issue. I can tell you from personal experience that while you may have IMAP and OpenSSL installed, you may need to recompile php install "--with-imap-ssl[=DIR]." I wanted to do the same thing and received the same error. I also had the same OpenSSL and IMAP versions installed. I have recompiled php, and here is my config:

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

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

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

You don't need to use the same config of course, because it is customized for what I need.

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

In case you are unfamiliar with compiling php, you can find the source here:
http://www.php.net/downloads.php
Here's a basic tutorial on how to compile php and apache, assuming you are on UNIX. It also includes how to compile them with curl, you can use all of the instructions for curl and replace them with ssl and imap respectively and it should work. http://thermo.sdsu.edu/testhome/phpinstall.html

这篇关于PHP imap_open():尝试连接到GMAIL时无效的远程规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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