Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
$ which mcrypt
/opt/local/bin/mcrypt
$ mcrypt -v
Mcrypt v.0.9.9 (i386-apple-darwin10.4.0)
Linked against libmcrypt v.2.5.8
Copyright (C) 1998-2002 Nikos Mavroyanopoulos (nmav@gnutls.org)

So I have mcrypt. How do I get PHP to use it? Other than adding

extension=mcrypt.so

to php.ini, I also see this in php.ini

[mcrypt]
; For more information about mcrypt settings see http://php.net/mcrypt-module-open

; Directory where to load mcrypt algorithms
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.algorithms_dir=

; Directory where to load mcrypt modes
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.modes_dir=

which is obviously unused.

How can I get mcrypt working for PHP?

This install is on Mac OS X 10.6, using MacPorts. I would prefer not to have to recompile php if possible.

share|improve this question
    
Have you tried installing php5-mcrypt from MacPorts as well? (sudo port install php5-mcyrpt) –  Chealion Aug 26 '10 at 23:34
    
You have a little error in the command, I noticed it when I copy-pasted in my terminal: sudo port install php5-mcrypt –  tXK Feb 26 '12 at 12:11
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.