MacOSX에서 php-Mcrypt 사용

이 문서 정보


EC 웹사이트magento를 설치할 때 php extension mcrypt must be loaded 오류가 발생했기 때문입니다.
암호화 라이브러리를 사용하는 소프트웨어 패키지, 프레임워크,magento,laavel 등은 php54-mcrype가 필요합니다.
php54-mcrype라고 적힌 extension이 MacOS에 설정된 방법입니다.

컨디션


MacOSX
PHP 5.4.30 (cli) (built: Jul 29 2014 23:43:29)

php54-mcrypt 설치 및 설정


홈 brew 설치 오류

  • 다음 오류가 발생할 수 있습니다.
  • 
    brew install php54-mcrypt
    
    Error: No available formula for php54-mcrypt
    Searching taps...
    homebrew/php/php54-mcrypt
    

    홈brew tap을 통한 해결


    Homebrew에 "tap"이라는 명령이 있습니다.
    이 명령을 사용하면 공식 이외의formula가 공개한 창고를 홈 brew에 가져올 수 있으며 $brew 명령을 사용하여 처리할 수 있습니다.
    github 계정에 포멜라가 있다면 가입도 가능합니다.
    
    $ brew tap ユーザー名/リポジトリ名
    
    창고를 추가하는 방법은 두 가지가 있다.
  • 첫 번째 방법
  • PHP 5.4 development on OS X with MySQL and Laravel 4
    This command should return a list of formulas that can be installed, you’ll notice that they are all under a formula repository homebrew/php so we need to tap that repository so Homebrew knows can use it.
    You’ll see some familiar git cloning feedback as Homebrew clones the repository but once it has been done run the brew search php54 command again and you’ll see all the formulas without that repository prefix now. Before we install PHP though we need to tap another repository for some dependencies. I’m also going to install the Xdebug module for PHP at the same time as it’s a useful development aid.
    
    brew tap homebrew/php
    brew tap homebrew/dupes
    
  • 두 번째 방법
  • Error: No available formula for php54-mcrypt on Mac OS X Mavericks
    You will need to run brew tap homebrew/dupes and then brew tap josegonzalez/homebrew-php
    Then run brew install php54-mcrypt again.
    
    brew tap josegonzalez/homebrew-php
    
    상기 중 하나를 실행하면 다음과 같은 설치를 할 수 있다고 생각합니다.
    
    brew install php54-mcrypt
    
    
    ()
    
    To finish installing mcrypt for PHP 5.4:
      * /usr/local/etc/php/5.4/conf.d/ext-mcrypt.ini was created,
        do not forget to remove it upon extension removal.
      * Validate installation via one of the following methods:
      *
      * Using PHP from a webserver:
      * - Restart your webserver.
      * - Write a PHP page that calls "phpinfo();"
      * - Load it in a browser and look for the info on the mcrypt module.
      * - If you see it, you have been successful!
      *
      * Using PHP from the command line:
      * - Run "php -i" (command-line "phpinfo()")
      * - Look for the info on the mcrypt module.
      * - If you see it, you have been successful!
    ==> Summary
    ?  /usr/local/Cellar/php54-mcrypt/5.4.35: 3 files, 56K, built in 33 seconds
    

    php.ini 파일 추기


    상기 설치 완료 메시지에서 mcrypt입니다.에서는 ini 파일 위치를 나타내는 정보를 표시합니다.
    
     * /usr/local/etc/php/5.4/conf.d/ext-mcrypt.ini was created,
    
    php로 하여금 이것을 읽게 하세요.
    나의 상황은 php다.ini에 추가되어 appache를 다시 시작합니다.
    php.ini
    
    [mcrypt]
    extension="/usr/local/Cellar/php54-mcrypt/5.4.35/mcrypt.so"
    
    

    사이트 축소판 그림

  • magento - php extension mcrypt must be loaded - Stack Overflow
  • The mcrypt extension is missing | OS X Mavericks Install mcrypt in 10.9
  • Installing mcrypt extension for PHP on OSX Mountain Lion - Stack Overflow
  • Error: No available formula for php54-mcrypt on Mac OS X Mavericks
  • PHP 5.4 development on OS X with MySQL and Laravel 4

  • 동양경제 온라인에는'엔지니어 부부의 모 일기'가 연재 중이다
    엔지니어 부부의 일기

    좋은 웹페이지 즐겨찾기