There are currently 2 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
310 1
服务器已升级至php-8.5.4。
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 3/22/26 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


巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 3/23/26 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
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 310 Replies: 1
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 3/23/26 15:44
Bar Hot Posts
Bar Good Posts
Announcements