#author("2016-07-04T14:51:07+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 php53
brew install php53 --with-mysql --with-homebrew-apxs
brew install php54 --with-mysql --with-homebrew-apxs
}}


*httpd.confの設定 [#t1b40707]
-LoadModule行は勝手に追加される。
#pre{{
LoadModule php5_module    /usr/local/Cellar/php53/5.3.29_4/libexec/apache2/libphp5.so
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
}}
*トラブルシューティング [#ee3a4d94]
**freetype.hがみつからずインストールできない [#de9d42a8]
-"--with-homebrew-apxs"をつけると発生(2016/03/31(木))
-brew install --debug php53でデバッグしてみるとconfigureで/usr/local/include/freetype2/freetype.hを探しているのが原因だった
-/usr/local/include/freetype2/freetype/freetype.hは存在するので単純にシンボリックリンクすれば解決?

*php-fpmの設定 [#z57c5eec]
-以下のインストラクションが表示される。
#pre{{
cd /usr/local/include/freetyp2
ln -s freetype/freetype.h
✩✩✩✩ 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 and restart at login:
  brew services start homebrew/php/php54
}}
-とりあえずコンパイルできて動作していることを確認。



トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS