User login

Installing IMAP functions for PHP on Debian: an Agaric saga

Fatal error: Call to undefined function imap_open() in /var/www/drupal-5/modules/contributed/mailhandler-5.x-1.1.tar/mailhandler/mailhandler.module on line 16

Probably the Debian package php-net-imap which installs:

http://pear.php.net/package/Net_IMAP

(no useful documentation there) just doesn't do it.

So:

http://us.php.net/manual/en/ref.imap.php

Do it.

Update:

Fascinating.

Searching for
php imap debian
brought nothing useful, just that silly pear package and some defunct Debian and Ubuntu packages.

However, searching for:
php imap c-library debian

seems to have brought up exactly what we need:

http://packages.debian.org/unstable/web/php5-imap

Let's apt-get install php5-imap, then.

The whole "unstable" thing is a little scary.

More scary!

Libc-client earlier than version 2002d (and development versions of?? 2003) included an unofficial and no longer maintained patch to support Maildirs. By default Maildirs were not used by uw-imapd or ipopd, but if you have changed your system configuration or other installed programs depend on libc-client then upgrading may result in broken mail handling.

Do you want to continue installing a libc-client without Maildir support? ??
Continue installing libc-client without Maildir support?

<Yes> <No>

To heck with Maildir support! Onward!

Unpacking php5-imap (from .../php5-imap_5.2.0-8+etch7_i386.deb) ...
Setting up mlock (2002edebian1-13.1) ...
Setting up libc-client2002edebian (2002edebian1-13.1) ...

Setting up php5-imap (5.2.0-8+etch7)

So it would seem that to actually use this we have to go back to the PHP-IMAP instructions and do this:

To get these functions to work, you have to compile PHP with --with-imap[=DIR], where DIR is the c-client install prefix. From our example above, you would use --with-imap=/usr/local/imap-2000b. This location depends on where you created this directory according to the description above.

And possibly:

Note: Depending how the c-client was configured, you might also need to add --with-imap-ssl=/path/to/openssl/ and/or --with-kerberos=/path/to/kerberos into the PHP configure line.

I really have to learn where Debian actually puts things. It's surely somewhere standard that everyone should know but would it kill the install script to just tell me?

Fatal error: Call to undefined function imap_open() in /var/www/drupal-5/modules/contributed/mailhandler-5.x-1.1.tar/mailhandler/mailhandler.module on line 16

Probably the Debian package php-net-imap which installs:

http://pear.php.net/package/Net_IMAP

(no useful documentation there) just doesn't do it.

So:

http://us.php.net/manual/en/ref.imap.php

Do it.

Update:

Fascinating.

Searching for
php imap debian
brought nothing useful, just that silly pear package and some defunct Debian and Ubuntu packages.

However, searching for:
php imap c-library debian

seems to have brought up exactly what we need:

http://packages.debian.org/unstable/web/php5-imap

Let's apt-get install php5-imap, then.

The whole "unstable" thing is a little scary.

More scary!

Libc-client earlier than version 2002d (and development versions of?? 2003) included an unofficial and no longer maintained patch to support Maildirs. By default Maildirs were not used by uw-imapd or ipopd, but if you have changed your system configuration or other installed programs depend on libc-client then upgrading may result in broken mail handling.

Do you want to continue installing a libc-client without Maildir support? ??
Continue installing libc-client without Maildir support?

<Yes> <No>

To heck with Maildir support! Onward!

Unpacking php5-imap (from .../php5-imap_5.2.0-8+etch7_i386.deb) ...
Setting up mlock (2002edebian1-13.1) ...
Setting up libc-client2002edebian (2002edebian1-13.1) ...

Setting up php5-imap (5.2.0-8+etch7)

So it would seem that to actually use this we have to go back to the PHP-IMAP instructions and do this:

To get these functions to work, you have to compile PHP with --with-imap[=DIR], where DIR is the c-client install prefix. From our example above, you would use --with-imap=/usr/local/imap-2000b. This location depends on where you created this directory according to the description above.

And possibly:

Note: Depending how the c-client was configured, you might also need to add --with-imap-ssl=/path/to/openssl/ and/or --with-kerberos=/path/to/kerberos into the PHP configure line.

I really have to learn where Debian actually puts things. It's surely somewhere standard that everyone should know but would it kill the install script to just tell me?

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.