Home  >  Article  >  Backend Development  >  How to change php version

How to change php version

藏色散人
藏色散人Original
2022-11-03 09:17:452215browse

How to modify the php version: 1. Use the "rm -f /usr/bin/php" command to dispose of the previous version; 2. Use "ln -sf /www/server/php/72/bin /php /usr/bin/php" command can quote the desired version.

How to change php version

The operating environment of this tutorial: Windows 7 system, PHP version 8.1, Dell G3 computer.

How to change the php version?

Modify the default PHP version (Pagoda)

处理掉以前的
rm -f /usr/bin/php
引用你想要的版本
ln -sf /www/server/php/72/bin/php /usr/bin/php
netstat -anp | grep 9501
tcp 0 0 0.0.0.0:9501 0.0.0.0:* LISTEN 79805/php
# 反向代理 swoole
server {
    listen  80;
    server_name  www.swoole.com;
    root  /data/wwwroot/www.swoole.com;
    
    location / {
        if (!-e $request_filename){
            proxy_pass http://127.0.0.1:9501;
        }
    }
}
Listen failure: Couldn't listen on 127.0.0.1:9501: [Errno 98] Address already in use.
lsof -i:9501
kill -9 23666

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to change php version. 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