PHPのインストール
Friday, March 3, 2006 7:31:09 AM
PHPDRページ
PHPのWebサイトからWindous用アーカイブPHP 4.4.0 zip packageをダウンロード
Apacheモジュールとして動作するようにする
zipパッケージを解凍し[C:/php]というディレクトリーに展開する。その中のphp4ts.dllを[C:windows]にコピー
[C:/Apache/conf/httpd.conf]の変更
「AddModule」から始まる行の下に以下の2行を追加
LoadModule php_4module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
directoryIndex index.htmlをdirectoryIndex index.html index.php
httpd.confを書き換えたらApacheを再起動
PHPの設定の調整
C:/phpにあるphp.ini-distをC:Windowsにコピー。「php.ini」にリネームし以下のように設定変更をする
[エラー表示の設定]
error_reporting = E_ALL & E_NOTICE
:
Log_errors = Off
:
;error_log = filename
下のように変更
error_reporting = E_ALL
:
Log_errors = On
:
error_log = c:/php/error.log
[エクステンションと日本語処理の設定]
;extension_dir = "./"
以下のように変更
extension_dir = c:/php/extensions
;extension=php_mbstring.dll
コンロをはずし変更
extension=php_mbstring.dll
;mbstring.language = Japanese
:
;mbstring.internal_encoding = EUC-JP
:
;mbstring.http_input = auto
:
;mbstring.http_output = SJIS
:
;mbstring.encoding_translation = Off
コンロをはずし以下のように変更
mbstring.language = Japanese
:
mbstring.internal_encoding = EUC-JP
:
mbstring.http_input = pass
:
mbstring.http_output = pass
:
mbstring.encoding_translation = Off
[magic_quotesの設定]
magic_quotes_gpc = On
以下のように変更
magic_quotes_gpc = Off
PHPの動作確認
php.iniを書き替えたらApacheを再起動
C:Apache/htdocs内のテキスト類をすべて削除
以下の内容のテキストを作成しC:Apache/htdocsに保存
参考書籍:自分でつくるblogツール
あくまで自分向けの覚え書きなのでなぜそうするかの説明は無しにします。
PHPのWebサイトからWindous用アーカイブPHP 4.4.0 zip packageをダウンロード
Apacheモジュールとして動作するようにする
zipパッケージを解凍し[C:/php]というディレクトリーに展開する。その中のphp4ts.dllを[C:windows]にコピー
[C:/Apache/conf/httpd.conf]の変更
「AddModule」から始まる行の下に以下の2行を追加
LoadModule php_4module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
directoryIndex index.htmlをdirectoryIndex index.html index.php
httpd.confを書き換えたらApacheを再起動
PHPの設定の調整
C:/phpにあるphp.ini-distをC:Windowsにコピー。「php.ini」にリネームし以下のように設定変更をする
[エラー表示の設定]
error_reporting = E_ALL & E_NOTICE
:
Log_errors = Off
:
;error_log = filename
下のように変更
error_reporting = E_ALL
:
Log_errors = On
:
error_log = c:/php/error.log
[エクステンションと日本語処理の設定]
;extension_dir = "./"
以下のように変更
extension_dir = c:/php/extensions
;extension=php_mbstring.dll
コンロをはずし変更
extension=php_mbstring.dll
;mbstring.language = Japanese
:
;mbstring.internal_encoding = EUC-JP
:
;mbstring.http_input = auto
:
;mbstring.http_output = SJIS
:
;mbstring.encoding_translation = Off
コンロをはずし以下のように変更
mbstring.language = Japanese
:
mbstring.internal_encoding = EUC-JP
:
mbstring.http_input = pass
:
mbstring.http_output = pass
:
mbstring.encoding_translation = Off
[magic_quotesの設定]
magic_quotes_gpc = On
以下のように変更
magic_quotes_gpc = Off
PHPの動作確認
php.iniを書き替えたらApacheを再起動
C:Apache/htdocs内のテキスト類をすべて削除
以下の内容のテキストを作成しC:Apache/htdocsに保存
<?php phpinfo(); ?>
http://localhost/にアクセス。設定一覧が表示される
参考書籍:自分でつくるblogツール
あくまで自分向けの覚え書きなのでなぜそうするかの説明は無しにします。




