Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm very new when it comes to webservers. I have my own DDS but no imap installed at it. I asked my ISP to install it but they charge a lot. In my opinion it shouldn't be too much work so I started googling and came accross this article: http://www.electrictoolbox.com/install-php-imap-centos/.

It seems like i only have to execute 2 commands:

sudo yum install php-imap
sude /etc/init.d/httpd graceful

I'm logged on as user 'root' to my server, this is the account they provided to me. But when I try the first command I get this output:

[root@dds ~]# sudo yum install php-imap
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.oxilion.nl
 * base: mirror.oxilion.nl
 * epel: ftp.nluug.nl
 * extras: mirror.oxilion.nl
 * rpmfusion-free-updates: mirror01.th.ifl.net
 * rpmfusion-free-updates-testing: mirror01.th.ifl.net
 * rpmfusion-nonfree-updates: mirror01.th.ifl.net
 * rpmfusion-nonfree-updates-testing: mirror01.th.ifl.net
 * updates: mirror.oxilion.nl
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package php-imap available.
Nothing to do

How can I achieve to install php's imap functions?

I hope to hear from you!

Kind regards from Holland.

Ben Fransen

Update Output from less /etc/yum.conf (first about 20 empty lines)

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

installonly_limit = 5

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
exclude=apache* httpd* mod_* mysql* MySQL* da_* *ftp* exim* sendmail* php* bind-chroot*

** Update 2 ** Results from the commands you've provided.

[root@dds ~]# rpm -q php httpd
package php is not installed
package httpd is not installed
[root@dds ~]#
[root@dds ~]# rpm -V php httpd
package php is not installed
package httpd is not installed
[root@dds ~]#
share|improve this question
    
Hi Ben - your yum.conf is excluding all php* and httd* packages - if you comment-off that line, it should do the trick :) –  warren Oct 14 '10 at 12:54
    
Hi Warren, i saw. Do you believe commenting that rule (however I can do that by CLI), then installing the package and then comment the line again would result in a different situation than I have now? (See my own answer). –  Ben Fransen Oct 14 '10 at 13:00
add comment

3 Answers

up vote 1 down vote accepted

It's definitely there. Check your yum repository configurations in /etc/yum.{conf,repos.d} to make sure that the package hasn't been excluded for some reason.

share|improve this answer
    
When I try that command it tells me -bash: /etc/yum.conf: Permission denied. Any suggestions? –  Ben Fransen Oct 14 '10 at 12:18
    
Open it in a text editor instead of trying to run it. –  Ignacio Vazquez-Abrams Oct 14 '10 at 12:21
    
I don't believe I can do that? I'm logged on with putty... –  Ben Fransen Oct 14 '10 at 12:23
    
less /etc/yum.conf –  Ignacio Vazquez-Abrams Oct 14 '10 at 12:24
    
Updated my question with the output. Thanks so far man!, gave you +100 if i could ;) I think php* should be removed from this line huh? And if so, how can I accomplish that? –  Ben Fransen Oct 14 '10 at 12:30
show 25 more comments

use this:

sudo yum install --disableexcludes=all php-imap

It's a one-shot command to install an RPM without modifying your exclusion list.

For the IMAP server itself I suggest dovecot which works fine for me with few extra configuration.

share|improve this answer
    
Thank you, +1 so far! I've posted the outcome in the result below.. –  Ben Fransen Oct 14 '10 at 12:45
    
And by the way, I also called yum list installed, now php-imap is in that list, but marked red (also php-common), instead of gray/white (all others).. What does this mean? Did the restart fail? –  Ben Fransen Oct 14 '10 at 12:48
    
from man yum.conf: color_list_installed_extra The colorization/highlighting for packages in list/info installed which has no available package with the same name and arch. Default is ‘bold,red’. –  Rosco Oct 14 '10 at 13:09
add comment

@Rosco: I've tried your answer, at least php-imap got installed now! But I also called to restart the httpd-service but in my php file I stell get a message to an undefined function imap_open....

Output from the commands:

[root@dds ~]# sudo yum install --disableexcludes=all php-imap
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.oxilion.nl
 * base: mirror.oxilion.nl
 * epel: ftp.nluug.nl
 * extras: mirror.oxilion.nl
 * rpmfusion-free-updates: mirror01.th.ifl.net
 * rpmfusion-free-updates-testing: mirror01.th.ifl.net
 * rpmfusion-nonfree-updates: mirror01.th.ifl.net
 * rpmfusion-nonfree-updates-testing: mirror01.th.ifl.net
 * updates: mirror.oxilion.nl
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-imap.x86_64 0:5.1.6-27.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-imap
--> Processing Dependency: libc-client.so.1()(64bit) for package: php-imap
--> Running transaction check
---> Package libc-client.x86_64 0:2004g-2.2.1 set to be updated
---> Package php-common.x86_64 0:5.1.6-27.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch            Version               Repository     Size
================================================================================
Installing:
 php-imap             x86_64          5.1.6-27.el5          base           54 k
Installing for dependencies:
 libc-client          x86_64          2004g-2.2.1           base          515 k
 php-common           x86_64          5.1.6-27.el5          base          153 k

Transaction Summary
================================================================================
Install       3 Package(s)
Upgrade       0 Package(s)

Total download size: 722 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): php-imap-5.1.6-27.el5.x86_64.rpm                  |  54 kB     00:00
(2/3): php-common-5.1.6-27.el5.x86_64.rpm                | 153 kB     00:00
(3/3): libc-client-2004g-2.2.1.x86_64.rpm                | 515 kB     00:00
--------------------------------------------------------------------------------
Total                                           1.8 MB/s | 722 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-common                                               1/3
  Installing     : libc-client                                              2/3
  Installing     : php-imap                                                 3/3

Installed:
  php-imap.x86_64 0:5.1.6-27.el5

Dependency Installed:
  libc-client.x86_64 0:2004g-2.2.1       php-common.x86_64 0:5.1.6-27.el5

Complete!
[root@dds ~]# sudo /etc/init.d/httpd graceful
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.