php - 在 CentOS 上重新加载 php

标签 php linux nginx centos

我有一个在 CentOS 上运行 nginx 的网络服务器。 我更改了我的 php.ini 文件以增加一些限制,但是当我尝试重新启动 php 时,我收到错误消息:

[root@server ~]# php -v
PHP 5.6.3 (cli) (built: Nov 23 2014 15:09:34)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader v4.7.1, Copyright (c) 2002-2014, by ionCube Ltd.

[root@server ~]# systemctl restart php-fpm56.service‏
Failed to issue method call: Unit php-fpm56.service\xe2\x80\x8f.service failed to load: No such file or directory.

[root@server ~]# systemctl restart php56.service
Failed to issue method call: Unit php56.service failed to load: No such file or directory.

[root@server ~]# service nginx reload
Redirecting to /bin/systemctl reload  nginx.service

[root@server ~]# service nginx restart
Redirecting to /bin/systemctl restart  nginx.service

[root@server ~]# systemctl restart php-fpm.service
Failed to issue method call: Unit php-fpm.service failed to load: No such file or directory.

[root@server ~]# systemctl restart php.service
Failed to issue method call: Unit php.service failed to load: No such file or directory.

[root@server ~]# systemctl restart php56.service
Failed to issue method call: Unit php56.service failed to load: No such file or directory.

知道如何重新启动 PHP 吗?提前致谢

最佳答案

好吧,虽然老办法是解决方案:service php-fpm56 restart(实际上它起作用了,因为我在 SSH 终端中输入了它)

我想知道\xe2\x80\x8f 是什么。当我从 Skype 复制/粘贴到 ssh 终端时,似乎添加了一些额外的字符。

所以 systemctl restart php-fpm56.service 如果我输入它而不是从 skype 复制/粘贴它就可以工作...

感谢大家

关于php - 在 CentOS 上重新加载 php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28071016/

相关文章:

php - 如何将项目/帖子添加到收藏夹

javascript - 在javascript中将数据发送到服务器后接收JSON对象

Linux:从 init.d 守护进程启动 GUI 应用程序

nginx - 允许Nginx读取docker.sock

保存在 ramdisk 中的 php session

PHP 相当于 Python 的 `str.format` 方法?

linux - UTF-8 文件名在 linux 终端中返回 Not Found

linux - XRDP - 连接到同一个 session (多个用户)

nginx - 使用proxy_pass时如何在nginx上添加响应头?

php - 是否可以在 PowerMTA 上阅读收到的电子邮件?