title: How to install mcrypt extension on mac os x 10.10 yosemite
body: <p>After updated my Mac OS X to Yosemite 10.10 (14A389),I need to install the Mcrypt extension again.
  I have to operate in accordance with <a href="http://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-10-yosemite-development-server/" rel="nofollow">Install mcrypt for php on Mac OSX 10.10 Yosemite for a Development Server</a>. </p>
  
  <p>When I entered <code>/usr/bin/phpize</code> in Terminal,it showed like this</p>
  
  <blockquote>
    <p>outous-MacBook-Pro:etc wangtao$ cd ~/mcrypt/php-5.5.14<br />
    outous-MacBook-Pro:php-5.5.14 wangtao$ cd ext/mcrypt<br />
    outous-MacBook-Pro:mcrypt wangtao$ /usr/bin/phpize<br />
    Configuring for:<br />
    PHP Api Version:         20100412<br />
    Zend Module Api No:      20100525<br />
    Zend Extension Api No:   220100525<br /></p>
  </blockquote>
  
  <p>Finally it generated <code>mcrypt.so</code>  in  <code>/usr/lib/php/extensions/no-debug-non-zts-20121212/</code> </p>
  
  <p>,and I added the line as <code>extension = "/usr/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so"</code> into <code>/etc/php.ini</code>.</p>
  
  <p>After restarted Apache,it still not work.</p>
  
  <p>When I entered <code>php ~/www/yiisoft/basic/web/info.php</code> in Terminal,it showed like this</p>
  
  <blockquote>
    <p>outous-MacBook-Pro:mcrypt wangtao$ php ~/www/yiisoft/basic/web/info.php<br />
    PHP Warning:  PHP Startup: mcrypt: Unable to initialize module<br />
    Module compiled with module API=20100525<br />
    PHP    compiled with module API=20121212<br />
    These options need to match<br />
     in Unknown on line 0<br />
    PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. You are <em>required</em> to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /Users/wangtao/www/yiisoft/basic/web/info.php on line 2<br />
    phpinfo()<br />
    PHP Version => 5.5.14<br />
    System => Darwin outous-MacBook-Pro.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
    Build Date => Sep  9 2014 19:04:27
    Configure Command =>  '/BinaryCache/apache_mod_php/apache_mod_php-93~55/Objects/php/configure'  '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--sysconfdir=/private/etc' '--with-apxs2=/usr/sbin/apxs' '--enable-cli' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/Library/Server/Web/Config/php' '--with-libxml-dir=/usr' '--with-openssl=/usr' '--with-kerberos=/usr' '--with-zlib=/usr' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--disable-cgi' '--with-curl=/usr' '--enable-dba' '--with-ndbm=/usr' '--enable-exif' '--enable-fpm' '--enable-ftp' '--with-png-dir=no' '--with-gd' '--with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-93~55/Root/usr/local' '--enable-gd-native-ttf' '--with-icu-dir=/usr' '--with-ldap=/usr' '--with-ldap-sasl=/usr' '--with-libedit=/usr' '--enable-mbstring' '--enable-mbregex' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--without-pear' '--with-pear=no' '--with-pdo-mysql=mysqlnd' '--with-mysql-sock=/var/mysql/mysql.sock' '--with-readline=/usr' '--enable-shmop' '--with-snmp=/usr' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-tidy' '--enable-wddx' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-xsl=/usr' '--enable-zend-multibyte' '--enable-zip' '--with-pcre-regex=/usr'<br />
    Server API => Command Line Interface<br />
    Virtual Directory Support => disabled<br />
    Configuration File (php.ini) Path => /etc<br />
    Loaded Configuration File => /etc/php.ini<br />
    Scan this dir for additional .ini files => /Library/Server/Web/Config/php<br />
    Additional .ini files parsed => (none)<br />
    PHP API => 20121113<br />
    PHP Extension => 20121212<br />
    Zend Extension => 220121212<br />
    Zend Extension Build => API220121212,NTS<br />
    PHP Extension Build => API20121212,NTS<br />
    Debug Build => no<br /></p>
  </blockquote>
  
  <p>Whether the version number of the relevant php api, how do I make my upgrade php api version number is 20121113,thanks!</p>