Download & Extend

Fatal error: Call to undefined function imap_open()

Project:Basic webmail
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,

I've installed this module and entered all the necessary settings but get the following error when I follow the E-mail link...

Fatal error: Call to undefined function imap_open() in /home/tjphotog/public_html/wcgs_nhs/modules/basic_webmail/basic_webmail.module on line 1938

I'm trying to set up access to a secure imap server and have set the port to 993, etc. I have tried a variety of other settings just in case but I always get the same error.

Any ideas?

I'm going to try connecting to an imap server that doesn't require a secure connection to see if I get the same error.

Any help much appreciated!

Tim

Comments

#1

This error exists with gmail too...which also uses SSL but then I think most do.

#2

Version 5.x-1.0-dev

Fatal error: Call to undefined function imap_open() in /home/tjphotog/public_html/wcgs_nhs/modules/basic_webmail/basic_webmail.module on line 1949

#3

Category:bug report» support request
Priority:critical» normal
Status:active» closed (fixed)

You don't have the IMAP module for PHP installed on your server.

For Debian based systems, use "sudo apt-get install php5-imap". For everything else, Google.

#4

Awesome, thanks. Will get the web host on to that one! ;-)

Thanks again, much appreciated.

#5

Version:5.x-1.0» 5.x-1.x-dev
Status:closed (fixed)» active

Ok, I've moved to a phpsuexec enabled server that supports php_imap and now I'm getting...

warning: imap_open() [function.imap-open]: Couldn't open stream {imapmail1.nhs.uk:993/secure/ssl/validate-cert/notls}INBOX in /home/tjphotog/public_html/wcgs_nhs/modules/basic_webmail/basic_webmail.module on line 1949.

Again, I have tried a range of settings with no success. It appears to be related to the certificate?

Very close now (I hope!)....all help is greatly appreciated.

Tim

#6

I'm getting "unknown host imapmail1.nhs.uk". Is that an internally setup only name? What about trying it with mail.nhs.uk or nhs.uk?

Also, are you getting any other messages in your log that might provide a clue?

EDIT: I should have specified your watchdog logs: Administer >> Logs >> Recent log entries (admin/logs/watchdog).

#7

imapmail1.nhs.uk is the imap mail server address. It's accessible from any connection (i.e. not just on a LAN) and is the address I use to access through Outlook. I'm developing an Intranet and Extranet and would like to integrate e-mails.

Recent logs show 2 errors each time I attempt to access webmail. The first error is as above, followed by:

There was an error accessing the remote server: Can't open mailbox {imapmail1.nhs.uk:993/secure/ssl/validate-cert/tls}INBOX: invalid remote specification

I've tried accessing google imap mail with no success either. I'll keep playing to see what I can come up with but if you think of anything I've missed then please shout.

Many thanks,

Tim

#8

Has anyone got this working with Googlemail? If so what settings are you using?

Could I be missing some prefix from the server name? I've tried prefixing with mail. and so on but still no joy.

#9

Here's what I have in my configuration to connect to Gmail:
Server address: imap.gmail.com
Connection port: 993
Secure login: no
Encrypt session using SSL: yes
Validate certificate: no
Encrypt session using TLS: no

If that doesn't work for you, and I suspect it won't, install the latest dev version. I just made a change to the way imap_open operates. See CHANGELOG.txt for the gory details.

With that code and those settings, I am able to access my Gmail account and read e-mail.

Whether that will fix your other problem or not remains to be seen.

#10

Thanks for making these changes. Unfortunately it still won't work, depending on the settings I select it either gives me the usual message or times out (and I have the time out set to a long time).

I guess it must have something to do with the server configuration.

Many thanks again for all your help.

Tim

#11

There was an error accessing the remote server: Can't open mailbox {imapmail1.nhs.uk:993/secure/ssl/validate-cert/tls}INBOX: invalid remote specification

I did some searching around on this message alone, and everything I found points to an installation of IMAP without SSL support installed.

If the server is Linux based, then you will need to pass that information on to the system administrator(s) and have them check it out. Also, if they have both PHP 4 and PHP 5 installed, have them verify that both have SSL support for IMAP installed.

If the server is Windows based, check out this thread for information about enabling SSL:
http://www.usenet-forums.com/alt-comp-lang-php/118932-imap_open-ssl-wind...

#12

Status:active» closed (fixed)

No response in over two years.

nobody click here