PHP 5.3.27 中的 suhosin 补丁错误

PHP 5.3.27 中的 suhosin 补丁错误

当我尝试应用 suhosin 补丁时,出现以下错误:

patch -p 1 -i ../suhosin-patch-5.3.2-0.9.9.1.patch
patching file Zend/Makefile.am
patching file Zend/Zend.dsp
patching file Zend/ZendTS.dsp
patching file Zend/zend.c
patching file Zend/zend.h
Hunk #2 succeeded at 777 with fuzz 2 (offset 3 lines).
patching file Zend/zend_alloc.c
Hunk #5 succeeded at 340 (offset 4 lines).
Hunk #6 succeeded at 435 (offset 4 lines).
Hunk #7 succeeded at 470 (offset 4 lines).
Hunk #8 succeeded at 546 (offset 4 lines).
Hunk #9 succeeded at 632 (offset 4 lines).
Hunk #10 succeeded at 792 (offset 4 lines).
Hunk #11 succeeded at 802 (offset 4 lines).
Hunk #12 succeeded at 826 (offset 4 lines).
Hunk #13 succeeded at 839 (offset 4 lines).
Hunk #14 succeeded at 859 (offset 4 lines).
Hunk #15 succeeded at 924 (offset 4 lines).
Hunk #16 succeeded at 954 (offset 4 lines).
Hunk #17 succeeded at 972 (offset 4 lines).
Hunk #18 succeeded at 1005 (offset 4 lines).
Hunk #19 succeeded at 1107 (offset 4 lines).
Hunk #20 succeeded at 1154 (offset 4 lines).
Hunk #21 succeeded at 1207 (offset 10 lines).
Hunk #22 FAILED at 1210.
Hunk #23 succeeded at 1243 (offset 10 lines).
Hunk #24 succeeded at 1317 (offset 10 lines).
Hunk #25 succeeded at 1706 (offset 10 lines).
Hunk #26 succeeded at 1720 (offset 10 lines).
Hunk #27 succeeded at 1803 (offset 10 lines).
Hunk #28 succeeded at 1830 (offset 10 lines).
Hunk #29 succeeded at 1909 (offset 10 lines).
Hunk #30 succeeded at 1933 (offset 10 lines).
Hunk #31 succeeded at 1942 (offset 10 lines).
Hunk #32 succeeded at 1958 (offset 10 lines).
Hunk #33 succeeded at 1973 (offset 10 lines).
Hunk #34 succeeded at 1988 (offset 10 lines).
Hunk #35 succeeded at 2009 (offset 10 lines).
Hunk #36 succeeded at 2024 (offset 10 lines).
Hunk #37 succeeded at 2036 (offset 10 lines).
Hunk #38 succeeded at 2135 (offset 10 lines).
Hunk #39 succeeded at 2164 (offset 10 lines).
Hunk #40 succeeded at 2219 (offset 10 lines).
Hunk #41 succeeded at 2231 (offset 10 lines).
Hunk #42 succeeded at 2274 (offset 10 lines).
Hunk #43 succeeded at 2294 (offset 10 lines).
Hunk #44 succeeded at 2318 (offset 10 lines).
Hunk #45 succeeded at 2367 (offset 10 lines).
Hunk #46 succeeded at 2474 (offset 10 lines).
Hunk #47 succeeded at 2570 (offset 10 lines).
Hunk #48 succeeded at 2588 (offset 10 lines).
Hunk #49 succeeded at 2601 (offset 10 lines).
Hunk #50 succeeded at 2618 (offset 10 lines).
Hunk #51 succeeded at 2634 (offset 10 lines).
Hunk #52 succeeded at 2648 (offset 10 lines).
Hunk #53 succeeded at 2727 (offset 10 lines).
Hunk #54 succeeded at 2840 (offset 10 lines).
Hunk #55 succeeded at 2865 (offset 10 lines).
Hunk #56 succeeded at 2930 (offset 10 lines).
1 out of 56 hunks FAILED -- saving rejects to file Zend/zend_alloc.c.rej
patching file Zend/zend_alloc.h
patching file Zend/zend_alloc_canary.c
patching file Zend/zend_canary.c
patching file Zend/zend_compile.c
patching file Zend/zend_compile.h
Hunk #1 succeeded at 607 (offset 1 line).
patching file Zend/zend_constants.c
Hunk #1 FAILED at 113.
1 out of 1 hunk FAILED -- saving rejects to file Zend/zend_constants.c.rej
patching file Zend/zend_errors.h
patching file Zend/zend_hash.c
Hunk #1 succeeded at 20 with fuzz 1.
Hunk #2 succeeded at 137 (offset 3 lines).
Hunk #3 succeeded at 350 (offset 3 lines).
Hunk #4 succeeded at 428 (offset 3 lines).
Hunk #5 succeeded at 494 (offset 3 lines).
Hunk #6 succeeded at 570 (offset 3 lines).
Hunk #7 succeeded at 694 (offset 3 lines).
Hunk #8 succeeded at 721 (offset 3 lines).
Hunk #9 succeeded at 828 with fuzz 2 (offset 83 lines).
Hunk #10 FAILED at 808.
1 out of 10 hunks FAILED -- saving rejects to file Zend/zend_hash.c.rej
patching file Zend/zend_llist.c
patching file Zend/zend_operators.c
Hunk #1 succeeded at 153 (offset 1 line).
Hunk #2 succeeded at 192 (offset 1 line).
Hunk #3 succeeded at 235 (offset 1 line).
Hunk #4 succeeded at 278 (offset 1 line).
Hunk #5 succeeded at 364 (offset 1 line).
Hunk #6 succeeded at 427 (offset 1 line).
Hunk #7 succeeded at 516 (offset 1 line).
Hunk #8 succeeded at 637 (offset 1 line).
patching file Zend/zend_variables.c
Hunk #2 succeeded at 83 (offset 2 lines).
patching file configure
Hunk #1 succeeded at 19435 with fuzz 1 (offset 1964 lines).
Hunk #2 succeeded at 116239 (offset 3317 lines).
Hunk #3 succeeded at 116443 (offset 3317 lines).
patching file configure.in
Hunk #2 succeeded at 1407 (offset 10 lines).
Hunk #3 succeeded at 1435 (offset 10 lines).
patching file ext/standard/dl.c
patching file ext/standard/info.c
Hunk #1 succeeded at 878 (offset 11 lines).
patching file ext/standard/syslog.c
patching file main/fopen_wrappers.c
patching file main/main.c
Hunk #1 succeeded at 91 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 507 (offset 16 lines).
Hunk #3 succeeded at 1821 (offset 40 lines).
Hunk #4 succeeded at 1873 with fuzz 1 (offset 44 lines).
Hunk #5 succeeded at 1999 with fuzz 1 (offset 47 lines).
patching file main/php.h
Hunk #1 succeeded at 449 (offset -4 lines).
patching file main/php_config.h.in
Hunk #1 succeeded at 405 with fuzz 2 (offset -431 lines).
patching file main/php_logos.c
patching file main/snprintf.c
Hunk #1 succeeded at 1093 (offset 2 lines).
patching file main/spprintf.c
Hunk #1 succeeded at 700 (offset 2 lines).
patching file main/suhosin_globals.h
patching file main/suhosin_logo.h
patching file main/suhosin_patch.c
patching file main/suhosin_patch.h
patching file main/suhosin_patch.m4
patching file sapi/apache/mod_php5.c
patching file sapi/apache2filter/sapi_apache2.c
patching file sapi/apache2handler/sapi_apache2.c
Hunk #1 succeeded at 407 (offset 14 lines).
patching file sapi/apache_hooks/mod_php5.c
patching file sapi/cgi/cgi_main.c
Hunk #1 FAILED at 1923.
1 out of 1 hunk FAILED -- saving rejects to file sapi/cgi/cgi_main.c.rej
patching file sapi/cli/php_cli.c
Hunk #1 FAILED at 831.
1 out of 1 hunk FAILED -- saving rejects to file sapi/cli/php_cli.c.rej
patching file sapi/litespeed/lsapi_main.c
Hunk #1 FAILED at 545.
1 out of 1 hunk FAILED -- saving rejects to file sapi/litespeed/lsapi_main.c.rej
patching file sapi/milter/php_milter.c
Hunk #1 FAILED at 1102.
1 out of 1 hunk FAILED -- saving rejects to file sapi/milter/php_milter.c.rej
patching file win32/build/config.w32
Hunk #1 succeeded at 328 (offset 3 lines).
Hunk #2 succeeded at 385 (offset 5 lines).
patching file win32/build/config.w32.h.in
Hunk #1 succeeded at 152 (offset 1 line).

PHP 版本:5.3.27(PHP下载页面的tar.gz)
suhosin补丁:suhosin-补丁-5.3.2-0.9.9.1.补丁

答案1

我找到了一个解决方案:

wget http://download.suhosin.org/suhosin-0.9.33.tgz
tar zxf suhosin-0.9.33.tgz
cd suhosin-0.9.33/
./configure --with-php-config=/etc/php53/bin/php-config
make
make install

效果很好!

相关内容