Apache shows PHP code instead of executing it

前端 未结 26 1875
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 02:23

I have recently been trying to install PHP and Apache on my computer. After many hours, they\'re installed. I have modified the httpd.conf and php.ini files like everyone sa

26条回答
  •  别那么骄傲
    2020-11-22 03:17

    Thanks to others on this thread for their suggestions. Following the steps mentioned I found that the apache server was not able to start reporting a syntax error in a load file in /etc/apache2/mods-enabled. Turns out that both php7.0 and php7.1 were enabled.

    a2dismod php7.0
    systemctl restart apache2
    

    and php is rendered correctly again.

提交回复
热议问题