0

I'm trying to install mCrypt for PHP on my server, and before that I've found that I need to install libmcrypt as well...

I cannot find any instructions via google that actually work for this, unfortunately.

I originally just tried yum install php-mcrypt but I get No package php-mcrypt available. - so I assume it's because I didn't install libmcrypt yet?

Thanks!

Repo Lists:

$ yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.cogentco.com
 * epel: mirror.cogentco.com
 * extras: centos.aol.com
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.ash.fastserv.com
repo id      repo name                                           status
base         CentOS-5 - Base                                     enabled:  3,535
epel         Extra Packages for Enterprise Linux 5 - x86_64      enabled:  6,642
extras       CentOS-5 - Extras                                   enabled:    299
rpmforge     RHEL 5 - RPMforge.net - dag                         enabled: 10,695
updates      CentOS-5 - Updates                                  enabled:    765
repolist: 21,936

I've gotten somewhat far here.. library is installed successfully. mcrypt has some errors though on dependencies:

Running Transaction
  Installing     : php-common                                               1/5 
warning: /etc/php.ini created as /etc/php.ini.rpmnew
  Installing     : php-cli                                                  2/5 
  Installing     : httpd                                                    3/5 
Error unpacking rpm package httpd-2.2.3-45.el5.centos.1.x86_64
warning: /etc/httpd/conf/httpd.conf created as /etc/httpd/conf/httpd.conf.rpmnew
warning: /etc/httpd/conf/magic created as /etc/httpd/conf/magic.rpmnew
error: unpacking of archive failed on file /etc/httpd/logs: cpio: rename
  Installing     : php                                                      4/5 
  Installing     : php-mcrypt                                               5/5 

Installed:
  php-mcrypt.x86_64 0:5.1.6-15.el5.centos.1                                     

Dependency Installed:
  php.x86_64 0:5.1.6-27.el5_5.3            php-cli.x86_64 0:5.1.6-27.el5_5.3    
  php-common.x86_64 0:5.1.6-27.el5_5.3    

Failed:
  httpd.x86_64 0:2.2.3-45.el5.centos.1                                          

Complete!

Update for MIKE

[root@server ~]# fuser -k 80/tcp
80/tcp:              17496 17502 17503 17504 17505 17590
[root@server ~]# service httpd restart
httpd not running, trying to start
[root@server ~]# service httpd status

Looking up localhost
Making HTTP connection to localhost
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://localhost/whm-server-status'
Alert!: Unable to access document.

lynx: Can't access startfile 

Also, this is in the apache error logs:

[Sat Aug 20 16:59:33 2011] [error] (13)Permission denied: Cannot open SSLSessionCache DBM file `/usr/local/apache/logs/ssl_scache' for writing (store)
Shackrock
  • 198
  • 5
  • 16

3 Answers3

1

seems to me your /etc/httpd/logs is no longer a symlink

ls -lsd /etc/httpd/logs

It should be pointed to

/var/log/httpd

EDIT

seems from your comment it isn't a symlink anymore

mv /etc/httpd/logs /etc/httpd/logs.bak
ln -s /var/log/httpd /etc/httpd/logs
service httpd restart

then try to yum update

Mike
  • 21,910
  • 7
  • 55
  • 79
  • `[root@server ~]# ls -lsd /etc/httpd/logs 4 drwxr-xr-x 2 root root 4096 Aug 20 15:52 /etc/httpd/logs` - also, I continue to get a message from Cpanel that httpd failed and auto-restarted, every few minutes i seems like... – Shackrock Aug 20 '11 at 19:53
  • seems it isn't a symlink.. edited my post to reflect what to do. – Mike Aug 20 '11 at 20:50
  • Ok take a look: `[root@server ~]# mv /etc/httpd/logs /etc/httpd/logs.bak [root@server ~]# ln -s /var/log/httpd /etc/httpd/logs [root@server ~]# service httpd restart httpd not running, trying to start (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs` – Shackrock Aug 20 '11 at 20:54
  • fuser -k 80/tcp then try to restart it – Mike Aug 20 '11 at 21:02
  • check updated main post for output results... – Shackrock Aug 20 '11 at 21:06
  • if fuser 80/tcp returns no results do a service httpd start – Mike Aug 20 '11 at 21:10
  • @Shackrock let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/1135/discussion-between-mike-and-shackrock) – Mike Aug 20 '11 at 21:10
1

You are seriously messing up your "cPanel" server apache + php by installing these rpm packages. In cPanel, you need to use easyapache to compile apache & php to enable additional modules (everything is handy in the easyapache script and you just need to select the corresponding package). cPanel uses custom apache & php builds for sites and you need to do it in the cPanel way. I assume you removed the exclude list in yum.conf to achieve these installations. To recover your server,

  1. Uninstall the apache & php rpms you installed.
  2. Run eachyapache with necessary modules selected, to bring back apache alive.

You can run the easyapache script from commandline (in a screen will be good)

**/scripts/easyapache**

Or can use the WHM to recompile your apache + php. Also make sure to put back the exclude list in yum.conf to prevent this from happening again.

exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*

For EasyApache docs: http://docs.cpanel.net/twiki/bin/view/EasyApache3/

-$

SparX
  • 1,924
  • 12
  • 10
-1

Install remi or Atomic repo and try again.

quanta
  • 50,327
  • 19
  • 152
  • 213
  • check my edit, epel is already in my repo list... – Shackrock Aug 20 '11 at 13:52
  • just tried it with rpmForge, still no luck. Same error. – Shackrock Aug 20 '11 at 13:58
  • remi repo maintains latest version of MySQL and PHP but **do it at your own risk**, due to replacement of core packages. – quanta Aug 20 '11 at 14:24
  • Ok so, I (for the life of me) can't figure out how to add atomic to my repo list. I have verified that the mcrypt package is in there though, can you help me out and tell me how to add it to my repo list? – Shackrock Aug 20 '11 at 15:55
  • You can use [automated script](http://www.atomicorp.com/installers/atomic): `wget -q -O - http://www.atomicorp.com/installers/atomic | sh`. – quanta Aug 20 '11 at 16:04
  • while this did install Atomic Linux on my machine (not what I wanted) - this did not add Atomic to the repo list, and still mCrypt cannot be found... – Shackrock Aug 20 '11 at 18:30
  • check out my update in the main post. – Shackrock Aug 20 '11 at 19:31