A atualização mais recente desativa o php7 para o apache2 [closed]

2

Por favor, deixe-me saber quais os registros que você precisa para poder resolver isso ..

root@BudanParakeet:/etc/apache2/mods-enabled# uname -v
#19-Ubuntu SMP Wed Oct 11 18:33:49 UTC 2017
root@BudanParakeet:/etc/apache2/mods-enabled#

root@BudanParakeet:/etc/apache2/mods-enabled# vi php7.0.conf 
root@BudanParakeet:/etc/apache2/mods-enabled# service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See "systemctl  status apache2.service" and "journalctl  -xe" for details.
root@BudanParakeet:/etc/apache2/mods-enabled# journalctl -xe
-- Unit UNIT has finished starting up.
-- 
-- The start-up result is done.
nov 05 18:35:57 BudanParakeet systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit apache2.service has begun starting up.
nov 05 18:35:57 BudanParakeet apachectl[4502]: apache2: Syntax error on line 146 of /etc/apache2/apache2.c
nov 05 18:35:57 BudanParakeet apachectl[4502]: Action 'start' failed.
nov 05 18:35:57 BudanParakeet apachectl[4502]: The Apache error log may have more information.
nov 05 18:35:57 BudanParakeet systemd[1]: apache2.service: Control process exited, code=exited status=1
nov 05 18:35:57 BudanParakeet systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit apache2.service has failed.
-- 
-- The result is failed.
nov 05 18:35:57 BudanParakeet systemd[1]: apache2.service: Unit entered failed state.
nov 05 18:35:57 BudanParakeet systemd[1]: apache2.service: Failed with result 'exit-code'.
    
por SeductiveApps.com 05.11.2017 / 18:47

1 resposta

1

O problema pode ser que o Ubuntu 17.10 vem com o PHP 7.1, mas o módulo php do Apache não foi atualizado. Então a solução poderia ser para desabilitar e remover o módulo antigo e instalar e ativar o novo:

sudo a2dismod php7.0
sudo apt remove libapache2-mod-php7.0
sudo apt install libapache2-mod-php7.1
sudo a2enmod php7.1
sudo systemctl restart apache2.service
    
por pa4080 06.11.2017 / 08:25