supratik Posted August 22, 2008 Share Posted August 22, 2008 Hi all, I am using php-imap to read mails from my gmail account, but when I try the script from browser it shows this error "Can't connect to gmail-imap.l.google.com,993: Permission denied". I am using Fedora Core 9, I have already installed in my system openssl-0.9.8g-6.fc9.i686, php-5.2.6-2.fc9.i386 and I have installed php-imap-5.2.6-2.fc9.i386 using 'yum install php-imap'. The phpinfo() displays in the IMAP section as IMAP c-Client Version 2004 SSL Support enabled Kerberos Support enabled This is my PHP script <?php $imap = imap_open ("{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX", "my.test@gmail.com", "xxxxxxx") or die("can't connect: " . imap_last_error()); $message_count = imap_num_msg($imap); print $message_count; imap_close($imap); ?> can anyone please tell me where I am going wrong, also please help me to configure my Linux box for php-imap from scratch. Please let me know if more information is required. Please help me ! Supratik Quote Link to comment https://forums.phpfreaks.com/topic/120813-cant-connect-to-gmail-imaplgooglecom993/ Share on other sites More sharing options...
steviewdr Posted August 26, 2008 Share Posted August 26, 2008 What part does it fail on? Does it say unknown function? Does it say "can't connect"? Try the following: Open up a command prompt on the webserver/computer and type the following to see if it connects: telnet imap.gmail.com 993 See if that works firstly. -steve Quote Link to comment https://forums.phpfreaks.com/topic/120813-cant-connect-to-gmail-imaplgooglecom993/#findComment-625922 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.