|
[ CentOS/PHP ] 設定ファイル 編集 †設定値は各環境に合わせて設定する 基本設定ファイル( /etc/php.ini )編集 †[root@linux ~]# cp -a /etc/php.ini /etc/php.ini.org ←■ 設定ファイル バックアップ [root@linux ~]# [root@linux ~]# vi /etc/php.ini ※ バージョン情報の隠匿 ;expose_php = On ←■ コメントアウトする ↓■ 変更する expose_php = Off ※ 最大実行時間の変更 ;max_execution_time = 30 ←■ コメントアウトする ↓■ 変更する max_execution_time = 120 ※ 最大入力時間の変更 ;max_input_time = 60 ←■ コメントアウトする ↓■ 変更する max_input_time = 240 ※ エラー出力のレベル変更 ;error_reporting = E_ALL ←■ コメントアウトする ↓■ 変更する error_reporting = E_ERROR | E_WARNING | E_PARSE | E_NOTICE ※ 文字コードの設定 ;mbstring.language = Japanese ↓■ 変更する mbstring.language = Japanes ;mbstring.internal_encoding = EUC-JP ↓■ 内部エンコード固定の場合は、変更する mbstring.internal_encoding = UTF-8 ;mbstring.http_input = auto ↓■ 変更する mbstring.http_input = auto ;mbstring.detect_order = auto ↓■ 変更する mbstring.detect_order = auto :wq ←■ 保存して閉じる [root@linux ~]# [root@linux ~]# /etc/rc.d/init.d/httpd graceful ←■ Apache 再起動(緩やかな再起動) [root@linux ~]# PHP モジュール確認 †[root@linux ~]# php -m [PHP Modules] bz2 calendar ~ 中略 ~ xml zlib [Zend Modules] [root@linux ~]# |