Home  >  Article  >  Backend Development  >  How to solve the problem that Pagoda Panel cannot install php 7.2

How to solve the problem that Pagoda Panel cannot install php 7.2

PHPz
PHPzOriginal
2023-03-23 17:20:552633browse

Recently, many users have reported that they have encountered some problems when installing the Pagoda Panel, especially when installing PHP 7.2, they will not be able to install it. If you have also encountered this problem, don't worry, let's introduce how to solve the problem that Pagoda PHP 7.2 cannot be installed.

1. Problem description

When installing the Pagoda panel, the latest version of PHP is usually installed. At this time, PHP version 7.4 will be installed by default, but the user wants to use When version 7.2 is released, the version number will be adjusted. At this time, the following two error messages may appear:

Could not resolve host: www.php.net
Failed loading /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/opcache.so

2. Solution

  1. Network problem

appears The error message "Could not resolve host: www.php.net" is likely caused by network problems. You can try the following two methods to solve the problem:

(1) Change DNS

Add a new DNS in the /etc/resolv.conf file:

nameserver 8.8.8.8

Save the file Finally, reconnect the pagoda panel for installation.

(2) Modify the hosts file

You can try to modify the hosts file and copy the following code into it:

140.205.201.2    www.php.net
199.232.69.194   github.com

Save the file, restart the DNS service, and then reconnect to the pagoda Just install the panel.

  1. PHP extension problem

appears "Failed loading /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/ opcache.so" error message is usually caused by PHP extension problems. The solution is as follows:

Remove the opcache.so file from the /www/server/php/72/lib/php/extensions/ file Delete it from the folder, and then re-execute the installation command:

wget -O /www/server/php/72/php.ini https://raw.githubusercontent.com/5iux/srs/master/php/72.ini
ln -sf /www/server/php/72/bin/php /usr/bin/php
/etc/init.d/php-fpm-72 restart

Then reconnect the pagoda panel to install it.

3. Summary

When installing Pagoda PHP 7.2, the installation fails, which is usually caused by network or PHP extension problems. It can be solved by changing the DNS, modifying the hosts file, or deleting the problematic PHP extension file. I hope the above solutions will be helpful to users who encounter the same problem.

The above is the detailed content of How to solve the problem that Pagoda Panel cannot install php 7.2. 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