LoginSignup
5

More than 3 years have passed since last update.

XAMPPでApache起動出来ずにハマった話

Posted at

※windows10、xamppのバージョン7.4.1で環境を作ってます。

WordPressの環境をローカルで作成しようと思いxamppをダウンロードしてApacheを起動したが動かない・・・。
error.logを確認すると以下エラーが。

PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0

翻訳してみると、vcruntime140.dllがPHPと互換性がないと言われているように見える。

vcruntime140.dllって何?

色々調べてみると、
https://www.php.net/manual/ja/install.windows.requirements.php

PHPを動かすためにはVisualCのランタイムが必要でvcruntime140.dllというのがランタイムにあたるようだが、今入ってるPHPのバージョンと互換性がないよ!と言われているっぽい。

じゃあどうすれば良いの?

以下ページからVisualStudio2019のMicrosoft Visual C++ 再頒布可能パッケージをインストールして再度Apacheを起動したら起動出来た!
https://visualstudio.microsoft.com/ja/downloads/

Apache立ち上げるだけで結構時間がかかってしまった・・・( ;∀;)

エラー内容で調べても出てこなかったので備忘録として。

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
What you can do with signing up
5