Home > Backend Development > PHP7 > body text

What should I do if php7 cannot be used after downloading and installing it?

藏色散人
Release: 2023-02-18 10:42:01
Original
5960 people have browsed it

Solution to the problem that php7 cannot be used after downloading and installing: 1. Check the startup script through "vim /etc/init.d/php-fpm"; 2. Modify the execution file path in the script correctly or pass The "sed -i 's/@sbindir@/\/usr\/local\/php\/sbin/g' /etc/init.d/php-fpm" statement can be modified directly.

What should I do if php7 cannot be used after downloading and installing it?

#The operating environment of this tutorial: Windows 7 system, PHP 7 version, Dell G3 computer.

What should I do if php7 cannot be used after downloading and installing it?

Solution to the problem that the service cannot be started after PHP7.4 source code is installed

The source code installs PHP7.4, the test passes, but the service cannot be started. The following error is reported:

Starting php-fpm /etc/init.d/php-fpm: line 57: /usr/local/php/php-fpm: No such file or directory
 failed
Copy after login

What should I do if php7 cannot be used after downloading and installing it?

Cause: When starting the script execution, the execution file could not be found. Check the startup script:

vim /etc/init.d/php-fpm
Copy after login

What should I do if php7 cannot be used after downloading and installing it?

Just modify the execution file path in the script correctly. For example, I directly changed it to an absolute path.

What should I do if php7 cannot be used after downloading and installing it?

Of course, you can also use sed to modify it directly:

sed -i 's/@sbindir@/\/usr\/local\/php\/sbin/g' /etc/init.d/php-fpm
sed -i 's/@sysconfdir@/\/usr\/local\/php\/etc/g' /etc/init.d/php-fpm
sed -i 's/@localstatedir@/\/usr\/local\/php\/var/g' /etc/init.d/php-fpm
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if php7 cannot be used after downloading and installing it?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template