目前共有2篇帖子。 字體大小:較小 - 100% (默認)▼  內容轉換:不轉換▼
 
點擊 回復
31 1
服务器已升级至php-8.5.4。
一派掌門 二十級
1樓 發表于:2026-3-22 18:55

升级过程:

cd ~/software

wget https://www.php.net/distributions/php-8.5.4.tar.gz

tar xf php-8.5.4.tar.gz


diff php-8.4.10/php.ini-production /opt/php-8.4.10/lib/php.ini

cp php-8.5.4/php.ini-production php.ini

vi php.ini

diff php-8.5.4/php.ini-production php.ini


cd php-8.5.4

./configure --prefix=/opt/php-8.5.4 --with-apxs2=/opt/httpd-2.4.65/bin/apxs --enable-bcmath --enable-mbstring --with-bz2 --with-curl --with-gettext --with-mysqli --with-pdo-mysql --with-pgsql --with-pdo-pgsql --enable-gd --with-freetype --with-jpeg --with-openssl --with-tidy --with-zlib OPENSSL_CFLAGS=-I/opt/openssl-1.1.1w/include OPENSSL_LIBS="-L/opt/openssl-1.1.1w/lib -lssl -lcrypto"

make


ls -l /opt/httpd-2.4.65/bin/apxs ../httpd-2.4.65/support/apxs

ls -l /opt/httpd-2.4.65/modules/libphp.so ../php-8.4.10/libs/libphp.so libs/libphp.so


sudo make install

sudo cp ../php.ini /opt/php-8.5.4/lib/php.ini

sudo /opt/httpd-2.4.65/bin/httpd -t

sudo systemctl restart opt_httpd


# 检查网站是否正常运行。

# 备用恢复命令:

# sudo cp ../php-8.4.10/libs/libphp.so /opt/httpd-2.4.65/modules/libphp.so

# sudo systemctl restart opt_httpd


# 移除旧版本目录

mkdir ~/backup/20260322

sudo mv /opt/php-8.4.10 ~/backup/20260322


一派掌門 二十級
2樓 發表于:2026-3-23 15:44

响应头:

HTTP/2 200 OK

server: nginx/1.27.4
date: Mon, 23 Mar 2026 07:43:36 GMT
content-type: text/html; charset=UTF-8
strict-transport-security: max-age=63072000; includeSubdomains; preload
x-powered-by: PHP/8.5.4
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
X-Firefox-Spdy: h2
 

回復帖子

內容:
用戶名: 您目前是匿名發表
驗證碼:
(快捷鍵:Ctrl+Enter)
 

本帖信息

點擊數:31 回複數:1
評論數: ?
作者:巨大八爪鱼
最後回復:巨大八爪鱼
最後回復時間:2026-3-23 15:44
 
©2010-2026 Purasbar Ver2.0
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。