初期設定
ファイルダウンロード
ダウンロードサイトより「VC6 x86 Thread Safe」のファイル(Zip)をダウンロードする
インストール
Zipファイルを解凍して、解凍後のディレクトリをphp5へ変更し、c:\php5へ移動
環境変数を設定して、"path"に"c:\php5"を追加
apacheの設定
http.confファイルの編集
・・・・
省略
・・・・
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule php5_module "C:/php5/php5apache2_2.dll"
PHPIniDir "c:/php5"
※PHPIniDirの設定はシステム環境変数"PHPRC"に設定することでも対応できる
・・・・
省略
・・・・
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Tokyo
・・・・
省略
・・・・
php.ini-developmentの設定ファイルを編集し、C:\php5\php.iniへコピー
・・・・
省略
・・・・
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
・・・・
省略
・・・・
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
# For type maps (negotiated resources):
#AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
index.phpを編集
<?php phpinfo(); ?>
apacheを再起動して確認
最終更新:2010年06月10日 21:35