Home  >  Article  >  Backend Development  >  What to do if Debian PHP fails to restart

What to do if Debian PHP fails to restart

藏色散人
藏色散人Original
2023-01-18 09:34:162278browse

Debian PHP restart failure solution: 1. Update the existing system through "apt-get update && apt-get upgrade"; 2. Backup source list and replacement source list; 3. Through "apt-get dist-upgrade" to officially update the system; 4. Use "reboot lsb_release -a" to restart and check the kernel version.

What to do if Debian PHP fails to restart

The operating environment of this tutorial: Debian 10 system, PHP7.2 version, DELL G3 computer

What to do if debian php fails to restart ?

  • How to upgrade Debian from 9 to 10, and possible solutions that may cause PHP to fail to start

Let’s talk about upgrading debian10 first. First update the existing system, such as debian 9 x64.

apt-get update && apt-get upgrade

Then the backup source list and replacement source list

cp /etc/apt/sources.list /etc/apt/sources.list.orig
sed -i ‘s/stretch/buster/g’ /etc/apt/sources.list

Then start the formal update of the system

apt-get update && apt-get upgrade
apt-get dist-upgrade

Finally restart and Check the kernel version

reboot
lsb_release -a

to complete the update. It should be noted that when updating the system, several dialog boxes may pop up that require manual confirmation. The content is not complicated. First, it asks whether it is allowed to temporarily stop certain services for updates, and then whether to retain the firewall settings including IP4 and IP6, and whether to retain the customized SSHD_CONFIG file configuration.

After updating debian10, no other problems were found except that php on some hosts could not be started. The self-starting services start normally and no errors are reported. I haven't found any software that can no longer be used. The stability and efficiency feel unchanged from 9.

It is not complicated to solve the problem that PHP cannot start. The reason why php-fpm cannot start after the upgrade is that libcurl3 has been abandoned and replaced by libcurl4 in debian10, so the error "CURL_OPENSSL_3 not found" is reported. This change not only affects PHP, but also many components using the libcurl3 library. The solution in many posts on the Internet is to delete 4, add a certain source of ubuntu, and then force the installation of libcurl3, but the result of this is that curl will become unavailable. This is just a temporary solution. If you don’t know much about other software, the correct way is to find a new version of the corresponding software that uses the libcurl4 component.

For php, versions 5.5 and 5.6 are not affected by this upgrade. 7.2 and 7.3 will be affected. Other versions have not been tried due to limited conditions. But if there are any problems, you can refer to 7.2 and 7.3 to deal with them. It is to overwrite and install once, compile and install. For lnmp, just use the upgrade.sh script in the installation package to update php for lnmp. When updating, enter the same version number as the original one to overwrite the compilation and installation, which is a perfect solution.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if Debian PHP fails to restart. 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