Author Topic: mcrypt  (Read 9527 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
mcrypt
« on: March 06, 2018, 10:17:34 PM »
Ok , so i tray to install mcrypt. neeed for some frameworks.

I do with centos 7

1. SSH to VPS as the root user.

Install the the latest "EPEL" repo:

Code: [Select]
yum install epel-release
Install "php-mcrypt":

yum install php-mcrypt Here's an output:

Code: [Select]
[root@ws1 ~]# yum install php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.overthewire.com.au
 * epel: mirror.overthewire.com.au
 * extras: centos.mirror.uber.com.au
 * updates: mirror.overthewire.com.au
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.4.16-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================
 Package      Arch      Version        Repository  Size
=========================================================
Installing:
 php-mcrypt   x86_64    5.4.16-3.el7   epel        20 k

Transaction Summary
=========================================================
Install  1 Package

Total download size: 20 k
Installed size: 48 k
Is this ok [y/d/N]: y
Downloading packages:
php-mcrypt-5.4.16-3.el7.x86_64.rpm     |  20 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php-mcrypt-5.4.16-3.el7.x86_64         1/1
  Verifying  : php-mcrypt-5.4.16-3.el7.x86_64         1/1

Installed:
  php-mcrypt.x86_64 0:5.4.16-3.el7                                                                                                                                       

Complete!

Restart Apache to apply the changes:
Code: [Select]
systemctl restart httpd
added to php.ini file
Code: [Select]
extension=mcrypt.so
And wont work.
Any HELP PLS
« Last Edit: March 06, 2018, 10:19:25 PM by neoart »

Offline
*
Re: mcrypt
« Reply #1 on: March 06, 2018, 10:34:41 PM »
You need to goto:
PHP Version Switcher

Select PHP 7.1

and add the tick for mycrypt and rebuild PHP 7.1 it can take up to 15 min

Offline
*
Re: mcrypt
« Reply #2 on: March 08, 2018, 01:19:45 PM »
Configure Command:
Code: [Select]
./configure' '--with-config-file-path=/usr/local/php' '--with-config-file-scan-dir=/usr/local/php/php.d' '--with-zlib=/usr' '--enable-fpm' '--enable-mbstring' '--enable-zip' '--enable-bcmath' '--enable-pcntl' '--enable-ftp' '--enable-exif' '--enable-calendar' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--with-tidy' '--with-curl' '--with-mcrypt' '--with-iconv' '--with-gmp' '--with-pspell' '--with-gd' '--with-jpeg-dir=/usr' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-zlib-dir=/usr' '--with-xpm-dir=/usr' '--with-openssl' '--with-pdo-mysql=/usr' '--with-gettext=/usr' '--with-bz2=/usr' '--with-mysqli' '--enable-soap' '--enable-phar' '--with-xsl' '--with-xmlrpc' '--with-kerberos' '--enable-posix' '--enable-sockets' '--with-pcre-regex' '--with-libdir=lib64' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-imap' '--with-imap-ssl' '--with-pgsql=/usr/lib64/pgsql'

So with --with-mcrypt

And i rebuild PHP Version 7.2.1
After 30+ min. when rebuild is done restart server.

On phpinfo i see just command for rebuild.

On my other VPS (php 5.6.24) Centos 6 with centos web panel server i install mcrypt like i describe on first post.
and in phpinfo i see
So there must be some errors



Offline
*
Re: mcrypt
« Reply #3 on: March 12, 2018, 10:46:28 PM »
I say again use 7.1.29

Not 7.2

Offline
*
Re: mcrypt
« Reply #4 on: May 21, 2018, 04:53:21 PM »
So I know this is a late reply, but... Something to check for mcrypt support in php that stumped me for a day....
Apparently, some of the default repositories for libmcrypt ship with a bad .ini

Look in the file /etc/php.d/mcrypt.ini
The bad package default looks like this:
Code: [Select]
; Enable mcrypt extension module
extension=module.so

It should look like this:
Code: [Select]
; Enable mcrypt extension module
extension=mcrypt.so

If this is the case for you, then you can be fairly certain that is why mcrypt doesn't seem to work no matter what php wizardry you try.
Of course, you now need to edit the file to correct it.

If such a simple mistake upstream wasn't bad enough, now you have to recompile all of your php versions to make it work properly.

I hadn't realized mcrypt was a problem until I tried to run a script that required it. I knew I had added it in all of my php compiles, but the application error logs kept telling me I didn't have it.

Hopefully this helped someone out there.
« Last Edit: May 21, 2018, 05:00:02 PM by cubehost »