Last update at :2024-07-05,Edit by888u
The problem dealt with this time is the WDCP environment installed in the server environment provided by the netizen, but what he did was different, causing the php -v and phpinfo files to see two different PHP versions, which then led to the installation in php.ini The components that need to be run are not running in the current WEB environment. We need to limit one of the PHP versions to only use one PHP version.
In this article, Snail will record the process of handling multiple PHP versions and then unifying the PHP versions of the site. However, we users must back up the data before operating. In case of unforeseen circumstances, we can still restore the data. .
First, check the current php.ini
Here you can see that there are three php.ini files. By default, php -v sees the /etc/php.ini configuration PHP version, and the site uses PHP5.6.30 version.
Second, add variable default php version
vi /etc/profile
Originally, we needed to delete the PHP version files that we were not planning to activate. We were worried that if we deleted them by mistake, they would be locked and not deleted. Anyway, it would not affect the files after the default. Here we need to specify the PHP version by default in the profile file.
export PATH=\\”/www/wdlinux/apache_php-5.6.30/bin:$PATH\\”
Here Snail needs to specify that the current PHP global version is 5.6.30, so add the above script.
source /etc/profile
Then execute the command to see if there is an error. If no error is reported, OK.
Here you can see that php -v and phpinfo are the same PHP version, and the problem can be solved. There is an error "PHP Warning: Module \\’SourceGuardian\\’ already loaded in Unknown on line 0\\". I have provided a separate solution here. You can refer to this method to solve it.
Recommended site searches: domain name query, US server, ip purchase, space rental domain name registration, website registration domain name query, https proxy ip, registration query Ministry of Industry and Information Technology, ip168, server rental US high defense,
发表评论