Sunday, January 17, 2010

How to Install/Recompile MCRYPT in PHP (CentOS VPS)

I'm starting to develop sites with the Interspire Shopping Cart system, which I think is totally way better than Prestashop. I suggest people who want a better system than Prestashop to checkout the Interspire Shopping Cart, its worth every penny.

So I'm setting it up for our company in a VPS hosting, and it requires the PHP installation to be compiled with MCRYPT package. Specifically, this is needed for the manual credit card processing module. And it seems that the Godaddy VPS support is NOT willing to support (ironic) so I had to deal with the challenge myself. I found this instructions from NotesBit.com on how to recompile PHP with MCRYPT support. Here are the steps I followed - it was actually easier than I thought:

1. Install libmcrypt (2.5.x or better) http://mcrypt.hellug.gr/lib/index.html
-download and uncompress: tar z -xvf xxx.tar.gz
-cd into libmcrypt dir and type: ./configure
-when configure is done type: make
-when make is done type: make install

2. Add the library dir to /etc/ld.so.conf
-edit /etc/ld.so.conf and add: /usr/local/lib
-save file and then type the command: ldconfig

3. Install mcrypt & mhash (enter these commands)

yum install mcrypt*
yum install mhash*

4. Enable support for php. requires php-mcrypt and php-mhash packages (enter these commands):
yum install php-mcrypt*
yum install php-mhash*

5. Restart Apache
/sbin/service httpd restart

The VPS we are using is from Godaddy. Latest Apache and PHP versions. Let me know if this works for you!

4 comments:

  1. Hi, thanks for your review. Would you like to explain why Interspire Shopping Cart is better than Prestashop which doesn't need mcrypt ?
    Thanks.

    ReplyDelete
  2. and that Interspire Shopping Cart isn't free / open source software. thanks.

    ReplyDelete
  3. I've used Prestashop in several sites already and one thing we were always having problems with is taking in phone orders. With ISC (Interspire Shopping Cart) that option is available at the backend. Also, you don't have to make your own payment modules like Prestashop. ISC has it built in - it has a lot of popular payment gateways already implemented in the system. The downside is - it is not free and will cost a few hundred bucks.

    ReplyDelete
  4. Yes, you are right but i don't absolutely agree. I think it's only partial right. But post is god i think.

    ReplyDelete