技术

我对 PHP 5.4 修复 CVE-2026-109618 和 CVE-2026-109619 的过程

1 、下载:从 https://museum.php.net/php5/php-5.4.45.tar.gz 下载 PHP 5.4 的最新版本,从 https://github.com/vperetti/php-cve-2026-109618-109619-backports 下载 patch 文件
2 、打补丁:将php-5.4.45 目录php-5.4-CVE-2026-109618-109619.patch 文件放到同一个目录下,进入 php-5.4.45 目录,然后patch -p1 < ../php-5.4-CVE-2026-109618-109619.patch
3 、配置编译参数:在原来的 PHP 5.4 里,php -i | grep Configure 看到编译参数,比如我的是./configure --prefix=/www/server/php/54  --with-config-file-path=/www/server/php/54/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl=/usr/local/curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl=/usr/local/openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-intl --build=arm-linux
4 、编译:然后通过 make -j$(nproc) 进行编译我的是 4 核,也可以 make -j3 ,这样留给其他程序一点 CPU 资源
5 、停止原来的 PHP-FPM ,并备份原来的目录
6 、安装:make install
会输出Installing PHP CLI binary:        /www/server/php/54/bin/Installing PHP CLI man page:      /www/server/php/54/php/man/man1/Installing PHP FPM binary:        /www/server/php/54/sbin/Installing PHP FPM config:        /www/server/php/54/etc/Installing PHP FPM man page:      /www/server/php/54/php/man/man8/Installing PHP FPM status page:      /www/server/php/54/php/fpm/Installing PHP CGI binary:        /www/server/php/54/bin/Installing PHP CGI man page:      /www/server/php/54/php/man/man1/Installing build environment:     /www/server/php/54/lib/php/build/Installing header files:          /www/server/php/54/include/php/Installing helper programs:       /www/server/php/54/bin/program: phpizeprogram: php-configInstalling man pages:             /www/server/php/54/php/man/man1/page: phpize.1page: php-config.1Installing PEAR environment:      /www/server/php/54/lib/php/[PEAR] Archive_Tar    - already installed: 1.3.12[PEAR] Console_Getopt - already installed: 1.3.1[PEAR] Structures_Graph- already installed: 1.0.4[PEAR] XML_Util       - already installed: 1.2.3[PEAR] PEAR           - already installed: 1.9.5Warning! a PEAR user config file already exists from a previous PEAR installation at '/root/.pearrc'. You may probably want to remove it.Wrote PEAR system config file at: /www/server/php/54-patch/etc/pear.confYou may want to add: /www/server/php/54/lib/php to your php.ini include_path/www/server/php/php-5.4.45/build/shtool install -c ext/phar/phar.phar /www/server/php/54/binln -s -f /www/server/php/54/bin/phar.phar /www/server/php/54/bin/pharInstalling PDO headers:          /www/server/php/54/include/php/ext/pdo/
如果原来的 php.ini 修改了的,就复制到新的里面
7 、重新启动 PHP-FPM


⚠️内容来自互联网,如有侵权请点击反馈!侵权投诉
本帖共 1 条回复,登录后即可查看

回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

hot.热文换一批
  1. 宇宙到底是大还是小?一张纸对折103次的厚度,宇宙已装不下
  2. 别眨眼!人类首次"看见"光子!你家灯泡里全是它!
  3. 人类至今无法彻底解释的15个顶级现象,看完敬畏万物
  4. 二十出头就显成熟?揭秘上一代人的"大人模样"背后原因
  5. 明明含有氢和氧,氢可燃氧助燃,为什么水偏偏不能燃烧?
  6. 🎉庆祝应用中心上架15个插件了,抽波优惠券![开奖时间:2026-04-26 20:00]
  7. 宇宙和大脑很相似?科学家新理论惊人,难道我们是活在生物体内?
  8. 人类已发现外星生命?科学家:就在12亿公里外,可能以甲烷为食
  9. 又一个新游戏上线了,欢迎体验!
  10. 自来水微塑料3000万/升,煮沸后降到480万,比桶装水高还是低?
  11. 现在这金价是不是还有余地
  12. 世界上最凶猛的10种鸟,金雕到底有多厉害?猎杀野狼轻而易举?
  13. 古人为何50岁就百病缠身?揭秘1972年7月30日“马王堆女尸”出土之谜
  14. 中国真挖到“宝”了!海水里藏45亿吨铀,美国70年难题被突破
  15. 太阳和银河系之间,还有一个神秘结构?
  16. 科学家:在人类出生前,有两种神秘的力量帮助构建了人脑
  17. 下潜到1万多米的海底,人类发现了不该出现的东西?需要引起警惕
  18. 古人到底能有多苦?这么说吧,现代人在古人面前不值一提
  19. 🌱牛马论坛-每日早报-2026年10月08日
  20. 终于装上了LightSNS,然后模块一通买,还是花了上千
  21. 吃一块能顶一天?军用压缩饼干为啥抗饿?
  22. 宇宙其实是一次次重复?我们有可能生活在一个轮回中!
  23. 颠覆认知!光速根本就不是速度,它其实是宇宙的“天花板代码”!
  24. 论坛新上了一个小游戏,打发时间利器,超上头!
琥珀彩蛋
琥珀彩蛋
当前页面有彩蛋,请仔细寻找哦!
牛马论坛(niumabbs.com),一个专注于分享日常新鲜事、职场工作点滴、摸鱼乐趣与各类生活感悟的交流平台。

    关注我们

  • 加入Q群
  • 微信客服
  • QQ客服
Copyright © 2026 NIUMABBS 版权所有 All Rights Reserved. |网站地图 劰载中...
关灯 在本版发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表