Ubuntu 16.04にphp5とphp7をインストールした後、Apache2を起動できません。

Ubuntu 16.04にphp5とphp7をインストールした後、Apache2を起動できません。

私は走っていますApache 2そしてPHP7存在するUbuntu16.04。しかし、それ以外にも私もインストールしましたPHP5

  • インストール後PHP5私は処刑したsudo a2enmod php5.6

  • その後、再起動します。Apache 2そしてsudo service apache2 restart

しかし、Apache 2始まらない。

実行した後、systemctl status apache2.service次のようになります。

    ● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; generated; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
       └─apache2-systemd.conf
  Active: failed (Result: exit-code) since Wed 2016-10-19 20:07:51 BST; 6s ago
  Docs: man:systemd-sysv-generator(8)
  Process: 7656 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS
  Process: 7748 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILU

Oct 19 20:07:51 tulik apache2[7748]:  *
Oct 19 20:07:51 tulik apache2[7748]:  * The apache2 configtest failed.
Oct 19 20:07:51 tulik apache2[7748]: Output of config test was:
Oct 19 20:07:51 tulik apache2[7748]: Segmentation fault (core dumped)
Oct 19 20:07:51 tulik apache2[7748]: Action 'configtest' failed.
Oct 19 20:07:51 tulik apache2[7748]: The Apache error log may have more informat
Oct 19 20:07:51 tulik systemd[1]: apache2.service: Control process exited, code=
Oct 19 20:07:51 tulik systemd[1]: Failed to start LSB: Apache2 web server.
Oct 19 20:07:51 tulik systemd[1]: apache2.service: Unit entered failed state.
Oct 19 20:07:51 tulik systemd[1]: apache2.service: Failed with result 'exit-code

ベストアンサー1

問題はphp7.0モードを無効にしていません

私は走り、sudo a2dimod php7.0今すべてが大丈夫です。

これでバージョンを切り替えることができますPHP 簡単に。

おすすめ記事