Page 1 of 1
IMAP error
Posted: Tue Feb 08, 2011 8:19 pm
by MindOverBody
Well, out of boredom, I decided to retrieve my
g-mails with simple PHP scripts and I stuck at the beginning. Problem is in
imap_open function. I am running script on WampServer version 2.1. Apache Version is 2.2.17, and PHP Version is 5.3.4. WampServer is allowed in firewall. IMAP extension is loaded within WampServer, also checked in php.ini file. When I run page in browser (Chrome), it shows error message, something like this:
Here is the code:
Code: Select all
$host = "{imap.gmail.com:993/imap/ssl}INBOX";
$user = "myaccount@gmail.com";
$pass = "mypass";
$mbox = @imap_open( $host, $user, $pass ) or die("Can not connect");
Anyone have solution for this, or any alternative function(s)?
Re: IMAP error
Posted: Wed Feb 09, 2011 7:11 am
by Peter Kelly
Might sound stupid but is apache service actually running and have you set the website to online via wampp? Simple but common mistakes.
Re: IMAP error
Posted: Wed Feb 09, 2011 9:04 am
by MindOverBody
Yap, everything is running, wamp is online.
Re: IMAP error
Posted: Wed Feb 09, 2011 9:15 am
by Peter Kelly
Does
http://localhost/ work? or any other pages?
Re: IMAP error
Posted: Wed Feb 09, 2011 9:17 am
by John Cartwright
Do you have the IMAP extension installed?
What happens if you remove the @ in front of imap_connect
Re: IMAP error
Posted: Wed Feb 09, 2011 9:28 am
by MindOverBody
John Cartwright wrote:Do you have the IMAP extension installed?
What happens if you remove the @ in front of imap_connect
IMAP extension is installed, WampServer is restated also. When I remove @ same thing happens.
Yes, my other pages, work perfectly. This one works too if i comment imap_open() function.
Re: IMAP error
Posted: Wed Feb 09, 2011 9:50 am
by John Cartwright
What do your php error logs say?
Re: IMAP error
Posted: Wed Feb 09, 2011 10:07 am
by MindOverBody
John Cartwright wrote:What do your php error logs say?
PHP error logs are empty, but, apache logs show this message:
[Wed Feb 09 16:26:26 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]