I have install php7.0 and some it extention, but when I type "sudo service php7.0 restart", what I found is

"Failed to restart php7.0.service: Unit php7.0.service failed to load: No such file or directory."

and I check in service list sudo service --status-all and I was not found "php7.0"

is there anyone can help?

  • are you sure that the service should be named php7.0 ? .... have you tried any other names?
    – jsotola
    Commented Apr 21, 2018 at 23:12
  • This really has nothing to do with Raspberry Pi
    – Ingo
    Commented Apr 22, 2018 at 8:02
  • use sudo service apace2 restart and see what happens Commented Oct 27, 2019 at 16:20

2 Answers 2


You expect it to run on apache? Then you need to install apache2 with libapache2-mod-php7.0 and then you start it with apache2. If what you want to control is if php7.0 will be enabled on apache2 then I think what you need to use is a2enmod and a2dismod.


There is no such thing as a PHP service (apart from a never ending PHP script you would have created yourself).

The closest thing to a service that runs PHP is PHP-FPM which is available as php7.0-fpm package.

Other services are webservers (eg. Apache) as eftshift0 already answered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.