HELP: Debian / PHP 4.4.2 / IMAP

I thought it was the package libpam0g-dev , this should be easy to find with google if you just look for that error message.
 
Hi

found solution now:

#cd /tmp
#apt-get install libpam0g-dev
#apt-get install libkrb5-dev
#apt-get install libimlib2-dev


#wget ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
#tar -zxvf c-client.tar.Z
#cd imap-2004g
#make ldb
#mkdir /usr/local/imap-2000g
#mkdir /usr/local/imap-2000g/lib
#mkdir /usr/local/imap-2000g/include
#cp /tmp/imap-2004g/c-client/*.c /usr/local/imap-2000g/lib/.
#cp /tmp/imap-2004g/c-client/*.h /usr/local/imap-2000g/include/.
#cp /tmp/imap-2004g/c-client/c-client.a /usr/local/imap-2000g/lib/libc-client.a
#cd /usr/local/directadmin/customapache

### Change the configure.php ###
Add this line end:
--with-imap=/usr/local/imap-2000g
at the end of the configure statement. Remember to add a "\" to the previous line.

#./build php n

Restart the Apache Web Server (from the DirectAdmin Control Panel, or /etc/init.d/httpd restart).
 
Last edited:
PROBLEM: The latest version of c-client contains imap-2006a.

It compiles without error on Debian 3.1 but when I compiled php-4.4.4 against imap it gave errors.

FIX: Ccomment out the following line from /usr/local/imap-2006a/include/utf8.h:
Code:
long utf8_mime2text (SIZEDTEXT *src, SIZEDTEXT *dst, long flags);
- to -
Code:
//long utf8_mime2text (SIZEDTEXT *src, SIZEDTEXT *dst, long flags);

NOTE: With this fix applied php-4.4.4 compiled withour errors on my Debian based setup. IMAP functionality works without a problem in PHP for now (2 days 'n counting).

DISCLAIMER: Use at your own risk!
 
For version imap-2006d:

bluecherry said:
PROBLEM: The latest version of c-client contains imap-2006d.

It compiles without error on Debian 3.1 but when I compiled php-4.4.4 against imap it gave errors.

FIX: Ccomment out the following line from /usr/local/imap-2006a/include/utf8aux.h:
Code:
long utf8_mime2text (SIZEDTEXT *src, SIZEDTEXT *dst, long flags);
- to -
Code:
//long utf8_mime2text (SIZEDTEXT *src, SIZEDTEXT *dst, long flags);

NOTE: With this fix applied php-4.4.4 compiled withour errors on my Debian based setup. IMAP functionality works without a problem in PHP for now (2 days 'n counting).

DISCLAIMER: Use at your own risk!
 
Hi

found solution now:

#cd /tmp
#apt-get install libpam0g-dev
#apt-get install libkrb5-dev
#apt-get install libimlib2-dev


#wget ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
#tar -zxvf c-client.tar.Z
#cd imap-2004g
#make ldb
#mkdir /usr/local/imap-2000g
#mkdir /usr/local/imap-2000g/lib
#mkdir /usr/local/imap-2000g/include
#cp /tmp/imap-2004g/c-client/*.c /usr/local/imap-2000g/lib/.
#cp /tmp/imap-2004g/c-client/*.h /usr/local/imap-2000g/include/.
#cp /tmp/imap-2004g/c-client/c-client.a /usr/local/imap-2000g/lib/libc-client.a
#cd /usr/local/directadmin/customapache

### Change the configure.php ###
Add this line end:
--with-imap=/usr/local/imap-2000g
at the end of the configure statement. Remember to add a "\" to the previous line.

#./build php n

Restart the Apache Web Server (from the DirectAdmin Control Panel, or /etc/init.d/httpd restart).

Merci for your message, its work for me with the last version 2007, im in debian and i use costumbuild & dovecot



#cd /tmp
#apt-get install libpam0g-dev
#apt-get install libkrb5-dev
#apt-get install libimlib2-dev


#wget ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
#tar -zxvf c-client.tar.Z
#cd imap-2007e
#make ldb
#mkdir /usr/local/imap-2007e
#mkdir /usr/local/imap-2007e/lib
#mkdir /usr/local/imap-2007e/include
#cp /tmp/imap-2007e/c-client/*.c /usr/local/imap-2007e/lib/.
#cp /tmp/imap-2007e/c-client/*.h /usr/local/imap-2007e/include/.
#cp /tmp/imap-2007e/c-client/c-client.a /usr/local/imap-2007e/lib/libc-client.a
#cd /usr/local/directadmin/custombuild

### Change the configure.php ###
Add this line end to configure/ap2 or ap1 ... configure.php5 or configure.php4

--with-imap=/usr/local/imap-2007e
at the end of the configure statement. Remember to add a "\" to the previous line.

#./build php n

Restart the Apache Web Server (from the DirectAdmin Control Panel, or /etc/init.d/httpd restart).
 
Last edited:
I followed exactly these steps but I never managed to get IMAP extension to work. After your steps i reboot the server to make sure and run again a php page with phpinfo() function but there is no any IMAP extension appear after recompiling php with new configurations.. I edited configure.php4 and configure.php5 both on configure/ap1 and configure/ap2 but still nothing happend. I attach here the command process..
 

Attachments

Hi, i tried install imap-2007e because i had some issues with 2004 version but on compile I'm getting the following error:

/usr/local/imap-2007e/lib/libc-client.a(osdep.o): In function `ssl_onceonlyinit':
/tmp/imap-2007e/c-client/osdep.c:337: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
ext/imap/.libs/php_imap.o: In function `zif_imap_expunge':
/usr/local/directadmin/custombuild/php-5.2.9/ext/imap/php_imap.c:1119: undefined reference to `mail_expunge'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
server:/usr/local/directadmin/custombuild#

EDIT:
Ok! I forgot something that's why i was getting the error! imap-2007e is now installed! :D
server:/tmp/imap-2007e# cd c-client/
server:/tmp/imap-2007e/c-client# ln -s /usr/local/imap-2007e/c-client.a /usr/local/imap-2007e/libc-client.a
 
Last edited:
Back
Top