Последнее обновление отключает php7 для apache2 [закрыто]

Пожалуйста, дайте мне знать, какие журналы вам нужны, чтобы решить эту проблему ..

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'.
2
задан 5 November 2017 в 21:17

1 ответ

Проблема могла состоять в том, что, Ubuntu 17.10 идет с PHP 7.1, но php модуль Apache не был обновлен. Таким образом, решение могло состоять в том, чтобы отключить и удалить старый модуль и установить и включить новый:

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
1
ответ дан 2 December 2019 в 04:46

Другие вопросы по тегам:

Похожие вопросы: