Possible bug?

The README file supplied with Mailhandler tells me about 'Requirements:'

"The IMAP dynamic extension must be enabled. On Windows PHP installations, this is as easy as uncommenting the line containing "extension=php_imap.dll" in php.ini."

From the PHP manual at http://au3.php.net/imap it appears 'php_imap.dll' may be the windows equivalent of 'mod_imap'.

phpinfo on my server tells me that mod_imap is loaded.

Mailhandler complains with: Fatal error: Call to undefined function: imap_open() in /usr/www/users/ipsink/lovelife/modules/mailhandler/mailhandler.module on line 16

What am I missing? Any help would be appreciated.

Comments

ChrisKennedy’s picture

Category: bug » support
Status: Active » Fixed

mod_imap is for apache, not php - try googling it and see. Your phpinfo() will have an actual IMAP section if you truly have imap support compiled in.

But more importantly, you won't get the "Call to undefined function" error for imap_open() if php's imap extension is loaded.

Clemens’s picture

Following up your suggestion to Google for mod_imap I note many references to a current vulnerability in the module updated on 5 Mar:
Apache Mod_IMAP Referer Cross-Site Scripting Vulnerability.
Refer http://www.securityfocus.com/bid/15834

No wonder it is currently not available for my *nix flavor... :-(
Should this information be forwarded to the Drupal security team? How do we do that?

ChrisKennedy’s picture

Drupal has no official involvement with *mod_imap*, nor anything else with apache. Mailhandler merely requires the *imap* extension to php in order to function, which is completely different.

moshe weitzman’s picture

@Chris - If you are up to it, please add a hook_requirements() check for IMAP extension.

Clemens’s picture

Thank you for your replies, but...
We are back to looking for a PHP extension. Elsewhere you said in a reply to a question from me (although the post appears to have been unpublished/deleted) that I 'would have a separate Imap section in phpinfo'...

And indeed, this is what I see:

IMAP
IMAP c-Client Version 2001
SSL Support enabled
Kerberos enabled

Is this the PHP extension you refer to/we are looking for? If so, mailhandler should work?

jarea’s picture

Mailhandler was/is working fine on my 4.7 installation and I got the imap error on my 5.1 installation - both on the same server. I put in /notls in the extra commands field on the 5.1 install and things started working.

VizionQuest’s picture

Status: Fixed » Active

I have the same problem:
"Fatal error: Call to undefined function: imap_open() in /home/content/m/y/c/xxxxxxx/html/modules/mailhandler/mailhandler.module on line 16"

I have tried numerous variations of input and have tried two different email account (gmail, other).

I keep getting the same error everytime. There are several threads throughout this the Drupal forum that identify many others having the same problem.

Could someone provide a troubleshooting checklist help diagnose the problem please? Thank you!

steinmb’s picture

Installed on Drupal 5.5 and got the same error. I'm running Apache and PHP 5.1.x on a Centos server and all I had to do was to install php-imap "yum install php-imap" problem solved.

--
Stein Magne

moshe weitzman’s picture

well, d5 doesn't actually check hook_requirements before installing. this is fixed in D6.

lszyrmer’s picture

moshe that's great...are there any plans to fix this on D5, as not everyone is willing upgrade due to dependecies with other modules? kind of makes the R5 module download less useful if it doesn't work. Is there any workaround to for it that you know of?

moshe weitzman’s picture

Status: Active » Fixed

hook requirements won't make the module work differently, it just informs the admin that he can't install the module because he does not have mod_imap in his PHP. and whether it gets fixed or not is up to the D5 core maintainers - not mailhandler.

you need to find a web host who will let you have the mod_imap php extension.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

remoran’s picture

Please get the imap situation fixed!!! This is a real PITA to deal with as Mail Handler requires it and Drupal has not solved the problem by providing a concise way of resolving the problem. Please get this done.

jalder’s picture