在我的localhost,没问题,PHP脚本工作 . 在我的主机服务器上可怕的“无法连接到'{imap.gmail.com:993/imap/ssl}'”

代码:

$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$inbox = imap_open($hostname,$username, $password) or die('Cannot connect to Gmail: ' 
. imap_last_error());

他们的php配置似乎具备所有必要的:PHP版本5.2.17

'./configure' '--prefix=/usr/local/php5' '--with-libdir=lib64' '--sysconfdir=/etc' '--disable-rpath' '--enable-cli' '--disable-cgi' '--with-config-file-path=/usr/local/lib' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr' '--with-openssl=/usr' '--with-kerberos=/usr' '--with-pcre-regex=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--enable-bcmath' '--enable-magic-quotes' '--with-bz2=/usr' '--enable-calendar' '--enable-ctype' '--with-curl=/usr' '--with-curlwrappers' '--enable-dom' '--enable-exif' '--enable-filter' '--with-pcre-dir=/usr' '--enable-ftp' '--with-openssl-dir=/usr' '--with-gd=/usr' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--with-xpm-dir=/usr' '--with-ttf=/usr' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--with-gettext=/usr' '--with-gmp=/usr' '--enable-hash' '--with-iconv' '--enable-mbregex' '--enable-mbstring' '--with-mcrypt=/usr' '--with-mhash=/usr' '--with-mime-magic=/usr/share/magic.mime' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-sqlite' '--enable-pdo' '--with-pdo-sqlite' '--with-pdo-mysql=/usr' '--enable-posix' '--enable-reflection' '--enable-session' '--enable-simplexml' '--enable-sockets' '--enable-spl' '--enable-soap' '--enable-json' '--enable-inline-optimization' '--enable-tokenizer' '--with-regex=system' '--enable-xml' '--with-libexpat-dir=/usr' '--enable-xmlreader' '--with-xmlrpc' '--enable-xmlwriter' '--with-xsl=/usr' '--enable-zip' '--with-imap=/usr/lib64/dovecot/imap' '--with-imap-ssl' '--with-pear=/usr/local/lib/php' '--with-apxs2=/usr/local/apache/bin/apxs'

卷曲

cURL支持启用cURL信息libcurl / 7.15.5 OpenSSL / 0.9.8b zlib / 1.2.3 libidn / 0.6.5

IMAP

IMAP c-Client版本2004 SSL支持已启用Kerberos支持

OpenSSL的

OpenSSL支持启用OpenSSL版本OpenSSL 0.9.8e-fips-rhel5 2008年7月1日


那么有人可以提供一个暗示,它应该抛出一个无法连接错误的内容吗?它甚至没有做imap_open . 警告:imap_open()[function.imap-open]:无法打开流blahblah帮助?