search
HomeBackend DevelopmentPHP7What 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.

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

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

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

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor