#author("2017-04-03T15:11:32+09:00","default:wikiwriter","wikiwriter")
#author("2017-04-03T18:32:43+09:00","default:wikiwriter","wikiwriter")
&tag(Debian/PHP);
*目次 [#f8f2db0e]
#contents
*関連ページ [#s60db684]
*参考情報 [#scffa0f7]
-[[Debian 8 Jessie LAMP server tutorial with Apache 2, PHP 5 and MariaDB (instead of MySQL):https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-lamp-on-debian-jessie/]]
-[[mk-mode BLOG:http://komasaru.github.io/]]

*モジュール版をインストールしてApacheで使う [#c5f14083]

**インストール [#j386061d]
-以下のコマンドでインストール。apache2のモジュールは自動的に有効となる。 php-mbstringはDebianの場合個別パッケージではない?[[msg: No package matching 'php5-mbstring' is available · Issue #176 · phansible/phansible:https://github.com/phansible/phansible/issues/176]]
 apt-get  install php5 libapache2-mod-php5 php5-mysql php5-gd
-ドキュメントルートにinfo.phpを作成。
#pre{{
<?php
phpinfo();
?>
}}

**日本語設定 [#be05025a]
-apache2モジュール用のphp設定は/etc/php5/apache2/php.iniを編集する
-mbstring設定を変更。
#pre{{
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
}}

*高速CGI版を導入したnginxで使う [#xf95a4ae]

**インストール [#zaabfada]
-以下のコマンドでインストール
 apt-get install php5 php5-fpm php5-mysql php5-gd
-自動起動
 systemctl start php5-fpm
 systemctl enable php5-fpm


**日本語設定 [#be05025a]
-apache2モジュール用のphp.iniとは設定ファイルがことなる。/etc/php5/fpm/php.iniを編集する。
-mbstring設定を変更。
#pre{{
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
}}

**その他の設定 [#l843c9f5]
-[[Nginx/設定]]を参照のこと。


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