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 Install mcrypt for php on Mac OSX 10.10 Yosemite for a Development Server.
When I entered /usr/bin/phpize
in Terminal,it showed like this
outous-MacBook-Pro:etc wangtao$ cd ~/mcrypt/php-5.5.14
outous-MacBook-Pro:php-5.5.14 wangtao$ cd ext/mcrypt
outous-MacBook-Pro:mcrypt wangtao$ /usr/bin/phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Finally it generated mcrypt.so
in /usr/lib/php/extensions/no-debug-non-zts-20121212/
,and I added the line as extension = "/usr/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so"
into /etc/php.ini
.
After restarted Apache,it still not work.
When I entered php ~/www/yiisoft/basic/web/info.php
in Terminal,it showed like this
outous-MacBook-Pro:mcrypt wangtao$ php ~/www/yiisoft/basic/web/info.php
PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are required 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
phpinfo()
PHP Version => 5.5.14
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'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /Library/Server/Web/Config/php
Additional .ini files parsed => (none)
PHP API => 20121113
PHP Extension => 20121212
Zend Extension => 220121212
Zend Extension Build => API220121212,NTS
PHP Extension Build => API20121212,NTS
Debug Build => no
Whether the version number of the relevant php api, how do I make my upgrade php api version number is 20121113,thanks!