-4

I'm trying to install OpenCart but get the following warning: "Warning: mCrypt extension needs to be loaded for OpenCart to work!"

Since I'm a noob on this, could someone point me in the right direction on how to solve this? Google don't really help me out here :(

Thanks!

GetGalax
  • 149
  • 3
  • 5
  • 20

5 Answers5

1

So you said you have FTP access and you can edit php.ini.

If the server has mcrypt installed but not enabled then if you add:

extension=mcrypt.so

then save php.ini and upload, this should work. Note that some servers don't load user's php.ini, instead they are looking for a .user.ini file in root folder.

I would suggest you, if my above answer doesn't help you to contact your hosting provider.

Konstantinos
  • 418
  • 3
  • 10
1

I solved this issue by put in COMMENT the error message validation for mCrypt inside the file

/install/controller/install/step_2.php change inside private function validate()  
//if (!function_exists('mcrypt_encrypt')) {
//  $this->error['warning'] = $this->language->get('error_mcrypt');
//}

and voila

and after install this extension Then, you may want to try this extension:

(https://www.opencart.com/index.php?rout ... n_id=35487)

Gervais
  • 26
  • 1
0

If you're using a linux system and you have access to the console, you can just activate the mcrypt module in the php.ini.

  1. Type into your console:

    $ sudo php5enmod mcrypt
    

    This will enable the module. If you are using PHP 7 instead of PHP 5 use phpenmod instead.

  2. If you get an error, install the module first with

    $ sudo apt-get install php5-mcrypt
    

    or for PHP 7 with

    $ sudo apt-get install php7.0-mcrypt
    
  3. After this you have to restart your webserver. Use this command for apache2

    $ sudo service apache2 restart
    

    or this command for nginx

    $ sudo service nginx restart
    

If you dont have access to your terminal by any reason, it could be possible to enable it trough the control panel (cPanel, Plesk, ...). In the most cases it's a one-click activation and not really complicated.

Dan
  • 5,140
  • 2
  • 15
  • 30
  • Thanks for your reply! I have access to the php.ini file on the FTP is this where I should write this? So sorry but I don't know what a console really is? But I do have access to a controlpanel from my web-hotel provider. – GetGalax Aug 01 '17 at 19:34
0

In case you are using apache2 on ubuntu :

First try to enable mcrypt using command:

sudo phpenmod mcrypt

If mcrypt is not installed, install it using below commands for PHP

PHP 5.6 :

sudo apt-get install php5.6-mcrypt

PHP 7.0:

sudo apt-get install php5.6-mcrypt

Enable mcrypt after insatallation and restart apache

sudo phpenmod mcrypt
sudo service apache2 restart
BSB
  • 2,270
  • 17
  • 26
0

The only solution that always works with me it to use PHP 5 & mySQL 5 (5.x anything) And in the hosting, assign the php version 5 (outdated) to the website, also make sure that the database is mySQL (5.x)

Thanks

Adel Mourad
  • 1,351
  • 16
  • 13