|
Subject
|
php.cig with IMAP support
|
| | Posted by | rhinosw (DH New User
) | | Posted on | 07/28/05 10:10 PM |
|
|
I'm trying to build my own php.cgi which supports the imap functions. If you have already built one, and would be willing to let others grab a copy, please let me know.
Ta, Rhino
|
|
|
|
Subject
|
Re: php.cig with IMAP support
[re: rhinosw]
|
| | Posted by | rhinosw (DH New User
) | | Posted on | 07/31/05 07:53 PM |
|
|
Well, I succeeded in building my own. Great sence of satisfaction. I don't know how many of the other modules work, as I'm only using this in one section of my site. None the less, when I have time, I'll investigate further and build one that I can use for everything. At this stage though, I'm just chuffed that I got IMAP to work :)
Rhino
|
|
|
|
Subject
|
Re: php.cig with IMAP support
[re: rhinosw]
|
| | Posted by | decswxaqz (DH Enthusiast) | | Posted on | 08/01/05 00:52 AM |
|
|
How did you manage that? I tried doing my own install of PHP5 but couldn't get IMAP to install. I got confused having to install xxx first and then yyy second, I couldn't get the first one to install ;_;
|
|
|
|
Subject
|
Re: php.cig with IMAP support
[re: decswxaqz]
|
| | Posted by | rhinosw (DH New User
) | | Posted on | 08/01/05 08:10 PM |
|
|
You first need to download and compile the imap extension. I got my instructions from http://au.php.net/imap.
Once I'd done that, I followed the instructions from http://www.moztips.com/php5_install/, adding --with-imap=/path/to/imap/source/ to the php configure statement.
If you're on jabber, send me your ID, and I'm happy to walk you through it when we're both online. On the other hand, I'm happy to make a copy of my php.cgi available for download.
I should point out that I'm no expert at compiling software under *nix, just learning as I go.
Rhino
|
|
|
|
Subject
|
Re: php.cig with IMAP support
[re: rhinosw]
|
| | Posted by | decswxaqz (DH Enthusiast) | | Posted on | 08/02/05 03:10 AM |
|
|
How did you compile it may I ask? I tried to using Cygwin (for windows) but it didn't work. I don't have access to machine with Unix on it. Could you link to the compiled libraries/files needed? I'm sure that we should be able to use the same files on DH servers?
I don't have Jabber, but I have MSN.
|
|
|
|
Subject
|
Re: php.cig with IMAP support
[re: decswxaqz]
|
| | Posted by | rhinosw (DH New User
) | | Posted on | 08/02/05 08:18 PM |
|
|
I used shell access to my dreamhost account (I hope that's ok), so compiled it on the server that's running the CGI, which I guess is the ideal situation.
As far as setting up a link, that's possible I guess. I'll check with the admin's if that's ok, otherwise we could simply put a copy into your home directory.
Use this as a guide, I just went through my history file and grabbed the commands that looked usefull :-S
#get and install the imap libraries mkdir /home/yourhome/src cd /home/yourhome/src wget ftp://ftp.cac.washington.edu/imap/imap-2004e.tar.Z tar -zxf imap-2004e.tar.Z cd imap-2004e make slx SSLTYPE=none mkdir lib mkdir include cd c-client cp *.h ../include/ cp *.c ../lib/ cp c-client.a ../lib/libc-client.a
#get the latest version of PHP and install mkdir /home/yourhome/php cd /home/yourhome/src
wget http://www.php.net/get/php-5.0.4.tar.gz/from/us2.php.net/mirror gunzip php-5.0.4.tar.gz tar -xf php-5.0.4.tar cd php-5.0.4/
#add any extras you want compiled into the CGI. ./configure \ --prefix=/home/yourhome/php \ --with-imap=/home/yourhome/src/imap-2004e \
make make INSTALL
Edited by rhinosw on 08/02/05 08:22 PM (server time).
|
|
|
|
Subject
|
Re: php.cig with IMAP support
[re: rhinosw]
|
| | Posted by | Lance (DH New User
) | | Posted on | 08/04/05 09:58 PM |
|
|
I've put the process I used to get IMAP working up at... http://outerpla.net/cms/archives/2
Hope it helps someone. Lance
|
|
|
|
Subject
|
Re: php.cig with IMAP support
[re: Lance]
|
| | Posted by | decswxaqz (DH Enthusiast) | | Posted on | 08/05/05 01:00 AM |
|
|
I got mine to work by using DH wiki and the script provided by rhinosw. Thanks for the help.
For those who can't connect, you should use
<?php $host = "{mail.domain.com:143/imap}"; //This is the name that appears in bold on the Mail->Addresses part of the DH panel. (It could be a lot of random numbers/letters $user = "user_name"; //Password for the account $pass = "password";
Btw Lance, why don't you use $HOME, and $DOMAIN (in the DH wiki) instead of /home/domain ? Makes it much more portable, especially if you recommend the script to others.
$mbox = imap_open($host, $user, $pass); ?>
|
|
|
|
Subject
|
Re: php.cig with IMAP support
[re: decswxaqz]
|
| | Posted by | Lance (DH New User
) | | Posted on | 08/05/05 04:18 AM |
|
|
Thanks decswxaqz,
I've updated the page to use $HOME
|
|
|