关于 apache:在 PHP5 存在的情况下删除 PHP 7 后 Apache2 不起作用 | 珊瑚贝

Apache2 doesn’t work after removing PHP 7 while PHP5 exists


我想将我在 Ubuntu 中的 PHP 版本从 7.1 更改为 5.6,我卸载了 PHP7,但现在我无法运行 Apache2。我已经安装了 PHP5.6。
当我尝试重新启动 apache 服务时出现此错误:

Job for apache2.service failed because the control process exited with
error code. See”systemctl status apache2.service” and”journalctl
-xe” for details.

● 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 Mon 2017-01-30 10:23:28 CET; 2min 35s ago
Docs: man:systemd-sysv-generator(8) Process: 15026 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 15052 ExecStart=/etc/init.d/apache2 start (code=exited,
status=1/FAILURE)

*
* The apache2 configtest failed. Output of config test was: apache2: Syntax error on line 216 of /etc/apache2/apache2.conf: Could not open
configuration file /etc/apache2/conf-enabled/phpmyadmin.conf: No such
file or Action ‘configtest’ failed. The Apache error log may have
more information. apache2.service: Control process exited, code=exited
status=1 Failed to start LSB: Apache2 web server. apache2.service:
Unit entered failed state. apache2.service: Failed with result
‘exit-code’.

  • apache 将指向一个 php 模块,因此删除后请为 php5 进行设置调用并重新启动 apache。调用 sudo apt-get install php5 或您的 php 版本。对于第二个错误,请确保您以正确的方式安装了 phpmyadmin。
  • phpmyadmin总是尝试安装php7的模块,如何强制他安装php5.6的模块??
  • 删除 php 并安装新的 php5,然后安装新的 phpmyadmin。首先删除所有 php 相关的包。这是最简单的方法。如果你不能这样做,那么只需尝试 apt-get remove php7*
  • 谢谢,这解决了我的问题,我没有安装 Phpmyadmin,我在 Workbench 上工作得更好。你可以做出你的回答,所以我接受它。比你


删除 PHP 并安装新的 php5,然后安装新的 phpmyadmin。
首先,您需要删除所有与 PHP 相关的包,因为以确保不会有冲突的包,这也是我认为最简单的方法。删除使用

1
sudo aptget remove php7*

现在安装 PHP5.* ( 5.6 )


来源:https://www.codenong.com/41932485/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_10064.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?