参考URL http://puchiko.lowtech.ne.jp/?itemid=250&catid=10
すでにインストール済みだったPHP5フォルダを削除。(コントロールパネル一覧にはない)改めてPHPを解凍、インストールした。
上記URLを参考に設定を変えていく。
参考URL http://puchiko.lowtech.ne.jp/?itemid=250&catid=10
1.Cドライブに"php"で保存。
2.コマンドプロンプトを起動して"C:\php\php -v"を実行してバージョン情報がでればインストール成功。 ・・・バージョン出た。
3.PHP5の設定
"c:\php"内にある"php.ini-recommended"を"php.ini"にリネームして秀丸で開いて編集。
3-1
・includ_pathの指定、PEARへのpath追加
505行目付近
;include_path = ".;c:\php\includes"
↓
include_path = ".;c:\php\includes;c:\php\pear"
3-2
・ドキュメントルートの指定
512行目付近
doc_root =
↓
doc_root = "c:/www"
3-3
・extensionディレクトリの指定
519行目付近
extension_dir = "./"
↓
extension_dir = "c:/php5/ext"
3-4
・mbstringを利用可能に
627行目付近
;extension=php_mbstring.dll
↓
extension=php_mbstring.dll
3-5
・default_charsetの設定
;default_charset = "iso-8859-1"
↓
default_charset = "UTF-8"
3-6
・エラーを表示するように変更
display_errors = Off
↓
display_errors = On
3-7
・mbstringの設定
1147行目付近から
(コメントアウト;をはずし必要であれば書き換える)
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.encoding_translation = Off
mbstring.http_input = pass
mbstring.http_output = pass
mbstring.detect_order = UTF-8,SJIS-win,eucJP-win
mbstring.substitute_character = none
noneの後の;は?いる?いらない?(デフォルトではあり)
4-1
Apache2の設定
スタートメニューのプログラムから"Edit the Apache httpd.conf Configuration File"を実行。
・ディレクトリを指定したら表示するファイルの指定
321行目付近
DirectoryIndex index.html index.html.var
↓
DirectoryIndex index.php index.html index.html.var
4-2
・モジュールの追加
173行目付近に追加
LoadModule php5_module "c:/php5/php5apache2.dll"
4-3
366行目付近に追加
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
PHPIniDir "c:/php" ← 一行追加
</IfModule>
Apache restart。
ページを開くと・・
Web サイトによってこのページの表示を拒否されました
HTTP 403
可能性のある原因:
この Web サイトを表示するにはログインが必要です。
見直しと、オリジナルファイルを戻し、2回やり直してみたが結果は同じ。
どこが悪いんだろう・・
すでにインストール済みだったPHP5フォルダを削除。(コントロールパネル一覧にはない)改めてPHPを解凍、インストールした。
上記URLを参考に設定を変えていく。
参考URL http://puchiko.lowtech.ne.jp/?itemid=250&catid=10
1.Cドライブに"php"で保存。
2.コマンドプロンプトを起動して"C:\php\php -v"を実行してバージョン情報がでればインストール成功。 ・・・バージョン出た。
3.PHP5の設定
"c:\php"内にある"php.ini-recommended"を"php.ini"にリネームして秀丸で開いて編集。
3-1
・includ_pathの指定、PEARへのpath追加
505行目付近
;include_path = ".;c:\php\includes"
↓
include_path = ".;c:\php\includes;c:\php\pear"
3-2
・ドキュメントルートの指定
512行目付近
doc_root =
↓
doc_root = "c:/www"
3-3
・extensionディレクトリの指定
519行目付近
extension_dir = "./"
↓
extension_dir = "c:/php5/ext"
3-4
・mbstringを利用可能に
627行目付近
;extension=php_mbstring.dll
↓
extension=php_mbstring.dll
3-5
・default_charsetの設定
;default_charset = "iso-8859-1"
↓
default_charset = "UTF-8"
3-6
・エラーを表示するように変更
display_errors = Off
↓
display_errors = On
3-7
・mbstringの設定
1147行目付近から
(コメントアウト;をはずし必要であれば書き換える)
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.encoding_translation = Off
mbstring.http_input = pass
mbstring.http_output = pass
mbstring.detect_order = UTF-8,SJIS-win,eucJP-win
mbstring.substitute_character = none
noneの後の;は?いる?いらない?(デフォルトではあり)
4-1
Apache2の設定
スタートメニューのプログラムから"Edit the Apache httpd.conf Configuration File"を実行。
・ディレクトリを指定したら表示するファイルの指定
321行目付近
DirectoryIndex index.html index.html.var
↓
DirectoryIndex index.php index.html index.html.var
4-2
・モジュールの追加
173行目付近に追加
LoadModule php5_module "c:/php5/php5apache2.dll"
4-3
366行目付近に追加
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
PHPIniDir "c:/php" ← 一行追加
</IfModule>
Apache restart。
ページを開くと・・
Web サイトによってこのページの表示を拒否されました
HTTP 403
可能性のある原因:
この Web サイトを表示するにはログインが必要です。
見直しと、オリジナルファイルを戻し、2回やり直してみたが結果は同じ。
どこが悪いんだろう・・