Monday, September 23, 2013

Magento pre-checks – how to install curl, gd, mcrypt, and pdo using cpanel whm

I searched for hours and hours after I attempted to install Magento on a godaddy vps only to get this:
Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:
  • You are missing the curl extension
  • You are missing the gd extension
  • You are missing the mcrypt extension
  • You are missing the pdo_mysql extension
  • You are missing the pdo extension
The following requirements were successfully met:
  • You have PHP 5.2.0 (or greater)
  • Safe Mode is off
  • You have MySQL 4.1.20 (or greater)
  • You have the dom extension
  • You have the hash extension
  • You have the iconv extension
  • You have the pcre extension
  • You have the simplexml extension
After hours of searching I found “pecl install pdo” which worked great to address the pdo and pdo_mysql extension issues.  But sadly, “pecl install curl” did nothing (btw, its not supposed to – but I was hopeful).  I found a lot of information about updating the php.ini – most of which talked about removing the ; from the lines required to enable curl, gd, and mcrypt.  Which I did – then restarted apache, then restarted my server, then rebooted my laptop… ok, the laptop was because I loaded patches to it completely unrelated to my server problem, but why not throw that in there?
I found several posts saying “just run /scripts/easyapache”.  Most of these posts assume a certain level of knowledge that I obviously didn’t have.  Once I found that I can actually just type “/scripts/easyapache” at an SSH command line (I know I may have just ‘assumed’ a level of knowledge you may not have but keep reading, it gets easy!)  I ran easyapache and was presented with a text based menu that made no sense to me.  I felt like I was on the right track, but still not there.  The forum where I found the easyapache hint (http://forums.theplanet.com/index.php?showtopic=26527) had several comments with questions about what it does and how to use it – but one comment caught my eye by Erwin:
In CPanel 7, you can now do this in WHM by going to the Software section and choosing: Update Apache
Then choose mcrypt or any other module you want to recompile PHP with.
And it will do so automatically. icon_smile.gif Similar to easyapache, but easier to use. icon_smile.gif I upgraded to PHP 4.3.2 just like that with the modules I want.
So I tried that – realizing the post was pretty old and my screens might be very different.  They were, but I was able to work it out. I went to
  • “Main >> Software >> EasyApache (Apache Update)”.
  • Then I selected the PHP Encryption / E-commerce option.
  • Then “start customizing based on profile”.
  • From there I selected Apache 2.2 (I was currently running 2.0),
  • clicked Next and selected php5, selected build 5.3.2,
  • scroll to the bottom of the page and click “
  • Now we are COOKING! – you can now select curl, gd, mcrypt, pdo, and a whole host of other options.
After selecting those options, I clicked ““.  Now it goes and goes while building apache with all of the options you selected – NO COMPILING, MAKE, MAKE INSTALL, ETC!  It does all of that for you!
I go back to my magento-check.php page and I’m in magento precheck heaven:
Congratulations! Your server meets the requirements for Magento.
  • You have PHP 5.2.0 (or greater)
  • Safe Mode is off
  • You have MySQL 4.1.20 (or greater)
  • You have the curl extension
  • You have the dom extension
  • You have the gd extension
  • You have the hash extension
  • You have the iconv extension
  • You have the mcrypt extension
  • You have the pcre extension
  • You have the pdo extension
  • You have the pdo_mysql extension
  • You have the simplexml extension