1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

あのXPでPHP練習環境作り(Apache+PHP+MySQL)メモ

Last updated at Posted at 2016-01-08

ボロいパソコンでPHPしようと思いWindows XPへのApache+PHP+MySQLインストールを試みました。練習環境であり最新版でもなんでもありません。全然分からず無駄に時間がかかりましたので、私レベルの人間は無理をせずにナウなWindows OSとそれに対応した新しいXamppの使用をお勧めします。

Apache 2.4.18 VC9

ダウンロード先にVC11はXPで動かない的な記述あり。

Apache Haus Downloads
http://www.apachehaus.com/cgi-bin/download.plx

ということでApache2.4.18 VC9を使わなければならないようです。

Apache 2.4.x VC9
Built using C sources from the ASF and OpenSSL on Visual Studio 2008 (VC9).
ApacheXP.png

ダウンロードしたZipを解凍してコピー。
例えばC:¥Apache24

コマンドプロンプトで以下を実行して起動。
C:¥Apache24¥bin¥httpd

エラーが表示される場合はVisual Studioが無いかもしれないので、コントロールパネル>アプリケーションの追加と削除で確認。

Apache 2.4.xダウンロード画面の下の方にリンクがあります。

Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
Visual C++.png

ファイル名はvcredist_x86.exe

再度コマンドプロンプトから実行して他のPCなどからアクセスし、Welcomeの画面が表示されることを確認してください。

PHP 5.4 Thread Safe VC9

サポートの終わった時代遅れなOSでは最新のものはおろかPHP5の新しいほうも使えないもようです。そんなダサい環境を使っている私は以下のページのThread Safeと書かれたphp-5.4.45-Win32-VC9-x86.zipをダウンロードしました。

PHP For Windows: Binaries and sources Releases
http://windows.php.net/download/#php-5.4-ts-VC9-x86

解凍してわかりやすいところに展開。ちなみにThread Safeがなんなのかも分かっていません。

全体的な流れはダサITメンではない方が作ったと思われる以下のサイトを参考にしました。

PHP 5.5.7 ダウンロードとインストール - PHPインストールと初期設定
http://www.phpbook.jp/install/install/index1.html

MySQL 5.5.47

インストールしようとしたところ出汁がなければ駄目みたいなことを言われました。dotNetFx40_Full_setup.exeをインストール。

Download Microsoft .NET Framework 4 Full 日本語 Language Pack (x86/x64) from Official Microsoft Download Center
https://www.microsoft.com/ja-jp/download/details.aspx?id=3324

いよいよMySQLです。使用するのはmysql-5.5.47-win32.msi
以下のページのMySQL Community Server 5.5.47

MySQL :: Download MySQL Community Server
https://dev.mysql.com/downloads/mysql/5.5.html

インストール時の設定に関してはこちらのデキる男感ほとばしるサイトを確認してください。

Windows XP にMySQL5をインストール&設定|MySQLのインストール&設定|MySQL|PHP & JavaScript Room
http://phpjavascriptroom.com/?t=mysql&p=mysql5install

以上

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?