php-mcrypt

hello,

just tried to install the MediaWiki, however installation failed at the end when it should create the config file.

Than when I opened the error log for the apache I found the following error:

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/mcrypt.so’ - /usr/lib64/php/modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/mcrypt.so’ - /usr/lib64/php/modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Mon Dec 19 19:08:02 2011] [warn] mod_fcgid: process 4019 graceful kill fail, sending SIGKILL

than I saw that file mcrypt.so is missing so I assume that php-mcrypt is not installed…

but when I should install it:

[root@srv2 ~]# yum install php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.nsc.liu.se
  • extras: mirror.nsc.liu.se
  • updates: mirror.nsc.liu.se
    Setting up Install Process
    No package php-mcrypt available.
    Error: Nothing to do

any idea ? how can it be possible that this package is not available for download ?

Thank You
Amel

Howdy,

It looks like a PHP config file on your system is trying to load mcrypt.so, but that module doesn’t exist on your system.

You may want to try finding where that’s being loaded in your PHP config, and commenting that out.

-Eric

yes, Youre right the module does not exist on the system, thats what I told, but why I cannot find it in the repository ? there is nothing to “comment out” because the php.ini only contains following modules:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example
;
; extension=msql.so
;
; … or with a path:
;
; extension=/path/to/extension/msql.so
;
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.

so php-mcrypt was not installed during Virtualmin installation… and my question was how can I install it now when I was not able to find it via yum in the centos repo ?

Amel

My guess is that there is a system-wide PHP config on your system that’s trying to load that module. If not in $HOME/etc/php.ini, than maybe somewhere in /etc.

Which distribution are you using?

The PHP packages you’re using come from your distribution vendor, and not Virtualmin. Unfortunately, CentOS 6 and Scientific Linux 6 don’t include a PHP mcrypt module in their repository.

-Eric

I am using CentOS 6.1 64 Bit, and clean installed Virtualmin (purchased license)

It seems that Youre right about CentOS 6, they do not include php-mcrypt in their repo, which I cannot understand but its their choice…

The php.ini is located in the /etc and the system is looking for the file named
mcrypt.so which should be located within other modules in /usr/lib64/php/modules/ but it`s not a case
because php-mcrypt is not installed at all and I cannot install it from centOS 6 repo because it does not exist

Any suggestion about other repos such as Fedora ? I am asking this because I will not damage the Virtualmin configuration with other “vendors” repos, but regarding this module, I can add another repo if you have some to recommend and than just install the php-mcrypt from that repo, than remove the repo…

is this good idea ?

Thank You
Amel

Well, you could always just comment out that attempt to load mcrypt unless you really need it.

However, if you require mcrypt – I have heard that some folks have downloaded PHP Mcrypt from the EPEL repository. I haven’t personally tried this, but EPEL tends to work fairly well with Virtualmin.

-Eric

well I have also tried to comment out that line, but I could not find it in the /etc/php.ini
that`s wired… and this is the only php.ini on the server…

is there other config files that are configured to load the php-mcrypt module ??

Amel

Well, first off – no config file should ever be automatically configured to load the PHP mcrypt module, that configuration would have been added. Especially on a fresh CentOS 6 install, which doesn’t support mcrypt, I’m not sure how that might have gotten added.

However, as far as removing it – it’s likely either being loaded in $HOME/etc/php.ini, /etc/php.ini, or there’s a whole bunch of .ini files in /etc/php.d/, it may be in one of those.

-Eric

Not sure if this matters but i noticed when installing phpmyadmin it asks for mcrypt
CentOS 6.2

Howdy,

The PHP Mcrypt module enables certain extended features within phpMyAdmin, they aren’t necessary for it to function. However, CentOS 6 doesn’t include the PHP Mcrypt module as an available package.

-Eric