Home » Magento6 July 2009

PHP extension error while installing Magento

I was installing Magento in my Windows XP computer. I am using Xampp. I encountered the following errors during the installation.

PHP Extension “curl” must be loaded
PHP Extension “mcrypt” must be loaded
PHP Extension “pdo_mysql” must be loaded

I googled and the answer was to load the extension in php.ini file. In xampp, there are two places where php.ini file is found. It is present inside php folder and inside apache/bin folder. You can load extensions mentioned in the above error by changing the php.ini file. Search for curl, mcrypt and pdo_mysql then just uncomment i.e. remove the semi-colon (;) present before the line of the extension. After that, you have to restart (stop and start) apache from your xampp control panel.


;extension=php_curl.dll to extension=php_curl.dll
;extension=php_mcrypt.dll to extension=php_mcrypt.dll
;extension=php_pdo_mysql.dll to extension=php_pdo_mysql.dll

It’s as simple as that but that didn’t work for me. Why? Because I also had apache and php installed separately in my computer. I had installed PHP and Apache server separately before installing the Xampp. So, xampp had used the php.ini configuration file of the Apache server installed before. And that php.ini file was inside programs file/apache group/apache/bin/php.ini. In this situation, changing php.ini file inside xampp folder will not solve my problem. I found my mistake by looking at phpinfo() of xampp.

Anyways, editing the right php.ini file will solve the above error. If anyone has faced the problem like mine then please see “Configuration File (php.ini) Path” in phpinfo(). There you will find the path of php.ini file. You have to edit that file.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Learn_PHP

    As per information provided by you. I am doing changes in php.ini file but I don’t find
    in my file.

    Please tell me what to do?

  • Fil

    I have the same problem while trying to install MAGENTO on a server hosting. Can I apply the same solution?

  • @Fil : Yes, you can.

  • I wish I would have found this article earlier! I ended up deploying Magento to my local machine. To do so I followed the steps found here… http://www.jvfconsulting.com/blog/117/How_To_Install_Magento_Locally_On_Windows_XP.html

  • Mike

    I have the same problem – my php.ini file does not have ;extension=php_mcrypt.dll, anyone have any ideas?

  • pradeep

    Hi, I am trying that but no result……