


What should I do if php7 cannot be used after downloading and installing 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.
#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
Cause: When starting the script execution, the execution file could not be found. Check the startup script:
vim /etc/init.d/php-fpm
Just modify the execution file path in the script correctly. For example, I directly changed it to an absolute path.
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
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 English version
Recommended: Win version, supports code prompts!

Notepad++7.3.1
Easy-to-use and free code editor
