#author("2016-07-04T15:13:20+09:00","default:wikiwriter","wikiwriter")
#author("2016-07-04T15:13:53+09:00","default:wikiwriter","wikiwriter")
&tag(Homebrew/php54);
*目次 [#q5e2cbd4]
#contents
*関連ページ [#u94868bd]
*参考情報 [#l357fbc8]

*インストール [#keb812c6]
-以下の手順で実行する
#pre{{
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php54 --with-mysql --with-homebrew-apxs
}}


*httpd.confの設定 [#t1b40707]
-LoadModule行は勝手に追加される。
#pre{{
LoadModule php5_module        /usr/local/Cellar/php54/5.4.45_3/libexec/apache2/libphp5.so

<IfModule php5_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>
</IfModule>
}}
*php.iniの設定 [#bc1b034e]
-/usr/local/etc/php/5.4/php.iniを編集する。
-mbstringのところだけ設定する。
#pre{{
[mbstring]
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = none
mbstring.func_overload = 1
}}

*php-fpmの設定 [#z57c5eec]
-以下のインストラクションが表示される。
#pre{{
✩✩✩✩ FPM ✩✩✩✩

To launch php-fpm on startup:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/opt/php54/homebrew.mxcl.php54.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php54.plist

The control script is located at /usr/local/opt/php54/sbin/php54-fpm

OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:

  PATH="/usr/local/sbin:$PATH"

You may also need to edit the plist to use the correct "UserName".

Please note that the plist was called 'homebrew-php.josegonzalez.php54.plist' in old versions
of this formula.

To have launchd start homebrew/php/php54 now an
To have launchd start homebrew/php/php54 now and restart at login:
  brew services start homebrew/php/php54
}}

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS