亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

Install mcrypt for php on Mac OSX 10.10 Yose

系統 2119 0

mcrypt?is a file encryption method using secure techniques to exchange data. It is required for some web apps for example? Magento , the shopping cart software or a php framework likeLaravel. This tutorial has been tested in OSX 10.10?Yosemite.

This guide is really for users with the version of PHP that shipped with OSX Yosemite which is version 5.5.14. Other downloadable?AMP stacks already have?mcrypt?baked in.

?

Command Line Tools

First up you will need the OSX 10.10 version of?Command Line Tools?which you can download via the Apple available updates in the App store.

Run in the Terminal

    xcode-select --install
  

?

Getting it on in OS X?Yosemite 10.10

This tutorial works mostly in the?Terminal, launch it from /Applications/Utilities, change directory (cd) to the home account and make a directory that you will work in, call it?mcrypt

    cd ~ ; mkdir mcrypt ; cd mcrypt
  

Get?libmcrypt 2.5.8?from Sourceforge,? ?this is direct download link.

Get the?php?code in a?tar.gz or .bz2?format- ?(version?5.5.14 is the one that currently ships with OSX 10.10)

Move both of these files that you downloaded into your working directory –?mcrypt?in this instance, and go back to Terminal

    cd ~/mcrypt
  

Expand both files via the command line or just double click them in the Finder:

    tar -zxvf libmcrypt-2.5.8.tar.gz
  
    tar -zxvf?php-5.5.9.tar.gz
  

Remove the compressed archives

    rm *.gz
  

Any errors on the command line including C++ and g++ mostly are due to the command line tools missing.

?

Configuring libmcrypt

Change directory into libmcrypt
?
      cd?libmcrypt-2.5.8
    
?
Libmcrypt needs to be configured, enter
    ./configure
  
    make
  
    sudo make install
  

With the libmcrypt configured and libraries now installed, time for to make the mcrypt extension.

?

?

Install Autoconf

Install? autoconf ?– some more Terminal heavy lifting:

    cd ~/mcrypt
  
    curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
  
    tar xvfz autoconf-latest.tar.gz
  
    cd autoconf-2.69/
  
    ./configure
  
    make
  
    sudo make install
  

?

Compile mcrypt php Extension

    cd ../php-5.5.9/ext/mcrypt/
  
    /usr/bin/phpize
  

Output should be similar to:

Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212

    ./configure
  
    make
  
    sudo make install
  

The result of this should be similar to:

Installing shared extensions: ?/usr/lib/php/extensions/no-debug-non-zts-20121212/

?

?

Enabling mcrypt.so ?php Extension

Open?/etc/php.ini?and add the line below at the end

    extension=mcrypt.so
  

If there is no?php.ini?file, ?then you need to make one from php.ini.default?in the same location like so:

    sudo cp /etc/php.ini.default /etc/php.ini
  

And allow write capability

    sudo chmod u+w ?/etc/php.ini
  

Then add the line as above in your favourite text editor:

    sudo nano /etc/php.ini
  

or

    sudo vi /etc/php.ini
  

and add in the line:

    extension=mcrypt.so
  

?

Restart Apache

    sudo apachectl restart
  

That’s it, create a php page with the function?phpinfo();??to see if it loaded correctly.

osx-yosemite-mcrypt

?

If it didn’t load you may need to declare the extensions directory in /etc/php.ini

    extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20100525/"
  

php-extension-directory-lion-mcrypt

?

Hopefully it wasn’t too much of a nightmare…

?

tales-from-the-mcrypt-yosemite-osx-php

tales-from-the-mcrypt-yosemite-osx-php

?

?

轉自:http://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-10-yosemite-development-server/

?

?

Install mcrypt for php on Mac OSX 10.10 Yosemite for a Development Server


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 香蕉视频国产在线观看 | 亚洲依人 | 久久午夜一区二区 | 在线观看年轻的母亲 | 国产精品免费_区二区三区观看 | 午夜噜噜噜私人影院在线播放 | 97久久久久| 久久黄色免费视频 | 亚洲精品中文字幕一区 | 99精品国产第一福利网站 | 国产色产综合色产在线观看视频 | 中文字幕在线永久 | 老司机亚洲精品影院在线 | 色综合久久综合 | 欧美一级永久免费毛片在线 | 国产精品青草久久福利不卡 | 精品欧美一区二区在线看片 | 国产亚洲玖玖玖在线观看 | 久久久久久国产精品视频 | 免费播放一区二区三区 | 成年视频xxxxxx在线 | 日本又黄又爽又色的视频免费 | 免费观看黄色网 | 亚洲精品美女久久777777 | 欧美观看一级毛片 | 无遮挡一级毛片呦女视频 | 国产女人体一区二区三区 | 亚洲欧美日韩国产综合专区 | 美国免费三片在线观看 | 一a一片一级一片啪啪 | 九九色综合网 | 天天草天天 | 国产精品天天操 | 国产欧美亚洲精品第3页在线 | 91日韩视频| 久草不卡视频 | 欧美一级成人 | 国产一级特黄一级毛片 | 亚洲毛片一级带毛片基地 | a级做人爱免费播放 | 日韩经典欧美一区二区三区 |