Help us understand the problem. What is going on with this article?

RaspberryPi3 でPHPが使えなくなってしまったのでメモ

なぜかラズベリーパイでPHPが急に使えなくなってしまったのでメモ。

症状

PHPで構築したページを開いてもソースコードがテキストになって出てきてしまった。

環境

  • RaspberryPi3
  • Apache
  • PHP7

解決法

ネットで調べたところ同じ症状が出ている人は数人いたが解決法を試してもうまく解決しなかった。
ってことでもし解決しなーいっていう人がいるかもしれないからメモ

sudo a2dismod mpm_event
sudo a2enmod mpm_prefork
sudo a2enmod php7.0

この3つを実行したあとapacheを再起動!
きっとPHPが動くようになってるはず....

参考

https://twitter.com/jun50_scratch/status/1116940314231492608
※参考ってよりこれをQiitaに書いただけ(本人了承済み)

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした