Configure php-imap redhat [solved]
If your web server uses PHP and you need to use IMAP take a look at this post.
When do i need to install IMAP support for PHP
If you want to use imap_open function you need to do it.
How do I check if my PHP is actually configured to use IMAP?
Two ways:
- Check the output of phpinfo(); info. More precisely, the additional .ini files parsed part. There should be something like /etc/php.d/imap.ini if you already have imap in your php.
- Make a doihaveimap.php like the following and run it:
<?php if(!function_exists('imap_open')) echo "I DO have it installed"; else echo "I do NOT"; ?>
I need to install it: how do I proceed?
My system is a
Linux 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux.
So I proceed with the installation using yum.
yum install libc-client.x86_64 yum install libc-client-devel.x86_64 yum install php-imap.x86_64 /etc/init.d/httpd restart
Does it work? How to check it
Write a simple php program like the following and run it.
Been there, done that… it does not work!
Most of us get this error:
Array ( [0] => [CLOSED] IMAP connection broken (server response) )
You should make a
telnet yourimapserver 143If it does not connect, there you have the problem. Fix it before continue reading. If you are kind of desperate, read this post.
Well, lets suppose it connects but the “Invalid credentials” error message pops. Common mistakes are typos when defining username/password. Also check if the username must contain “@yourdomain.com”. Again, telnet is your friend. If it does not work in telnet it won’t work in php either…
Would you like to read more about PHP-IMAP? Check this link.
Do you need to install php-imap in another platform? Check this FTP
Related posts: