O problema é que eu não desativei o php7.0 mod .
Eu corro sudo a2dimod php7.0
e tudo funciona bem agora.
Agora é possível alternar entre versões do PHP facilmente.
Estou executando o Apache2 com php7 no Ubuntu 16.04 . Mas ao lado disso, eu tinha instalado o php5 .
Após a instalação do php5 , executei sudo a2enmod php5.6
Em seguida, reiniciei o apache2 com sudo service apache2 restart
Mas o Apache2 não será iniciado.
Depois de executar systemctl status apache2.service
, estou recebendo:
● 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
Tags php7 php5 ubuntu apache-httpd