shell_exec(sudo service apache2 restart)仅停止服务器

时间:2015-05-17 17:10:29

标签: php apache ubuntu debian server

我试图用这个命令用PHP重启我的Apache2服务器:

shell_exec("sudo service apache2 restart");

Apache停止但不开始...

顺便说一下:

shell_exec("sudo service apache2 reload");

对我有用......我在服务器上使用Debian

Apache2错误日志:

    [Sun May 17 19:55:18 2015] [notice] Graceful restart requested, doing restart
[Sun May 17 19:55:18 2015] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[Sun May 17 19:55:18 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u2 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun May 17 20:03:46 2015] [notice] caught SIGTERM, shutting down

0 个答案:

没有答案