Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error: “Mcrypt must be loaded”; google doesnt help..(?)
 
studio3holland
Jr. Member
 
Total Posts:  8
Joined:  2012-09-30
 

Hello,
During the installation I get this error code: PHP extension “mcrypt” must be loaded.

I tried google ofcourse, but found no right answer. A lot other forums about this, were about Linux or using Xampp, I have Windows 7. And a lot referred to php.ini . After a couple of hours I discovered that that php.ini.sample file the php.ini file is. Just delete the .sample. So I did. But still no result.

Also, some forums were talking about certain code in php.ini which my php.ini does not have. The code in my php.ini file is this:
; This file is for CGI/FastCGI installations.
; Try copying it to php5.ini, if it doesn’t work
; adjust memory limit memory_limit = 64M max_execution_time = 18000
; disable magic quotes for php request vars magic_quotes_gpc = off
; disable automatic session start
; before autoload was initialized flag session.auto_start = off
; enable resulting html compression zlib.output_compression = on
; disable user agent verification to not break multiple image upload suhosin.session.cryptua = off
; turn off compatibility with PHP4 when dealing with objects zend.ze1_compatibility_mode = off
; PHP for some reason ignores this setting in system php.ini
; and disables mcrypt if this line is missing in local php.ini
extension=mcrypt.so

Please tell me what to do, cause I do not know anymore. All help is appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rich Cleverley
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
 

Have a look at http://www.myoddweb.com/2010/11/18/install-mcrypt-for-php-on-windows/

Yuu need the Windows dll installed not the .so file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
studio3holland
Jr. Member
 
Total Posts:  8
Joined:  2012-09-30
 

Thank you for your reaction

I have looked at the link you gave me. I already have a php_mcrypt.dll file in php/ext, so the installation is not neccesary. Now I want to copy the file to the server, but I don\’t know where to put it. The files that are there are:
- app
- downloader
- errors
- includes
- js
- lib
- media
- pkginfo
- shell
- skin
- var

So no php file. Where do I have to put it in?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rich Cleverley
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
 

You are referencing mcrypt.so in your php.ini though. You need to reference the dll instead.  Also make sure the extension folder is correct in your php.ini.  I think all the info is in the post I linked to

 
Magento Community Magento Community
Magento Community
Magento Community
 
studio3holland
Jr. Member
 
Total Posts:  8
Joined:  2012-09-30
 

I do not understand some things in that article. It comes through to me that point 3, 4 and 5 are adjustments on the localserver, in your C map. This is one thing I don’t understand. And second, if my conception is not right and those files have to be put on the server, I still do not understand were on the server..

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rich Cleverley
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
 

Yes that’s right, they need to be in your PHP’s extension folder.  The bit you want to lok at is:

Where are my php extensions?

Normally they are located in your program files directory, something like “C:\Program Files\PHP\“, if you are using a non english version of Windows then the name might be different.

If it is not there then create a phpinfo.php test file and look for the path in the various variables, (look for the variables extension_dir as well as PHPRC).

I haven’t used PHP on Windows for ages I have to admit but hopefully that’ll help.  The bit that mentions using phpinfo to find the path is probably going to be useful.  This file should contain two lines

<?php
phpinfo
();
 
Magento Community Magento Community
Magento Community
Magento Community
 
studio3holland
Jr. Member
 
Total Posts:  8
Joined:  2012-09-30
 

But where do I then put that phpinfo file? Currently I have it on the sever. And which line do you need exactly?

In the first block I see this:

Configuration File (php.ini) Path /etc
Loaded Configuration File /etc/php.ini

But I can’t find that /etc file

And to be quit honest, I also can’t find the php file in my files. (only one in this path: C/wamp/bin/php/php5.3.0/ dev, ext and PEAR)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rich Cleverley
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
 

Just put it in your document root then in your browser call up http://your-host-name/phpinfo.php

This will output the phpinfo page and you can check from there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
studio3holland
Jr. Member
 
Total Posts:  8
Joined:  2012-09-30
 

Oke, I have to file already there. Can you please tell me which data I need?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rich Cleverley
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
 

When you bring up the phpinfo.php url in your browser what path does it have for the php.ini?

 
Magento Community Magento Community
Magento Community
Magento Community
 
studio3holland
Jr. Member
 
Total Posts:  8
Joined:  2012-09-30
 

Path: Configuration File (php.ini) Path /etc

But when I go to that file (in the server) I see:
/modules
config.xml
local.xml.additional
local.xml.template

So no php.ini file

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rich Cleverley
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
 

the etc folder you are looking in is the main magento one (app/etc). You need to look at the etc folder in XAMPP’s configuration (this will be somewhere below your httpdocs folder (It should be in c:\xampp\php\php.ini but there may well be a etc folder in c:\xampp\php or somewhere similar)

 
Magento Community Magento Community
Magento Community
Magento Community
 
studio3holland
Jr. Member
 
Total Posts:  8
Joined:  2012-09-30
 

I don’t have xampp, should I install it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
studio3holland
Jr. Member
 
Total Posts:  8
Joined:  2012-09-30
 

I found a site which explains how to install magento without mcrypt. What does mcrypt exactly do? If it isn’t a big thing in the system then I will install it without it

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rich Cleverley
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
 

Sorry, I misread your initial post and thought you were using Xampp. What web server are you suing on Windows for this (Is it just a plain windows apache/php/mysql install?)

Mcrypt is a library that handles encryption so I think you would be best having it installed to be honest.  Is this install just meant to be an development install (i.e. this isn’t going to be a live website is it??).

If you want a nice simple way to get it running on your windows box then why not install the Zend server install on http://www.magentocommerce.com/download Either that or get a virtualbox appliance with Magento from http://www.turnkeylinux.org/magento

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top