Home  >  Article  >  Backend Development  >  What to do if ubuntu php cannot start the service

What to do if ubuntu php cannot start the service

藏色散人
藏色散人Original
2022-12-19 09:46:374767browse

Solution to the problem that ubuntu php cannot start the service: 1. Set the error log in php-fpm.conf; 2. Execute "/usr/sbin/php-fpm7.4 --fpm-config /etc/ php/fpm/php-fpm.conf" command; 3. Modify the php configuration file comments.

What to do if ubuntu php cannot start the service

The operating environment of this tutorial: ubuntu18.04 system, php7.4 version, DELL G3 computer

ubuntu php cannot start the service what to do?

php-fpm on ubuntu cannot be started and there is no log output

php and php-fpm of apt install on ubuntu

Use the default startup command, /etc /init.d/php-fpm start Found that the process could not be started

The configuration file is /etc/php/fpm/php-fpm.conf, and the error log is set in it, /var/log/php-fpm.log But this Log file was not actually generated

There was neither startup nor error log, which left me baffled and unable to solve it

Finally I thought of direct php-fpm startup command, /usr/sbin/php-fpm7.4 --fpm-config /etc/php/fpm/php-fpm.conf

must have failed, but the error message is displayed, in the pool The listen line in .d/www.conf reports an error.

I took a closer look and found that the php configuration file comments are all with ;, and I used # comments, so an error was reported. I modified it and the startup was successful

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if ubuntu php cannot start the service. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn