dinapino
By:
dinapino

How to enable mcrypt for php7?

March 10, 2016 32.7k views
WordPress LAMP Stack Apache PHP Ubuntu

While while to setup ISPconfig3 the command bellow does not work for php7
sudo php5enmod mcrypt
But i've upgraded to php7 so...
How can it be adjusted for php7?
______________________________________--
How do i add php7 in this line?
After i tried adding php7.0 there my website stopped working.

We are going to replace the top block with a single command. It should look like this when you are finished:

<IfModule mod_suphp.c>
AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-suphp

2 Answers

Hey there,

We have the following article in regards to upgrading your Droplet to PHP7. If you search the following page for "mcrypt" you should find out quite a bit of information:

https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04

Regards,
Mike C
Platform Support Specialist
DigitalOcean Support
Check out our fantastic community articles!
https://www.digitalocean.com/community

PHP 7.0 was released on December 3, 2015. It promises substantial speed improvements over previous versions of the language, along with new features like scalar type hinting. This guide explains how to quickly upgrade a PHP 5.x installation on an Ubuntu 14.04 system with Apache or Nginx, using community-provided packages.

For Mac:

brew install php70-mcrypt

And restart your server. Example: sudo apachectl restart

Then you can verify by creating a file phpinfo() and looking for mcrypt module when viewing the file.
Or,
php -i "(command-line 'phpinfo()')" in the command line and look for mcrypt.

If you find mcrypt module, then it is installed successfully.

Have another answer? Share your knowledge.