New-style PHP update, see dev-lang/php ChangeLog for more details.
authorLuca Longinotti <chtekk@gentoo.org>
Mon, 31 Oct 2005 14:10:39 +0000 (14:10 +0000)
committerLuca Longinotti <chtekk@gentoo.org>
Mon, 31 Oct 2005 14:10:39 +0000 (14:10 +0000)
Package-Manager: portage-2.0.53_rc6

55 files changed:
dev-lang/php/ChangeLog
dev-lang/php/Manifest
dev-lang/php/files/4-any/apache-1.3/70_mod_php.conf [moved from dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf with 100% similarity]
dev-lang/php/files/4-any/apache-2.0/70_mod_php.conf [moved from dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf with 100% similarity]
dev-lang/php/files/4-any/php4-fastbuild.patch [moved from dev-lang/php/files/4.4.0/fastbuild.patch with 100% similarity]
dev-lang/php/files/4-any/php4-imap-symlink.diff [moved from dev-lang/php/files/4.4.0/php4-imap-symlink.diff with 100% similarity]
dev-lang/php/files/4-any/php4-iodbc-config.diff [moved from dev-lang/php/files/4.4.0/php4-iodbc-config.diff with 100% similarity]
dev-lang/php/files/4-any/php4-libtool-1.5.patch [moved from dev-lang/php/files/4.4.0/php4-libtool-1.5.patch with 100% similarity]
dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch [new file with mode: 0644]
dev-lang/php/files/4-any/php4-with-iodbc.diff [moved from dev-lang/php/files/4.4.0/php4-with-iodbc.diff with 100% similarity]
dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch [new file with mode: 0644]
dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch [new file with mode: 0644]
dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch [moved from dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch with 81% similarity]
dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch [new file with mode: 0644]
dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch [new file with mode: 0644]
dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch [new file with mode: 0644]
dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch [new file with mode: 0644]
dev-lang/php/files/4.4.0/php4.4.0-pcre-security.patch
dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch [new file with mode: 0644]
dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch [new file with mode: 0644]
dev-lang/php/files/5.0-any/apache-1.3/70_mod_php5.conf [moved from dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf with 100% similarity]
dev-lang/php/files/5.0-any/apache-2.0/70_mod_php5.conf [moved from dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf with 100% similarity]
dev-lang/php/files/5.0-any/php5-imap-symlink.diff [moved from dev-lang/php/files/5.0.0/php5-imap-symlink.diff with 100% similarity]
dev-lang/php/files/5.0-any/php5-iodbc-config.diff [moved from dev-lang/php/files/5.0.0/php5-iodbc-config.diff with 100% similarity]
dev-lang/php/files/5.0-any/php5-libtool-1.5.patch [moved from dev-lang/php/files/5.0.0/php5-libtool-1.5.patch with 100% similarity]
dev-lang/php/files/5.0-any/php5-prefork.patch [moved from dev-lang/php/files/5.1.0/php5-prefork.patch with 100% similarity]
dev-lang/php/files/5.0-any/php5-soap_persistence_session.diff [moved from dev-lang/php/files/5.1.0/php5_soap_persistence_session.diff with 100% similarity]
dev-lang/php/files/5.0-any/php5-with-iodbc.diff [moved from dev-lang/php/files/5.1.0/php5-with-iodbc.diff with 100% similarity]
dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch [new file with mode: 0644]
dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch [new file with mode: 0644]
dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch [moved from dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch with 81% similarity]
dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch [new file with mode: 0644]
dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch [new file with mode: 0644]
dev-lang/php/files/5.0.4/php5.0.4-xmlrcp-ccode.diff [moved from dev-lang/php/files/5.0.0/php5.0.4-xmlrcp-ccode.diff with 100% similarity]
dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch [new file with mode: 0644]
dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch [new file with mode: 0644]
dev-lang/php/files/5.0.5/php5.0.5-obj-serialize.patch [moved from dev-lang/php/files/5.0.0/php5.0.5-obj-serialize.patch with 100% similarity]
dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch [new file with mode: 0644]
dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch [new file with mode: 0644]
dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf [new file with mode: 0644]
dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf [new file with mode: 0644]
dev-lang/php/files/5.1-any/php5-fastbuild.patch [new file with mode: 0644]
dev-lang/php/files/5.1-any/php5-imap-symlink.diff [moved from dev-lang/php/files/5.1.0/php5-imap-symlink.diff with 100% similarity]
dev-lang/php/files/5.1-any/php5-iodbc-config.diff [moved from dev-lang/php/files/5.1.0/php5-iodbc-config.diff with 100% similarity]
dev-lang/php/files/5.1-any/php5-prefork.patch [new file with mode: 0644]
dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff [new file with mode: 0644]
dev-lang/php/files/5.1-any/php5-with-iodbc.diff [new file with mode: 0644]
dev-lang/php/files/digest-php-4.3.11-r2 [moved from dev-lang/php/files/digest-php-4.3.11-r1 with 100% similarity]
dev-lang/php/files/digest-php-4.4.0-r2 [moved from dev-lang/php/files/digest-php-4.4.0-r1 with 100% similarity]
dev-lang/php/files/digest-php-5.0.4-r2 [moved from dev-lang/php/files/digest-php-5.0.4-r1 with 100% similarity]
dev-lang/php/files/digest-php-5.0.5-r2 [moved from dev-lang/php/files/digest-php-5.0.5-r1 with 100% similarity]
dev-lang/php/php-4.3.11-r2.ebuild [moved from dev-lang/php/php-4.3.11-r1.ebuild with 81% similarity]
dev-lang/php/php-4.4.0-r2.ebuild [moved from dev-lang/php/php-4.4.0-r1.ebuild with 81% similarity]
dev-lang/php/php-5.0.4-r2.ebuild [moved from dev-lang/php/php-5.0.4-r1.ebuild with 76% similarity]
dev-lang/php/php-5.0.5-r2.ebuild [moved from dev-lang/php/php-5.0.5-r1.ebuild with 79% similarity]

index 3e9bc262fca4b7113c8073751d29c8ced4711b76..0cc8373746d30d0aac96bcdf8d09454fae326985 100644 (file)
@@ -1,6 +1,80 @@
 # ChangeLog for dev-lang/php
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.48 2005/09/24 19:21:33 weeve Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.49 2005/10/31 14:10:39 chtekk Exp $
+
+*php-5.0.5-r2 (31 Oct 2005)
+*php-5.0.4-r2 (31 Oct 2005)
+*php-4.4.0-r2 (31 Oct 2005)
+*php-4.3.11-r2 (31 Oct 2005)
+
+  31 Oct 2005; Luca Longinotti <chtekk@gentoo.org>
+  -files/4.4.0/php4.3.11-pcre-security.patch,
+  +files/4.4.0/php4.4.0-fopen_wrappers.patch,
+  +files/4.4.0/php4.4.0-gd_safe_mode.patch,
+  files/4.4.0/php4.4.0-pcre-security.patch,
+  +files/4.4.0/php4.4.0-pspell-ext-segf.patch,
+  +files/4.4.0/php4.4.0-session_save_path-segf.patch,
+  -files/4.4.0/apache-1.3/70_mod_php.conf,
+  -files/4.4.0/apache-2.0/70_mod_php.conf,
+  +files/4-any/php4-fastbuild.patch, +files/4-any/php4-imap-symlink.diff,
+  +files/4-any/php4-iodbc-config.diff,
+  +files/5.0-any/php5-imap-symlink.diff,
+  +files/4-any/php4-libtool-1.5.patch,
+  +files/4-any/php4-uClibc-have_dn_skipname.patch,
+  +files/4-any/php4-with-iodbc.diff, +files/5.0-any/php5-iodbc-config.diff,
+  +files/4-any/apache-1.3/70_mod_php.conf,
+  +files/5.0-any/php5-libtool-1.5.patch,
+  +files/4-any/apache-2.0/70_mod_php.conf,
+  +files/4.3.11/php4.3.11-fopen_wrappers.patch,
+  +files/4.3.11/php4.3.11-gd_safe_mode.patch,
+  +files/4.3.11/php4.3.11-pcre-security.patch,
+  +files/4.3.11/php4.3.11-pspell-ext-segf.patch,
+  +files/4.3.11/php4.3.11-session_save_path-segf.patch,
+  -files/4.4.0/fastbuild.patch, -files/4.4.0/php4-imap-symlink.diff,
+  -files/4.4.0/php4-iodbc-config.diff, -files/4.4.0/php4-libtool-1.5.patch,
+  -files/4.4.0/php4-with-iodbc.diff, +files/5.0-any/php5-prefork.patch,
+  +files/5.0-any/php5-soap_persistence_session.diff,
+  +files/5.0-any/php5-with-iodbc.diff,
+  +files/5.0-any/apache-1.3/70_mod_php5.conf,
+  +files/5.0-any/apache-2.0/70_mod_php5.conf,
+  -files/5.0.0/php5-imap-symlink.diff, -files/5.0.0/php5-iodbc-config.diff,
+  -files/5.0.0/php5-libtool-1.5.patch,
+  -files/5.0.0/php5.0.4-pcre-security.patch,
+  -files/5.0.0/php5.0.4-xmlrcp-ccode.diff,
+  -files/5.0.0/php5.0.5-obj-serialize.patch,
+  +files/5.0.4/php5.0.4-fopen_wrappers.patch,
+  +files/5.0.4/php5.0.4-gd_safe_mode.patch,
+  +files/5.0.4/php5.0.4-pcre-security.patch,
+  +files/5.0.4/php5.0.4-pspell-ext-segf.patch,
+  +files/5.0.4/php5.0.4-session_save_path-segf.patch,
+  +files/5.0.4/php5.0.4-xmlrcp-ccode.diff,
+  +files/5.0.5/php5.0.5-fopen_wrappers.patch,
+  +files/5.0.5/php5.0.5-gd_safe_mode.patch,
+  +files/5.0.5/php5.0.5-obj-serialize.patch,
+  +files/5.0.5/php5.0.5-pspell-ext-segf.patch,
+  +files/5.0.5/php5.0.5-session_save_path-segf.patch,
+  +files/5.1-any/php5-fastbuild.patch,
+  +files/5.1-any/php5-imap-symlink.diff,
+  +files/5.1-any/php5-iodbc-config.diff, +files/5.1-any/php5-prefork.patch,
+  +files/5.1-any/php5-soap_persistence_session.diff,
+  +files/5.1-any/php5-with-iodbc.diff,
+  +files/5.1-any/apache-1.3/70_mod_php5.conf,
+  +files/5.1-any/apache-2.0/70_mod_php5.conf,
+  -files/5.1.0/php5-imap-symlink.diff, -files/5.1.0/php5-iodbc-config.diff,
+  -files/5.1.0/php5-prefork.patch, -files/5.1.0/php5-with-iodbc.diff,
+  -files/5.1.0/php5_soap_persistence_session.diff,
+  -files/5.1.0/apache-1.3/70_mod_php5.conf,
+  -files/5.1.0/apache-2.0/70_mod_php5.conf, -php-4.3.11-r1.ebuild,
+  +php-4.3.11-r2.ebuild, -php-4.4.0-r1.ebuild, +php-4.4.0-r2.ebuild,
+  -php-5.0.4-r1.ebuild, +php-5.0.4-r2.ebuild, -php-5.0.5-r1.ebuild,
+  +php-5.0.5-r2.ebuild:
+  New-style PHP update: fix quotation of some vars, change URI of a mirror,
+  change ordering of patches in the files/ directory, add 'mnogosearch' USE
+  flag, add 'oci8-instant-client' USE flag, add 'pic' USE flag, add 'cjk' USE
+  flag, delete 'png' and 'jpeg' USE flags now directly controlled by 'gd' USE
+  flag, change PHP extensions enabling/disabling system, fix a bug with
+  Apache1 + fastbuild, fix elibtoolize call (bug #106176) and fix bugs #99312,
+  #109669, #102943, #107602, #99225, #108834.
 
   24 Sep 2005; Jason Wever <weeve@gentoo.org> php-5.0.5-r1.ebuild:
   Added ~sparc keyword.
index 055014faeecddf14ac38852568c12078f90bd7ce..774d7bf310aef1083795386ca1a03ab9582cb562 100644 (file)
@@ -1,32 +1,55 @@
+MD5 d488db4999a774213ac88afa0b1203f8 ChangeLog 7255
+MD5 389638f1d46b6c41cd4d87b471572f4b files/4-any/apache-1.3/70_mod_php.conf 484
+MD5 ee36e31632adb08b7abf70f78b5b2125 files/4-any/apache-2.0/70_mod_php.conf 485
+MD5 f0acca9c6387b8ca139d2849665bd16f files/4-any/php4-fastbuild.patch 9012
+MD5 6d2047e069da7178fc841c4c7c890aa8 files/4-any/php4-imap-symlink.diff 620
+MD5 22ed61ab0175cd83985a90e5d2b3b8b2 files/4-any/php4-iodbc-config.diff 511
+MD5 a7036ee38aa3b37256c0a6fe2afdbbe2 files/4-any/php4-libtool-1.5.patch 613
+MD5 f1142e6ec88928aeb4eb0120c267e53c files/4-any/php4-uClibc-have_dn_skipname.patch 839
+MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/4-any/php4-with-iodbc.diff 443
+MD5 cb36a386184ed6a887f62d2205f57173 files/4.3.11/php4.3.11-fopen_wrappers.patch 1481
+MD5 4db8e0b66cde22dd4e4d9f51e59f6098 files/4.3.11/php4.3.11-gd_safe_mode.patch 1573
+MD5 3f80d0c6c58fd4ea02b7efdf69265721 files/4.3.11/php4.3.11-pcre-security.patch 1667
+MD5 48d9c939434e9b01d0696410d59c503c files/4.3.11/php4.3.11-pspell-ext-segf.patch 8482
+MD5 17b906361a7ab8a3008446871623eeae files/4.3.11/php4.3.11-session_save_path-segf.patch 4938
+MD5 cb36a386184ed6a887f62d2205f57173 files/4.4.0/php4.4.0-fopen_wrappers.patch 1481
+MD5 a540c54ba22dc16b157edcf1ecb6258f files/4.4.0/php4.4.0-gd_safe_mode.patch 883
+MD5 5f1f48c87cafe0949e73ef064c99e5ed files/4.4.0/php4.4.0-pcre-security.patch 1741
+MD5 48d9c939434e9b01d0696410d59c503c files/4.4.0/php4.4.0-pspell-ext-segf.patch 8482
+MD5 83fb9efb602c178741ea2e40e13b014f files/4.4.0/php4.4.0-session_save_path-segf.patch 4132
+MD5 96ed6efe383833dbb880fef3b6c562bb files/5.0-any/apache-1.3/70_mod_php5.conf 524
+MD5 21bc6cc85150b5a5385f213d45efbe67 files/5.0-any/apache-2.0/70_mod_php5.conf 525
+MD5 7d198bde60f94cc8cea5ad9479901e21 files/5.0-any/php5-imap-symlink.diff 620
+MD5 110af7b300bcbbfb821fbb58f7923d8b files/5.0-any/php5-iodbc-config.diff 511
+MD5 7530065b6851a15b1c9d8b0ee5fb0a98 files/5.0-any/php5-libtool-1.5.patch 613
+MD5 058042718bc876bf27ab902673919ca9 files/5.0-any/php5-prefork.patch 850
+MD5 273799e60d5a41a1e6f5ac53781a152f files/5.0-any/php5-soap_persistence_session.diff 1976
+MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/5.0-any/php5-with-iodbc.diff 443
+MD5 2eddbf70a0b940789a0e68f029beb2b3 files/5.0.4/php5.0.4-fopen_wrappers.patch 1554
+MD5 89b001b449fdd567ffba6aaf2a3e804f files/5.0.4/php5.0.4-gd_safe_mode.patch 1216
+MD5 03a57319b93ee44a2fe159a0fb67592e files/5.0.4/php5.0.4-pcre-security.patch 1659
+MD5 ab931f65aefab4da99c6353b2c503d70 files/5.0.4/php5.0.4-pspell-ext-segf.patch 9422
+MD5 a0b87571b3bf155e835edc4497d1c4bf files/5.0.4/php5.0.4-session_save_path-segf.patch 5127
+MD5 e157161249ad2b217dc532f5289ba74b files/5.0.4/php5.0.4-xmlrcp-ccode.diff 750
+MD5 9e31c5edb0ded1d57ed90859d3ef168c files/5.0.5/php5.0.5-fopen_wrappers.patch 942
+MD5 8f52c6df24afb096109118582c1bf3eb files/5.0.5/php5.0.5-gd_safe_mode.patch 875
+MD5 b95f630e058c1b0f9cc47e186ef182cf files/5.0.5/php5.0.5-obj-serialize.patch 1364
+MD5 ab931f65aefab4da99c6353b2c503d70 files/5.0.5/php5.0.5-pspell-ext-segf.patch 9422
+MD5 8845848ffde7cfee1a3f57f6feaae8dd files/5.0.5/php5.0.5-session_save_path-segf.patch 4090
+MD5 96ed6efe383833dbb880fef3b6c562bb files/5.1-any/apache-1.3/70_mod_php5.conf 524
+MD5 21bc6cc85150b5a5385f213d45efbe67 files/5.1-any/apache-2.0/70_mod_php5.conf 525
+MD5 8392d102bb64d0e136d7b74302f51752 files/5.1-any/php5-fastbuild.patch 9580
+MD5 2aca8867fada1d3345859f201ce7e428 files/5.1-any/php5-imap-symlink.diff 652
+MD5 63c7937867dd8cc04b5089c3678ef359 files/5.1-any/php5-iodbc-config.diff 519
+MD5 058042718bc876bf27ab902673919ca9 files/5.1-any/php5-prefork.patch 850
+MD5 273799e60d5a41a1e6f5ac53781a152f files/5.1-any/php5-soap_persistence_session.diff 1976
+MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/5.1-any/php5-with-iodbc.diff 443
+MD5 5f8f18e68edb61b60cfa21a4ff65170b files/digest-php-4.3.11-r2 223
+MD5 c9e2d252f3ae26871c06d35ebfe6fb1e files/digest-php-4.4.0-r2 221
+MD5 71facfede997494a03e635bc07a14a2f files/digest-php-5.0.4-r2 220
+MD5 96fdb35fc6f5b775c569db88d89200d7 files/digest-php-5.0.5-r2 143
 MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
-MD5 142f79a4a47f275dd036f5344a4d100d ChangeLog 3550
-MD5 f2678d1c71630ebde199536e31cbf5e3 php-5.0.5-r1.ebuild 4694
-MD5 460849bb111f94869e2060bd0ec66987 php-4.4.0-r1.ebuild 8137
-MD5 ddaf60731c56a3de8b6dece494393f3b php-4.3.11-r1.ebuild 8127
-MD5 b5bf2584732ca22824a9b928f83c77cb php-5.0.4-r1.ebuild 5202
-MD5 5a28614e8d33162ab224e75dcf7ac16b files/digest-php-5.0.4-r1 220
-MD5 93a34eb8acada7af6a38c91fc64aea5a files/digest-php-5.0.5-r1 143
-MD5 c404654d25a964dd2c39e36c12e041f3 files/digest-php-4.3.11-r1 223
-MD5 91f80296313ae803b3e43d8573fc30a7 files/digest-php-4.4.0-r1 221
-MD5 f0acca9c6387b8ca139d2849665bd16f files/4.4.0/fastbuild.patch 9012
-MD5 6d2047e069da7178fc841c4c7c890aa8 files/4.4.0/php4-imap-symlink.diff 620
-MD5 22ed61ab0175cd83985a90e5d2b3b8b2 files/4.4.0/php4-iodbc-config.diff 511
-MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/4.4.0/php4-with-iodbc.diff 443
-MD5 a7036ee38aa3b37256c0a6fe2afdbbe2 files/4.4.0/php4-libtool-1.5.patch 613
-MD5 9c1de19a11cbfdcb4ff77803d1f5a62b files/4.4.0/php4.3.11-pcre-security.patch 2043
-MD5 2d2a8fb57b52ce965d2f6564d7ab0817 files/4.4.0/php4.4.0-pcre-security.patch 2116
-MD5 7d198bde60f94cc8cea5ad9479901e21 files/5.0.0/php5-imap-symlink.diff 620
-MD5 110af7b300bcbbfb821fbb58f7923d8b files/5.0.0/php5-iodbc-config.diff 511
-MD5 7530065b6851a15b1c9d8b0ee5fb0a98 files/5.0.0/php5-libtool-1.5.patch 613
-MD5 27c7d2dcb301cd78314f8ca22ff59b6f files/5.0.0/php5.0.4-pcre-security.patch 2034
-MD5 e157161249ad2b217dc532f5289ba74b files/5.0.0/php5.0.4-xmlrcp-ccode.diff 750
-MD5 b95f630e058c1b0f9cc47e186ef182cf files/5.0.0/php5.0.5-obj-serialize.patch 1364
-MD5 2aca8867fada1d3345859f201ce7e428 files/5.1.0/php5-imap-symlink.diff 652
-MD5 63c7937867dd8cc04b5089c3678ef359 files/5.1.0/php5-iodbc-config.diff 519
-MD5 058042718bc876bf27ab902673919ca9 files/5.1.0/php5-prefork.patch 850
-MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/5.1.0/php5-with-iodbc.diff 443
-MD5 273799e60d5a41a1e6f5ac53781a152f files/5.1.0/php5_soap_persistence_session.diff 1976
-MD5 389638f1d46b6c41cd4d87b471572f4b files/4.4.0/apache-1.3/70_mod_php.conf 484
-MD5 ee36e31632adb08b7abf70f78b5b2125 files/4.4.0/apache-2.0/70_mod_php.conf 485
-MD5 96ed6efe383833dbb880fef3b6c562bb files/5.1.0/apache-1.3/70_mod_php5.conf 524
-MD5 21bc6cc85150b5a5385f213d45efbe67 files/5.1.0/apache-2.0/70_mod_php5.conf 525
+MD5 f103552f91a89b2a01a7af3e546b80f8 php-4.3.11-r2.ebuild 8850
+MD5 4e500d2d3950816464e12d30a683a0fb php-4.4.0-r2.ebuild 8851
+MD5 8deedda3c7fb2fe1c6fba3bdf0264386 php-5.0.4-r2.ebuild 5909
+MD5 94d452c40e94cbe3775732802448ea52 php-5.0.5-r2.ebuild 5376
diff --git a/dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch b/dev-lang/php/files/4-any/php4-uClibc-have_dn_skipname.patch
new file mode 100644 (file)
index 0000000..3a86dfb
--- /dev/null
@@ -0,0 +1,30 @@
+--- ext/standard/dns.c
++++ ext/standard/dns.c
+@@ -275,6 +275,7 @@ PHP_FUNCTION(checkdnsrr)
+ #define MAXHOSTNAMELEN  256
+ #endif /* MAXHOSTNAMELEN */
+ 
++#if HAVE_DN_SKIPNAME
+ /* {{{ proto int getmxrr(string hostname, array mxhosts [, array weight])
+    Get MX records corresponding to a given Internet host name */
+ PHP_FUNCTION(getmxrr)
+@@ -355,6 +356,7 @@ PHP_FUNCTION(getmxrr)
+       RETURN_TRUE;
+ }
+ /* }}} */
++#endif /* HAVE_DN_SKIPNAME */
+ 
+ #endif
+ /*
+--- ext/standard/basic_functions.c
++++ ext/standard/basic_functions.c
+@@ -449,7 +449,9 @@ function_entry basic_functions[] = {
+ 
+ #if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) || defined(NETWARE))
+       PHP_FE(checkdnsrr,                                                                                                              NULL)
++# if HAVE_DN_SKIPNAME
+       PHP_FE(getmxrr,second_and_third_args_force_ref)
++# endif
+ #endif
+ 
+       PHP_FE(getmyuid,                                                                                                                NULL)
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch b/dev-lang/php/files/4.3.11/php4.3.11-fopen_wrappers.patch
new file mode 100644 (file)
index 0000000..672da5e
--- /dev/null
@@ -0,0 +1,46 @@
+--- main/fopen_wrappers.c      2005/02/02 23:44:07     1.153.2.10
++++ main/fopen_wrappers.c      2005/09/27 15:08:43     1.153.2.10.2.2
+@@ -16,7 +16,7 @@
+    |          Jim Winstead <jimw@php.net>                                 |
+    +----------------------------------------------------------------------+
+  */
+-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */
++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */
+
+ /* {{{ includes
+  */
+@@ -36,14 +36,6 @@
+ #include <winsock.h>
+ #define O_RDONLY _O_RDONLY
+ #include "win32/param.h"
+-#elif defined(NETWARE)
+-/*#include <ws2nlm.h>*/
+-/*#include <sys/socket.h>*/
+-#ifdef NEW_LIBC
+-#include <sys/param.h>
+-#else
+-#include "netware/param.h"
+-#endif
+ #else
+ #include <sys/param.h>
+ #endif
+@@ -57,8 +49,6 @@
+ #if HAVE_PWD_H
+ #ifdef PHP_WIN32
+ #include "win32/pwd.h"
+-#elif defined(NETWARE)
+-#include "netware/pwd.h"
+ #else
+ #include <pwd.h>
+ #endif
+@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based
+               /* Handler for basedirs that end with a / */
+               resolved_basedir_len = strlen(resolved_basedir);
+               if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+-                      if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+-                              resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++                      if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++                              resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+                               resolved_basedir[++resolved_basedir_len] = '\0';
+                       }
+               }
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch b/dev-lang/php/files/4.3.11/php4.3.11-gd_safe_mode.patch
new file mode 100644 (file)
index 0000000..1901112
--- /dev/null
@@ -0,0 +1,39 @@
+--- ext/gd/gd.c        2005/01/17 17:07:57     1.221.2.54
++++ ext/gd/gd.c        2005/10/06 20:44:52     1.221.2.56.2.1
+@@ -18,7 +18,7 @@
+    +----------------------------------------------------------------------+
+  */
+
+-/* $Id: gd.c,v 1.221.2.54 2005/01/17 17:07:57 sniper Exp $ */
++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+    Cold Spring Harbor Labs. */
+@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F
+       }
+
+       if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+-              if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++              if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+                       RETURN_FALSE;
+               }
+@@ -1699,7 +1699,7 @@ static void _php_image_output(INTERNAL_F
+               char  buf[4096];
+               char *path;
+
+-              tmp = php_open_temporary_file("", "", &path TSRMLS_CC);
++              tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC);
+               if (tmp == NULL) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file");
+                       RETURN_FALSE;
+@@ -3017,7 +3017,8 @@ static void php_imagettftext_common(INTE
+ {
+       zval *IM, *EXT = NULL;
+       gdImagePtr im=NULL;
+-      int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8];
++      long col = -1, x = -1, y = -1;
++      int str_len, fontname_len, i, brect[8];
+       double ptsize, angle;
+       unsigned char *str = NULL, *fontname = NULL;
+       char *error = NULL;
similarity index 81%
rename from dev-lang/php/files/4.4.0/php4.3.11-pcre-security.patch
rename to dev-lang/php/files/4.3.11/php4.3.11-pcre-security.patch
index 5f7d17b05c710fec831dde4df4c95d692958310f..3e4414220aa73a819239ee9c3719ac4ed1048807 100644 (file)
@@ -1,14 +1,3 @@
---- configure.in       2005-09-17 21:00:43.000000000 +0200
-+++ configure.in       2005-09-17 21:00:18.000000000 +0200
-@@ -41,7 +41,7 @@
- MAJOR_VERSION=4
- MINOR_VERSION=3
- RELEASE_VERSION=11
--EXTRA_VERSION=""
-+EXTRA_VERSION="-pl1-gentoo"
- VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
- 
- dnl Define where extension directories are located in the configure context
 --- ext/pcre/config.m4 2003/12/16 22:14:55     1.29.2.5
 +++ ext/pcre/config.m4 2005/08/09 17:41:56     1.29.2.7.2.1
 @@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch b/dev-lang/php/files/4.3.11/php4.3.11-pspell-ext-segf.patch
new file mode 100644 (file)
index 0000000..a62c42f
--- /dev/null
@@ -0,0 +1,317 @@
+--- ext/pspell/pspell.c        2003-08-28 22:01:29.000000000 +0200
++++ ext/pspell/pspell.c        2005-10-26 23:24:22.000000000 +0200
+@@ -16,7 +16,7 @@
+    +----------------------------------------------------------------------+
+ */
+ 
+-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */
++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */
+ 
+ #define IS_EXT_MODULE
+ 
+@@ -99,6 +99,22 @@
+       delete_pspell_config(config);
+ }
+ 
++#define PSPELL_FETCH_CONFIG \
++      convert_to_long_ex(conf);       \
++      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);       \
++      if (config == NULL || type != le_pspell_config) {       \
++              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));       \
++              RETURN_FALSE;   \
++      }       \
++
++#define PSPELL_FETCH_MANAGER \
++      convert_to_long_ex(scin);       \
++      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);     \
++      if (!manager || type != le_pspell) {    \
++              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));       \
++              RETURN_FALSE;   \
++      }       \
++
+ /* {{{ PHP_MINIT_FUNCTION
+  */
+ PHP_MINIT_FUNCTION(pspell)
+@@ -350,14 +366,8 @@
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(conf);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
++      PSPELL_FETCH_CONFIG;    
+ 
+-      if (config == NULL || type != le_pspell_config) {
+-              php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
+-              RETURN_FALSE;
+-      }
+-      
+       ret = new_pspell_manager(config);
+ 
+       if(pspell_error_number(ret) != 0){
+@@ -385,13 +395,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       if(pspell_manager_check(manager, Z_STRVAL_PP(word))){
+               RETURN_TRUE;
+@@ -417,13 +423,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-      RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       array_init(return_value);
+ 
+@@ -455,14 +457,10 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(miss);
+       convert_to_string_ex(corr);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr));
+       if(pspell_manager_error_number(manager) == 0){
+@@ -488,13 +486,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+       if(Z_STRLEN_PP(word) == 0){
+@@ -525,13 +519,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+       if(Z_STRLEN_PP(word) == 0){
+@@ -562,12 +552,7 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       pspell_manager_clear_session(manager);
+       if(pspell_manager_error_number(manager) == 0){
+@@ -593,12 +578,7 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       pspell_manager_save_all_word_lists(manager);
+ 
+@@ -666,22 +646,17 @@
+ PHP_FUNCTION(pspell_config_runtogether)
+ {
+       int type;
+-      zval **sccin, **runtogether;
++      zval **conf, **runtogether;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_boolean_ex(runtogether);
+       pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false");
+@@ -695,22 +670,17 @@
+ PHP_FUNCTION(pspell_config_mode)
+ {
+       int type;
+-      zval **sccin, **mode;
++      zval **conf, **mode;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_long_ex(mode);
+ 
+@@ -732,7 +702,7 @@
+ PHP_FUNCTION(pspell_config_ignore)
+ {
+       int type;
+-      zval **sccin, **pignore;
++      zval **conf, **pignore;
+       int argc;
+ 
+       int loc = PSPELL_LARGEST_WORD;
+@@ -742,16 +712,11 @@
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_long_ex(pignore);
+       ignore = Z_LVAL_PP(pignore);
+@@ -782,22 +747,17 @@
+ PHP_FUNCTION(pspell_config_personal)
+ {
+       int type;
+-      zval **sccin, **personal;
++      zval **conf, **personal;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_string_ex(personal);
+ 
+@@ -820,22 +780,17 @@
+ PHP_FUNCTION(pspell_config_repl)
+ {
+       int type;
+-      zval **sccin, **repl;
++      zval **conf, **repl;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       pspell_config_replace(config, "save-repl", "true");
+ 
+@@ -860,22 +815,17 @@
+ PHP_FUNCTION(pspell_config_save_repl)
+ {
+       int type;
+-      zval **sccin, **save;
++      zval **conf, **save;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_boolean_ex(save);
+       pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false");
diff --git a/dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch b/dev-lang/php/files/4.3.11/php4.3.11-session_save_path-segf.patch
new file mode 100644 (file)
index 0000000..3836776
--- /dev/null
@@ -0,0 +1,154 @@
+--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:39:04.000000000 +0100
++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:02:03.000000000 +0200
+@@ -18,7 +18,7 @@
+    +----------------------------------------------------------------------+
+  */
+ 
+-/* $Id: sapi_apache2.c,v 1.1.2.39 2005/03/10 11:39:04 jorton Exp $ */
++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */
+ 
+ #include <fcntl.h>
+ 
+@@ -268,23 +268,18 @@
+       TSRMLS_FETCH();
+ 
+       ctx = SG(server_context);
+-   
+-      /* We use APLOG_STARTUP because it keeps us from printing the
+-       * data and time information at the beginning of the error log
+-       * line.  Not sure if this is correct, but it mirrors what happens
+-       * with Apache 1.3 -- rbb
+-       */
++
+       if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */
+               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg);
+       } else {
+-              ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg);
++              ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg);
+       }
+ }
+ 
+ static void php_apache_sapi_log_message_ex(char *msg, request_rec *r)
+ {
+       if (r) {
+-              ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename);
++              ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename);
+       } else {
+               php_apache_sapi_log_message(msg);
+       }
+@@ -458,15 +453,34 @@
+       request_rec *parent_req = NULL;
+       TSRMLS_FETCH();
+ 
++#define PHPAP_INI_OFF \
++      if (strcmp(r->protocol, "INCLUDED")) { \
++              zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
++      } \
++
+       conf = ap_get_module_config(r->per_dir_config, &php4_module);
++
++      /* apply_config() needs r in some cases, so allocate server_context early */
++      ctx = SG(server_context);
++      if (ctx == NULL) {
++              ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++              /* register a cleanup so we clear out the SG(server_context)
++               * after each request. Note: We pass in the pointer to the
++               * server_context in case this is handled by a different thread.
++               */
++              apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++              ctx->r = r;
++              ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++      } else {
++              parent_req = ctx->r;
++              ctx->r = r;
++      }
+       apply_config(conf);
+ 
+       if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+               /* Check for xbithack in this case. */
+               if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+-                      zend_try {
+-                              zend_ini_deactivate(TSRMLS_C);
+-                      } zend_end_try();
++                      PHPAP_INI_OFF;
+                       return DECLINED;
+               }
+       }
+@@ -475,32 +489,24 @@
+        * the configuration; default behaviour is to accept. */ 
+       if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+               && r->path_info && r->path_info[0]) {
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_NOT_FOUND;
+       }
+ 
+       /* handle situations where user turns the engine off */
+       if (!AP2(engine)) {
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return DECLINED;
+       }
+ 
+       if (r->finfo.filetype == 0) {
+               php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+-              zend_try {
+-                              zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_NOT_FOUND;
+       }
+       if (r->finfo.filetype == APR_DIR) {
+               php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_FORBIDDEN;
+       }
+ 
+@@ -516,24 +522,30 @@
+ 
+ zend_first_try {
+ 
+-      ctx = SG(server_context);
+       if (ctx == NULL) {
+-              ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+-              /* register a cleanup so we clear out the SG(server_context)
+-               * after each request. Note: We pass in the pointer to the
+-               * server_context in case this is handled by a different thread.
+-               */
+-              apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+-              ctx->r = r;
++normal:
+               brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++              ctx = SG(server_context);
+               ctx->brigade = brigade;
+ 
+               if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+                       zend_bailout();
+               }
+       } else {
+-              parent_req = ctx->r;
++              if (!parent_req) {
++                      parent_req = ctx->r;
++              }
++              if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++                      if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++                              zend_bailout();
++                      }
++              }
++
++              /* check if comming due to ErrorDocument */
++              if (parent_req && parent_req->status != HTTP_OK) {
++                      parent_req = NULL;
++                      goto normal;
++              }
+               ctx->r = r;
+               brigade = ctx->brigade;
+       }
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch b/dev-lang/php/files/4.4.0/php4.4.0-fopen_wrappers.patch
new file mode 100644 (file)
index 0000000..672da5e
--- /dev/null
@@ -0,0 +1,46 @@
+--- main/fopen_wrappers.c      2005/02/02 23:44:07     1.153.2.10
++++ main/fopen_wrappers.c      2005/09/27 15:08:43     1.153.2.10.2.2
+@@ -16,7 +16,7 @@
+    |          Jim Winstead <jimw@php.net>                                 |
+    +----------------------------------------------------------------------+
+  */
+-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */
++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */
+
+ /* {{{ includes
+  */
+@@ -36,14 +36,6 @@
+ #include <winsock.h>
+ #define O_RDONLY _O_RDONLY
+ #include "win32/param.h"
+-#elif defined(NETWARE)
+-/*#include <ws2nlm.h>*/
+-/*#include <sys/socket.h>*/
+-#ifdef NEW_LIBC
+-#include <sys/param.h>
+-#else
+-#include "netware/param.h"
+-#endif
+ #else
+ #include <sys/param.h>
+ #endif
+@@ -57,8 +49,6 @@
+ #if HAVE_PWD_H
+ #ifdef PHP_WIN32
+ #include "win32/pwd.h"
+-#elif defined(NETWARE)
+-#include "netware/pwd.h"
+ #else
+ #include <pwd.h>
+ #endif
+@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based
+               /* Handler for basedirs that end with a / */
+               resolved_basedir_len = strlen(resolved_basedir);
+               if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+-                      if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+-                              resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++                      if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++                              resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+                               resolved_basedir[++resolved_basedir_len] = '\0';
+                       }
+               }
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch b/dev-lang/php/files/4.4.0/php4.4.0-gd_safe_mode.patch
new file mode 100644 (file)
index 0000000..1e0d49d
--- /dev/null
@@ -0,0 +1,20 @@
+--- ext/gd/gd.c        2005/05/06 16:51:54     1.221.2.56
++++ ext/gd/gd.c        2005/10/06 20:44:52     1.221.2.56.2.1
+@@ -18,7 +18,7 @@
+    +----------------------------------------------------------------------+
+  */
+
+-/* $Id: gd.c,v 1.221.2.56 2005/05/06 16:51:54 tony2001 Exp $ */
++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+    Cold Spring Harbor Labs. */
+@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F
+       }
+
+       if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+-              if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++              if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+                       RETURN_FALSE;
+               }
index 6ac2b2e50727e28eff6c208ed0347e921240e749..978c582a6a79fcf5284b82a0a0236860c72620de 100644 (file)
@@ -1,14 +1,3 @@
---- configure.in       2005-09-17 17:44:30.000000000 +0200
-+++ configure.in       2005-09-17 17:45:01.000000000 +0200
-@@ -41,7 +41,7 @@
- MAJOR_VERSION=4
- MINOR_VERSION=4
- RELEASE_VERSION=0
--EXTRA_VERSION=""
-+EXTRA_VERSION="-pl1-gentoo"
- VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
- 
- dnl Define where extension directories are located in the configure context
 --- ext/pcre/config.m4 2005/05/31 12:22:27     1.29.2.7
 +++ ext/pcre/config.m4 2005/08/09 17:41:56     1.29.2.7.2.1
 @@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch b/dev-lang/php/files/4.4.0/php4.4.0-pspell-ext-segf.patch
new file mode 100644 (file)
index 0000000..a62c42f
--- /dev/null
@@ -0,0 +1,317 @@
+--- ext/pspell/pspell.c        2003-08-28 22:01:29.000000000 +0200
++++ ext/pspell/pspell.c        2005-10-26 23:24:22.000000000 +0200
+@@ -16,7 +16,7 @@
+    +----------------------------------------------------------------------+
+ */
+ 
+-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */
++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */
+ 
+ #define IS_EXT_MODULE
+ 
+@@ -99,6 +99,22 @@
+       delete_pspell_config(config);
+ }
+ 
++#define PSPELL_FETCH_CONFIG \
++      convert_to_long_ex(conf);       \
++      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);       \
++      if (config == NULL || type != le_pspell_config) {       \
++              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));       \
++              RETURN_FALSE;   \
++      }       \
++
++#define PSPELL_FETCH_MANAGER \
++      convert_to_long_ex(scin);       \
++      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);     \
++      if (!manager || type != le_pspell) {    \
++              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));       \
++              RETURN_FALSE;   \
++      }       \
++
+ /* {{{ PHP_MINIT_FUNCTION
+  */
+ PHP_MINIT_FUNCTION(pspell)
+@@ -350,14 +366,8 @@
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(conf);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
++      PSPELL_FETCH_CONFIG;    
+ 
+-      if (config == NULL || type != le_pspell_config) {
+-              php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
+-              RETURN_FALSE;
+-      }
+-      
+       ret = new_pspell_manager(config);
+ 
+       if(pspell_error_number(ret) != 0){
+@@ -385,13 +395,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       if(pspell_manager_check(manager, Z_STRVAL_PP(word))){
+               RETURN_TRUE;
+@@ -417,13 +423,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-      RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       array_init(return_value);
+ 
+@@ -455,14 +457,10 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(miss);
+       convert_to_string_ex(corr);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr));
+       if(pspell_manager_error_number(manager) == 0){
+@@ -488,13 +486,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+       if(Z_STRLEN_PP(word) == 0){
+@@ -525,13 +519,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+       if(Z_STRLEN_PP(word) == 0){
+@@ -562,12 +552,7 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       pspell_manager_clear_session(manager);
+       if(pspell_manager_error_number(manager) == 0){
+@@ -593,12 +578,7 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       pspell_manager_save_all_word_lists(manager);
+ 
+@@ -666,22 +646,17 @@
+ PHP_FUNCTION(pspell_config_runtogether)
+ {
+       int type;
+-      zval **sccin, **runtogether;
++      zval **conf, **runtogether;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_boolean_ex(runtogether);
+       pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false");
+@@ -695,22 +670,17 @@
+ PHP_FUNCTION(pspell_config_mode)
+ {
+       int type;
+-      zval **sccin, **mode;
++      zval **conf, **mode;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_long_ex(mode);
+ 
+@@ -732,7 +702,7 @@
+ PHP_FUNCTION(pspell_config_ignore)
+ {
+       int type;
+-      zval **sccin, **pignore;
++      zval **conf, **pignore;
+       int argc;
+ 
+       int loc = PSPELL_LARGEST_WORD;
+@@ -742,16 +712,11 @@
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_long_ex(pignore);
+       ignore = Z_LVAL_PP(pignore);
+@@ -782,22 +747,17 @@
+ PHP_FUNCTION(pspell_config_personal)
+ {
+       int type;
+-      zval **sccin, **personal;
++      zval **conf, **personal;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_string_ex(personal);
+ 
+@@ -820,22 +780,17 @@
+ PHP_FUNCTION(pspell_config_repl)
+ {
+       int type;
+-      zval **sccin, **repl;
++      zval **conf, **repl;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       pspell_config_replace(config, "save-repl", "true");
+ 
+@@ -860,22 +815,17 @@
+ PHP_FUNCTION(pspell_config_save_repl)
+ {
+       int type;
+-      zval **sccin, **save;
++      zval **conf, **save;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_boolean_ex(save);
+       pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false");
diff --git a/dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch b/dev-lang/php/files/4.4.0/php4.4.0-session_save_path-segf.patch
new file mode 100644 (file)
index 0000000..8f936ae
--- /dev/null
@@ -0,0 +1,127 @@
+--- sapi/apache2handler/sapi_apache2.c 2005/04/08 20:35:02     1.1.2.40
++++ sapi/apache2handler/sapi_apache2.c 2005/10/12 21:41:36     1.1.2.40.2.5
+@@ -18,7 +18,7 @@
+    +----------------------------------------------------------------------+
+  */
+
+-/* $Id: sapi_apache2.c,v 1.1.2.40 2005/04/08 20:35:02 sniper Exp $ */
++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */
+
+ #include <fcntl.h>
+
+@@ -453,15 +453,34 @@ static int php_handler(request_rec *r)
+       request_rec *parent_req = NULL;
+       TSRMLS_FETCH();
+
++#define PHPAP_INI_OFF \
++      if (strcmp(r->protocol, "INCLUDED")) { \
++              zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
++      } \
++
+       conf = ap_get_module_config(r->per_dir_config, &php4_module);
++
++      /* apply_config() needs r in some cases, so allocate server_context early */
++      ctx = SG(server_context);
++      if (ctx == NULL) {
++              ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++              /* register a cleanup so we clear out the SG(server_context)
++               * after each request. Note: We pass in the pointer to the
++               * server_context in case this is handled by a different thread.
++               */
++              apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++              ctx->r = r;
++              ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++      } else {
++              parent_req = ctx->r;
++              ctx->r = r;
++      }
+       apply_config(conf);
+
+       if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+               /* Check for xbithack in this case. */
+               if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+-                      zend_try {
+-                              zend_ini_deactivate(TSRMLS_C);
+-                      } zend_end_try();
++                      PHPAP_INI_OFF;
+                       return DECLINED;
+               }
+       }
+@@ -470,32 +489,24 @@ static int php_handler(request_rec *r)
+        * the configuration; default behaviour is to accept. */
+       if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+               && r->path_info && r->path_info[0]) {
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_NOT_FOUND;
+       }
+
+       /* handle situations where user turns the engine off */
+       if (!AP2(engine)) {
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return DECLINED;
+       }
+
+       if (r->finfo.filetype == 0) {
+               php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+-              zend_try {
+-                              zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_NOT_FOUND;
+       }
+       if (r->finfo.filetype == APR_DIR) {
+               php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_FORBIDDEN;
+       }
+
+@@ -511,24 +522,30 @@ static int php_handler(request_rec *r)
+
+ zend_first_try {
+
+-      ctx = SG(server_context);
+       if (ctx == NULL) {
+-              ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+-              /* register a cleanup so we clear out the SG(server_context)
+-               * after each request. Note: We pass in the pointer to the
+-               * server_context in case this is handled by a different thread.
+-               */
+-              apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+-              ctx->r = r;
++normal:
+               brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++              ctx = SG(server_context);
+               ctx->brigade = brigade;
+
+               if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+                       zend_bailout();
+               }
+       } else {
+-              parent_req = ctx->r;
++              if (!parent_req) {
++                      parent_req = ctx->r;
++              }
++              if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++                      if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++                              zend_bailout();
++                      }
++              }
++
++              /* check if comming due to ErrorDocument */
++              if (parent_req && parent_req->status != HTTP_OK) {
++                      parent_req = NULL;
++                      goto normal;
++              }
+               ctx->r = r;
+               brigade = ctx->brigade;
+       }
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch b/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch
new file mode 100644 (file)
index 0000000..f645199
--- /dev/null
@@ -0,0 +1,46 @@
+--- main/fopen_wrappers.c      2005/03/11 06:55:22     1.170.2.2
++++ main/fopen_wrappers.c      2005/09/27 15:08:11     1.170.2.5
+@@ -17,7 +17,7 @@
+    +----------------------------------------------------------------------+
+  */
+
+-/* $Id: fopen_wrappers.c,v 1.170.2.2 2005/03/11 06:55:22 hyanantha Exp $ */
++/* $Id: fopen_wrappers.c,v 1.170.2.5 2005/09/27 15:08:11 iliaa Exp $ */
+
+ /* {{{ includes
+  */
+@@ -35,14 +35,6 @@
+ #ifdef PHP_WIN32
+ #define O_RDONLY _O_RDONLY
+ #include "win32/param.h"
+-#elif defined(NETWARE)
+-/*#include <ws2nlm.h>*/
+-/*#include <sys/socket.h>*/
+-#ifdef NEW_LIBC
+-#include <sys/param.h>
+-#else
+-#include "netware/param.h"
+-#endif
+ #else
+ #include <sys/param.h>
+ #endif
+@@ -117,8 +109,8 @@ PHPAPI int php_check_specific_open_based
+               /* Handler for basedirs that end with a / */
+               resolved_basedir_len = strlen(resolved_basedir);
+               if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+-                      if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+-                              resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++                      if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++                              resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+                               resolved_basedir[++resolved_basedir_len] = '\0';
+                       }
+               }
+@@ -132,7 +124,7 @@ PHPAPI int php_check_specific_open_based
+               }
+
+               /* Check the path */
+-#ifdef PHP_WIN32
++#if defined(PHP_WIN32) || defined(NETWARE)
+               if (strncasecmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
+ #else
+               if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch b/dev-lang/php/files/5.0.4/php5.0.4-gd_safe_mode.patch
new file mode 100644 (file)
index 0000000..91b0aae
--- /dev/null
@@ -0,0 +1,29 @@
+--- ext/gd/gd.c        2005/01/17 17:07:47     1.294.2.11
++++ ext/gd/gd.c        2005/10/06 20:42:56     1.294.2.13
+@@ -18,7 +18,7 @@
+    +----------------------------------------------------------------------+
+  */
+
+-/* $Id: gd.c,v 1.294.2.11 2005/01/17 17:07:47 sniper Exp $ */
++/* $Id: gd.c,v 1.294.2.13 2005/10/06 20:42:56 iliaa Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+    Cold Spring Harbor Labs. */
+@@ -1726,7 +1726,7 @@ static void _php_image_output(INTERNAL_F
+       }
+
+       if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+-              if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++              if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+                       RETURN_FALSE;
+               }
+@@ -1781,7 +1781,7 @@ static void _php_image_output(INTERNAL_F
+               char  buf[4096];
+               char *path;
+
+-              tmp = php_open_temporary_file("", "", &path TSRMLS_CC);
++              tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC);
+               if (tmp == NULL) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file");
+                       RETURN_FALSE;
similarity index 81%
rename from dev-lang/php/files/5.0.0/php5.0.4-pcre-security.patch
rename to dev-lang/php/files/5.0.4/php5.0.4-pcre-security.patch
index 7aad99f52a9b1dd8071b40e2192ac71720b6161d..41bfd23612f02752f8937c0516e72b722bcc6374 100644 (file)
@@ -1,14 +1,3 @@
---- configure.in       2005-09-17 21:42:36.000000000 +0200
-+++ configure.in       2005-09-17 21:42:51.000000000 +0200
-@@ -41,7 +41,7 @@
- MAJOR_VERSION=5
- MINOR_VERSION=0
- RELEASE_VERSION=4
--EXTRA_VERSION=""
-+EXTRA_VERSION="-pl1-gentoo"
- VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
- 
- dnl Define where extension directories are located in the configure context
 --- ext/pcre/config.m4 2003/06/28 04:30:51     1.32
 +++ ext/pcre/config.m4 2005/08/22 16:55:56     1.32.2.2
 @@ -13,7 +13,7 @@ PHP_ARG_WITH(pcre-regex,for PCRE support
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch b/dev-lang/php/files/5.0.4/php5.0.4-pspell-ext-segf.patch
new file mode 100644 (file)
index 0000000..5c32b14
--- /dev/null
@@ -0,0 +1,320 @@
+--- ext/pspell/pspell.c        2004-05-18 14:32:05.000000000 +0200
++++ ext/pspell/pspell.c        2005-10-26 23:30:48.000000000 +0200
+@@ -2,7 +2,7 @@
+    +----------------------------------------------------------------------+
+    | PHP Version 5                                                        |
+    +----------------------------------------------------------------------+
+-   | Copyright (c) 1997-2004 The PHP Group                                |
++   | Copyright (c) 1997-2005 The PHP Group                                |
+    +----------------------------------------------------------------------+
+    | This source file is subject to version 3.0 of the PHP license,       |
+    | that is bundled with this package in the file LICENSE, and is        |
+@@ -16,7 +16,7 @@
+    +----------------------------------------------------------------------+
+ */
+ 
+-/* $Id: pspell.c,v 1.44 2004/05/18 12:32:05 edink Exp $ */
++/* $Id: pspell.c,v 1.47 2005/10/17 15:29:55 iliaa Exp $ */
+ 
+ #define IS_EXT_MODULE
+ 
+@@ -101,6 +101,22 @@
+       delete_pspell_config(config);
+ }
+ 
++#define PSPELL_FETCH_CONFIG \
++      convert_to_long_ex(conf);       \
++      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);       \
++      if (config == NULL || type != le_pspell_config) {       \
++              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));       \
++              RETURN_FALSE;   \
++      }       \
++
++#define PSPELL_FETCH_MANAGER \
++      convert_to_long_ex(scin);       \
++      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);     \
++      if (!manager || type != le_pspell) {    \
++              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));       \
++              RETURN_FALSE;   \
++      }       \
++
+ /* {{{ PHP_MINIT_FUNCTION
+  */
+ PHP_MINIT_FUNCTION(pspell)
+@@ -352,13 +368,7 @@
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(conf);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
+-      
+-      if (config == NULL || type != le_pspell_config) {
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       ret = new_pspell_manager(config);
+ 
+@@ -387,13 +397,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       if(pspell_manager_check(manager, Z_STRVAL_PP(word))){
+               RETURN_TRUE;
+@@ -419,13 +425,8 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-      RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       array_init(return_value);
+ 
+@@ -457,14 +458,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(miss);
+       convert_to_string_ex(corr);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr));
+       if(pspell_manager_error_number(manager) == 0){
+@@ -490,13 +486,8 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+       if(Z_STRLEN_PP(word) == 0){
+@@ -527,13 +518,8 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+       if(Z_STRLEN_PP(word) == 0){
+@@ -564,12 +550,7 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;   
+ 
+       pspell_manager_clear_session(manager);
+       if(pspell_manager_error_number(manager) == 0){
+@@ -595,12 +576,7 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;   
+ 
+       pspell_manager_save_all_word_lists(manager);
+ 
+@@ -694,22 +670,17 @@
+ PHP_FUNCTION(pspell_config_runtogether)
+ {
+       int type;
+-      zval **sccin, **runtogether;
++      zval **conf, **runtogether;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;    
+ 
+       convert_to_boolean_ex(runtogether);
+       pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false");
+@@ -723,22 +694,17 @@
+ PHP_FUNCTION(pspell_config_mode)
+ {
+       int type;
+-      zval **sccin, **mode;
++      zval **conf, **mode;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_long_ex(mode);
+ 
+@@ -760,7 +726,7 @@
+ PHP_FUNCTION(pspell_config_ignore)
+ {
+       int type;
+-      zval **sccin, **pignore;
++      zval **conf, **pignore;
+       int argc;
+ 
+       int loc = PSPELL_LARGEST_WORD;
+@@ -770,16 +736,11 @@
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_long_ex(pignore);
+       ignore = Z_LVAL_PP(pignore);
+@@ -808,21 +769,16 @@
+ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
+ {
+       int type;
+-      zval **sccin, **value;
++      zval **conf, **value;
+       int argc;
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc, &sccin, &value) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc, &conf, &value) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if (!config) {
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_string_ex(value);
+ 
+@@ -868,22 +824,17 @@
+ PHP_FUNCTION(pspell_config_repl)
+ {
+       int type;
+-      zval **sccin, **repl;
++      zval **conf, **repl;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       pspell_config_replace(config, "save-repl", "true");
+ 
+@@ -908,22 +859,17 @@
+ PHP_FUNCTION(pspell_config_save_repl)
+ {
+       int type;
+-      zval **sccin, **save;
++      zval **conf, **save;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_boolean_ex(save);
+       pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false");
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch b/dev-lang/php/files/5.0.4/php5.0.4-session_save_path-segf.patch
new file mode 100644 (file)
index 0000000..f984d73
--- /dev/null
@@ -0,0 +1,164 @@
+--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:23:57.000000000 +0100
++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:09:39.000000000 +0200
+@@ -18,7 +18,7 @@
+    +----------------------------------------------------------------------+
+  */
+ 
+-/* $Id: sapi_apache2.c,v 1.40.2.7 2005/03/10 11:23:57 jorton Exp $ */
++/* $Id: sapi_apache2.c,v 1.40.2.13 2005/10/17 19:35:39 rasmus Exp $ */
+ 
+ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+ 
+@@ -111,10 +111,8 @@
+       } else {
+               apr_table_add(ctx->r->headers_out, sapi_header->header, val);
+       }
+-      
+-      sapi_free_header(sapi_header);
+ 
+-      return 0;
++      return SAPI_HEADER_ADD;
+ }
+ 
+ static int
+@@ -264,22 +262,17 @@
+ 
+       ctx = SG(server_context);
+ 
+-      /* We use APLOG_STARTUP because it keeps us from printing the
+-       * data and time information at the beginning of the error log
+-       * line.  Not sure if this is correct, but it mirrors what happens
+-       * with Apache 1.3 -- rbb
+-       */
+       if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */
+               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg);
+       } else {
+-              ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg);
++              ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg);
+       }
+ }
+ 
+ static void php_apache_sapi_log_message_ex(char *msg, request_rec *r)
+ {
+       if (r) {
+-              ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename);
++              ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename);
+       } else {
+               php_apache_sapi_log_message(msg);
+       }
+@@ -453,15 +446,35 @@
+       request_rec *parent_req = NULL;
+       TSRMLS_FETCH();
+ 
++#define PHPAP_INI_OFF \
++      if (strcmp(r->protocol, "INCLUDED")) { \
++              zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
++      } \
++
+       conf = ap_get_module_config(r->per_dir_config, &php5_module);
++
++      /* apply_config() needs r in some cases, so allocate server_context early */
++      ctx = SG(server_context);
++      if (ctx == NULL) {
++normal:
++              ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++              /* register a cleanup so we clear out the SG(server_context)
++               * after each request. Note: We pass in the pointer to the
++               * server_context in case this is handled by a different thread.
++               */
++              apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++              ctx->r = r;
++              ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++      } else {
++              parent_req = ctx->r;
++              ctx->r = r;
++      }
+       apply_config(conf);
+ 
+       if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+               /* Check for xbithack in this case. */
+               if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+-                      zend_try {
+-                              zend_ini_deactivate(TSRMLS_C);
+-                      } zend_end_try();
++                      PHPAP_INI_OFF;
+                       return DECLINED;
+               }
+       }
+@@ -470,32 +483,24 @@
+        * the configuration; default behaviour is to accept. */ 
+       if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+               && r->path_info && r->path_info[0]) {
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_NOT_FOUND;
+       }
+ 
+       /* handle situations where user turns the engine off */
+       if (!AP2(engine)) {
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return DECLINED;
+       }
+ 
+       if (r->finfo.filetype == 0) {
+               php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+-              zend_try {
+-                              zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_NOT_FOUND;
+       }
+       if (r->finfo.filetype == APR_DIR) {
+               php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_FORBIDDEN;
+       }
+ 
+@@ -511,24 +516,29 @@
+ 
+ zend_first_try {
+ 
+-      ctx = SG(server_context);
+       if (ctx == NULL) {
+-              ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+-              /* register a cleanup so we clear out the SG(server_context)
+-               * after each request. Note: We pass in the pointer to the
+-               * server_context in case this is handled by a different thread.
+-               */
+-              apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+-              ctx->r = r;
+               brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++              ctx = SG(server_context);
+               ctx->brigade = brigade;
+ 
+               if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+                       zend_bailout();
+               }
+       } else {
+-              parent_req = ctx->r;
++              if (!parent_req) {
++                      parent_req = ctx->r;
++              }
++              if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++                      if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++                              zend_bailout();
++                      }
++              }
++
++              /* check if comming due to ErrorDocument */
++              if (parent_req && parent_req->status != HTTP_OK) {
++                      parent_req = NULL;
++                      goto normal;
++              }
+               ctx->r = r;
+               brigade = ctx->brigade;
+       }
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch b/dev-lang/php/files/5.0.5/php5.0.5-fopen_wrappers.patch
new file mode 100644 (file)
index 0000000..b945c11
--- /dev/null
@@ -0,0 +1,22 @@
+--- main/fopen_wrappers.c      2005/07/16 12:14:44     1.170.2.4
++++ main/fopen_wrappers.c      2005/09/27 15:08:11     1.170.2.5
+@@ -17,7 +17,7 @@
+    +----------------------------------------------------------------------+
+  */
+
+-/* $Id: fopen_wrappers.c,v 1.170.2.4 2005/07/16 12:14:44 hyanantha Exp $ */
++/* $Id: fopen_wrappers.c,v 1.170.2.5 2005/09/27 15:08:11 iliaa Exp $ */
+
+ /* {{{ includes
+  */
+@@ -109,8 +109,8 @@ PHPAPI int php_check_specific_open_based
+               /* Handler for basedirs that end with a / */
+               resolved_basedir_len = strlen(resolved_basedir);
+               if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+-                      if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+-                              resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++                      if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++                              resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+                               resolved_basedir[++resolved_basedir_len] = '\0';
+                       }
+               }
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch b/dev-lang/php/files/5.0.5/php5.0.5-gd_safe_mode.patch
new file mode 100644 (file)
index 0000000..05bb354
--- /dev/null
@@ -0,0 +1,20 @@
+--- ext/gd/gd.c        2005/05/06 16:49:04     1.294.2.12
++++ ext/gd/gd.c        2005/10/06 20:42:56     1.294.2.13
+@@ -18,7 +18,7 @@
+    +----------------------------------------------------------------------+
+  */
+
+-/* $Id: gd.c,v 1.294.2.12 2005/05/06 16:49:04 tony2001 Exp $ */
++/* $Id: gd.c,v 1.294.2.13 2005/10/06 20:42:56 iliaa Exp $ */
+
+ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
+    Cold Spring Harbor Labs. */
+@@ -1726,7 +1726,7 @@ static void _php_image_output(INTERNAL_F
+       }
+
+       if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) {
+-              if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) {
++              if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn);
+                       RETURN_FALSE;
+               }
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch b/dev-lang/php/files/5.0.5/php5.0.5-pspell-ext-segf.patch
new file mode 100644 (file)
index 0000000..5c32b14
--- /dev/null
@@ -0,0 +1,320 @@
+--- ext/pspell/pspell.c        2004-05-18 14:32:05.000000000 +0200
++++ ext/pspell/pspell.c        2005-10-26 23:30:48.000000000 +0200
+@@ -2,7 +2,7 @@
+    +----------------------------------------------------------------------+
+    | PHP Version 5                                                        |
+    +----------------------------------------------------------------------+
+-   | Copyright (c) 1997-2004 The PHP Group                                |
++   | Copyright (c) 1997-2005 The PHP Group                                |
+    +----------------------------------------------------------------------+
+    | This source file is subject to version 3.0 of the PHP license,       |
+    | that is bundled with this package in the file LICENSE, and is        |
+@@ -16,7 +16,7 @@
+    +----------------------------------------------------------------------+
+ */
+ 
+-/* $Id: pspell.c,v 1.44 2004/05/18 12:32:05 edink Exp $ */
++/* $Id: pspell.c,v 1.47 2005/10/17 15:29:55 iliaa Exp $ */
+ 
+ #define IS_EXT_MODULE
+ 
+@@ -101,6 +101,22 @@
+       delete_pspell_config(config);
+ }
+ 
++#define PSPELL_FETCH_CONFIG \
++      convert_to_long_ex(conf);       \
++      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);       \
++      if (config == NULL || type != le_pspell_config) {       \
++              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));       \
++              RETURN_FALSE;   \
++      }       \
++
++#define PSPELL_FETCH_MANAGER \
++      convert_to_long_ex(scin);       \
++      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);     \
++      if (!manager || type != le_pspell) {    \
++              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));       \
++              RETURN_FALSE;   \
++      }       \
++
+ /* {{{ PHP_MINIT_FUNCTION
+  */
+ PHP_MINIT_FUNCTION(pspell)
+@@ -352,13 +368,7 @@
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(conf);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
+-      
+-      if (config == NULL || type != le_pspell_config) {
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       ret = new_pspell_manager(config);
+ 
+@@ -387,13 +397,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++
++      PSPELL_FETCH_MANAGER;
+ 
+       if(pspell_manager_check(manager, Z_STRVAL_PP(word))){
+               RETURN_TRUE;
+@@ -419,13 +425,8 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-      RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       array_init(return_value);
+ 
+@@ -457,14 +458,9 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(miss);
+       convert_to_string_ex(corr);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr));
+       if(pspell_manager_error_number(manager) == 0){
+@@ -490,13 +486,8 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+       if(Z_STRLEN_PP(word) == 0){
+@@ -527,13 +518,8 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+       convert_to_string_ex(word);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;
+ 
+       /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/
+       if(Z_STRLEN_PP(word) == 0){
+@@ -564,12 +550,7 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;   
+ 
+       pspell_manager_clear_session(manager);
+       if(pspell_manager_error_number(manager) == 0){
+@@ -595,12 +576,7 @@
+               WRONG_PARAM_COUNT;
+       }
+     
+-      convert_to_long_ex(scin);
+-      manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
+-      if(!manager){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_MANAGER;   
+ 
+       pspell_manager_save_all_word_lists(manager);
+ 
+@@ -694,22 +670,17 @@
+ PHP_FUNCTION(pspell_config_runtogether)
+ {
+       int type;
+-      zval **sccin, **runtogether;
++      zval **conf, **runtogether;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;    
+ 
+       convert_to_boolean_ex(runtogether);
+       pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false");
+@@ -723,22 +694,17 @@
+ PHP_FUNCTION(pspell_config_mode)
+ {
+       int type;
+-      zval **sccin, **mode;
++      zval **conf, **mode;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_long_ex(mode);
+ 
+@@ -760,7 +726,7 @@
+ PHP_FUNCTION(pspell_config_ignore)
+ {
+       int type;
+-      zval **sccin, **pignore;
++      zval **conf, **pignore;
+       int argc;
+ 
+       int loc = PSPELL_LARGEST_WORD;
+@@ -770,16 +736,11 @@
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_long_ex(pignore);
+       ignore = Z_LVAL_PP(pignore);
+@@ -808,21 +769,16 @@
+ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
+ {
+       int type;
+-      zval **sccin, **value;
++      zval **conf, **value;
+       int argc;
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc, &sccin, &value) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc, &conf, &value) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if (!config) {
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_string_ex(value);
+ 
+@@ -868,22 +824,17 @@
+ PHP_FUNCTION(pspell_config_repl)
+ {
+       int type;
+-      zval **sccin, **repl;
++      zval **conf, **repl;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       pspell_config_replace(config, "save-repl", "true");
+ 
+@@ -908,22 +859,17 @@
+ PHP_FUNCTION(pspell_config_save_repl)
+ {
+       int type;
+-      zval **sccin, **save;
++      zval **conf, **save;
+       int argc;
+ 
+       PspellConfig *config;
+       
+       argc = ZEND_NUM_ARGS();
+-      if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) {
++      if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) {
+               WRONG_PARAM_COUNT;
+       }
+ 
+-      convert_to_long_ex(sccin);
+-      config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
+-      if(!config){
+-              php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(sccin));
+-              RETURN_FALSE;
+-      }
++      PSPELL_FETCH_CONFIG;
+ 
+       convert_to_boolean_ex(save);
+       pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false");
diff --git a/dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch b/dev-lang/php/files/5.0.5/php5.0.5-session_save_path-segf.patch
new file mode 100644 (file)
index 0000000..aee032f
--- /dev/null
@@ -0,0 +1,123 @@
+--- sapi/apache2handler/sapi_apache2.c 2005/09/02 13:51:26     1.40.2.11
++++ sapi/apache2handler/sapi_apache2.c 2005/10/17 19:35:39     1.40.2.13
+@@ -18,7 +18,7 @@
+    +----------------------------------------------------------------------+
+  */
+
+-/* $Id: sapi_apache2.c,v 1.40.2.11 2005/09/02 13:51:26 sniper Exp $ */
++/* $Id: sapi_apache2.c,v 1.40.2.13 2005/10/17 19:35:39 rasmus Exp $ */
+
+ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
+@@ -446,15 +446,35 @@ static int php_handler(request_rec *r)
+       request_rec *parent_req = NULL;
+       TSRMLS_FETCH();
+
++#define PHPAP_INI_OFF \
++      if (strcmp(r->protocol, "INCLUDED")) { \
++              zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
++      } \
++
+       conf = ap_get_module_config(r->per_dir_config, &php5_module);
++
++      /* apply_config() needs r in some cases, so allocate server_context early */
++      ctx = SG(server_context);
++      if (ctx == NULL) {
++normal:
++              ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
++              /* register a cleanup so we clear out the SG(server_context)
++               * after each request. Note: We pass in the pointer to the
++               * server_context in case this is handled by a different thread.
++               */
++              apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
++              ctx->r = r;
++              ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */
++      } else {
++              parent_req = ctx->r;
++              ctx->r = r;
++      }
+       apply_config(conf);
+
+       if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
+               /* Check for xbithack in this case. */
+               if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+-                      zend_try {
+-                              zend_ini_deactivate(TSRMLS_C);
+-                      } zend_end_try();
++                      PHPAP_INI_OFF;
+                       return DECLINED;
+               }
+       }
+@@ -463,32 +483,24 @@ static int php_handler(request_rec *r)
+        * the configuration; default behaviour is to accept. */
+       if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+               && r->path_info && r->path_info[0]) {
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_NOT_FOUND;
+       }
+
+       /* handle situations where user turns the engine off */
+       if (!AP2(engine)) {
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return DECLINED;
+       }
+
+       if (r->finfo.filetype == 0) {
+               php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
+-              zend_try {
+-                              zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_NOT_FOUND;
+       }
+       if (r->finfo.filetype == APR_DIR) {
+               php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
+-              zend_try {
+-                      zend_ini_deactivate(TSRMLS_C);
+-              } zend_end_try();
++              PHPAP_INI_OFF;
+               return HTTP_FORBIDDEN;
+       }
+
+@@ -504,25 +516,24 @@ static int php_handler(request_rec *r)
+
+ zend_first_try {
+
+-      ctx = SG(server_context);
+       if (ctx == NULL) {
+-normal:
+-              ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
+-              /* register a cleanup so we clear out the SG(server_context)
+-               * after each request. Note: We pass in the pointer to the
+-               * server_context in case this is handled by a different thread.
+-               */
+-              apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null);
+-
+-              ctx->r = r;
+               brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
++              ctx = SG(server_context);
+               ctx->brigade = brigade;
+
+               if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
+                       zend_bailout();
+               }
+       } else {
+-              parent_req = ctx->r;
++              if (!parent_req) {
++                      parent_req = ctx->r;
++              }
++              if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {
++                      if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
++                              zend_bailout();
++                      }
++              }
++
+               /* check if comming due to ErrorDocument */
+               if (parent_req && parent_req->status != HTTP_OK) {
+                       parent_req = NULL;
diff --git a/dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf b/dev-lang/php/files/5.1-any/apache-1.3/70_mod_php5.conf
new file mode 100644 (file)
index 0000000..c6f1426
--- /dev/null
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+       # Load the module first
+       <IfModule !sapi_apache.c>
+               LoadModule php5_module    modules/libphp5.so
+       </IfModule>
+
+       # Set it to handle the files
+       <IfModule mod_mime.c>
+               AddType application/x-httpd-php .php
+               AddType application/x-httpd-php .phtml
+               AddType application/x-httpd-php .php3
+               AddType application/x-httpd-php .php4
+               AddType application/x-httpd-php .php5
+               AddType application/x-httpd-php-source .phps
+       </IfModule>
+
+       AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf b/dev-lang/php/files/5.1-any/apache-2.0/70_mod_php5.conf
new file mode 100644 (file)
index 0000000..40dfa86
--- /dev/null
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+       # Load the module first
+       <IfModule !sapi_apache2.c>
+               LoadModule php5_module    modules/libphp5.so
+       </IfModule>
+
+       # Set it to handle the files
+       <IfModule mod_mime.c>
+               AddType application/x-httpd-php .php
+               AddType application/x-httpd-php .phtml
+               AddType application/x-httpd-php .php3
+               AddType application/x-httpd-php .php4
+               AddType application/x-httpd-php .php5
+               AddType application/x-httpd-php-source .phps
+       </IfModule>
+
+       AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.1-any/php5-fastbuild.patch b/dev-lang/php/files/5.1-any/php5-fastbuild.patch
new file mode 100644 (file)
index 0000000..5c3ea85
--- /dev/null
@@ -0,0 +1,234 @@
+diff -u --recursive php-5.1.0RC1/acinclude.m4 php-5.1.0RC1-cgi/acinclude.m4
+--- php-5.1.0RC1/acinclude.m4  2005-09-14 22:40:54.000000000 +0200
++++ php-5.1.0RC1/acinclude.m4  2005-09-14 22:41:14.000000000 +0200
+@@ -194,7 +194,7 @@
+ dnl
+ dnl which array to append to?
+ AC_DEFUN([PHP_ADD_SOURCES],[
+-  PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
++  PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS))))
+ ])
+
+ dnl
+@@ -962,12 +962,8 @@
+ 
+   if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
+ dnl ---------------------------------------------- CLI static module
+-    if test "$PHP_SAPI" = "cgi"; then
+-      PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
+-      EXT_STATIC="$EXT_STATIC $1"
+-    else
+-      PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
+-    fi
++    PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
++    PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cgi)
+     EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
+   fi
+   PHP_ADD_BUILD_DIR($ext_builddir)
+diff -u --recursive php-5.1.0RC1/sapi/cgi/Makefile.frag php-5.1.0RC1-cgi/sapi/cgi/Makefile.frag
+--- php-5.1.0RC1/sapi/cgi/Makefile.frag        2003-07-02 02:08:26.000000000 +0100
++++ php-5.1.0RC1-cgi/sapi/cgi/Makefile.frag    2005-08-31 08:38:32.000000000 +0100
+@@ -1,2 +1,6 @@
+-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS)
+       $(BUILD_CGI)
++
++install-cgi: $(SAPI_CGI_PATH)
++      @echo "Installing CGI binary             $(INSTALL_ROOT)$(bindir)/"
++      @$(INSTALL_CGI)
+diff -u --recursive php-5.1.0RC1/sapi/cgi/config9.m4 php-5.1.0RC1-cgi/sapi/cgi/config9.m4
+--- php-5.1.0RC1/sapi/cgi/config9.m4   2005-07-07 06:54:43.000000000 +0100
++++ php-5.1.0RC1-cgi/sapi/cgi/config9.m4       2005-08-31 08:54:01.000000000 +0100
+@@ -80,96 +80,109 @@
+ ])
+ 
+ 
+-if test "$PHP_SAPI" = "default"; then
+-  AC_MSG_CHECKING(for CGI build)
+-  if test "$PHP_SAPI_CGI" != "no"; then
+-    AC_MSG_RESULT(yes)
+-
+-    PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
+-    case $host_alias in
+-      *cygwin* )
+-        SAPI_CGI_PATH=sapi/cgi/php.exe
+-        ;;
+-      * )
+-        SAPI_CGI_PATH=sapi/cgi/php
+-        ;;
+-    esac
+-    PHP_SUBST(SAPI_CGI_PATH)
+-
+-    PHP_TEST_WRITE_STDOUT
+-
+-    AC_MSG_CHECKING(whether to force Apache CGI redirect)
+-    if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
+-      REDIRECT=1
+-    else
+-      REDIRECT=0
+-    fi
+-    AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
+-    AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
++AC_MSG_CHECKING(for CGI build)
++if test "$PHP_SAPI_CGI" != "no"; then
++  AC_MSG_RESULT(yes)
++
++  PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
++  case $host_alias in
++    *cygwin* )
++      SAPI_CGI_PATH=sapi/cgi/php.exe
++      ;;
++    * )
++      SAPI_CGI_PATH=sapi/cgi/php
++      ;;
++  esac
++  PHP_SUBST(SAPI_CGI_PATH)
+ 
++  PHP_TEST_WRITE_STDOUT
+ 
+-    AC_MSG_CHECKING(whether to discard path_info + path_translated)
+-    if test "$PHP_DISCARD_PATH" = "yes"; then
+-      DISCARD_PATH=1
+-    else
+-      DISCARD_PATH=0
+-    fi
+-    AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
+-    AC_MSG_RESULT($PHP_DISCARD_PATH)
++  AC_MSG_CHECKING(whether to force Apache CGI redirect)
++  if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
++    REDIRECT=1
++  else
++    REDIRECT=0
++  fi
++  AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
++  AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
+ 
+-    AC_MSG_CHECKING(whether to enable path info checking)
+-    if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
+-      ENABLE_PATHINFO_CHECK=1
+-    else
+-      ENABLE_PATHINFO_CHECK=0
+-    fi
+-    AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
+-    AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
+ 
+-    AC_MSG_CHECKING(whether to enable fastcgi support)
+-    PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
+-    if test -z $PHP_LIBFCGI_DIR; then
+-      echo "$PHP_LIBFCGI_DIR does not exist"
+-      exit 1
+-    fi
+-    if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+-      PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
+-      PHP_FASTCGI=1
+-      PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
+-      PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
+-      PHP_FCGI_STATIC=1
+-    else
+-      PHP_FASTCGI=0
+-      PHP_FCGI_FILES=""
+-      PHP_FCGI_INCLUDE=""
+-      PHP_FCGI_STATIC=0
+-    fi
+-    AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
+-    AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
+-    AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
+-
+-    INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)"
+-    PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)')
+-
+-    case $host_alias in
+-      *aix*)
+-        BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+-        ;;
+-      *darwin*)
+-        BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++  AC_MSG_CHECKING(whether to discard path_info + path_translated)
++  if test "$PHP_DISCARD_PATH" = "yes"; then
++    DISCARD_PATH=1
++  else
++    DISCARD_PATH=0
++  fi
++  AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
++  AC_MSG_RESULT($PHP_DISCARD_PATH)
++
++  AC_MSG_CHECKING(whether to enable path info checking)
++  if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
++    ENABLE_PATHINFO_CHECK=1
++  else
++    ENABLE_PATHINFO_CHECK=0
++  fi
++  AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
++  AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
++
++  AC_MSG_CHECKING(whether to enable fastcgi support)
++  PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
++  if test -z $PHP_LIBFCGI_DIR; then
++    echo "$PHP_LIBFCGI_DIR does not exist"
++    exit 1
++  fi
++  if test "$PHP_ENABLE_FASTCGI" = "yes"; then
++    PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
++    PHP_FASTCGI=1
++    PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
++    PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
++    PHP_FCGI_STATIC=1
++  else
++    PHP_FASTCGI=0
++    PHP_FCGI_FILES=""
++    PHP_FCGI_INCLUDE=""
++    PHP_FCGI_STATIC=0
++  fi
++  AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
++  AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
++  AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
++
++  INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)"
++  PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi)
++  PHP_ADD_SOURCES(/main, internal_functions_cli.c,,cgi)
++
++  case $host_alias in
++    *aix*)
++      BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++      ;;
++    *darwin*)
++      BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+       ;;
+-      *)
+-        BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++    *)
++      BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+       ;;
+-    esac
++  esac
+ 
+-    PHP_SUBST(BUILD_CGI)
++  PHP_CGI_TARGET="\$(SAPI_CGI_PATH)"
++  PHP_INSTALL_CGI_TARGET="install-cgi"
+ 
+-  elif test "$PHP_SAPI_CLI" != "no"; then
+-    AC_MSG_RESULT(no)
+-    OVERALL_TARGET=
+-    PHP_SAPI=cli   
+-  else
+-    AC_MSG_ERROR([No SAPIs selected.])  
++  PHP_SUBST(BUILD_CGI)
++  PHP_SUBST(INSTALL_CGI)
++  PHP_SUBST(PHP_CGI_OBJS)
++  PHP_SUBST(PHP_CGI_TARGET)
++  PHP_SUBST(PHP_INSTALL_CGI_TARGET)
++
++  if test "$PHP_SAPI" = "default" ; then
++    PHP_BUILD_PROGRAM($SAP_CGI_PATH)
++  fi
++else
++  AC_MSG_RESULT(no)
++  if test "$PHP_SAPI" = "default" ; then
++    if test "$PHP_SAPI_CLI" != "no" ; then
++      OVERALL_TARGET=
++      PHP_SAPI=cli   
++    else
++      AC_MSG_ERROR([No SAPIs selected.])  
++    fi
+   fi
+ fi
diff --git a/dev-lang/php/files/5.1-any/php5-prefork.patch b/dev-lang/php/files/5.1-any/php5-prefork.patch
new file mode 100644 (file)
index 0000000..135579c
--- /dev/null
@@ -0,0 +1,26 @@
+diff -u --recursive php-5.0.4-orig/sapi/apache2filter/config.m4 php-5.0.4/sapi/apache2filter/config.m4
+--- php-5.0.4-orig/sapi/apache2filter/config.m4        2005-03-13 20:30:44.767051120 +0000
++++ php-5.0.4/sapi/apache2filter/config.m4     2005-03-13 20:32:01.999310032 +0000
+@@ -115,9 +115,6 @@
+     ;;
+   esac
+ 
+-  if test "$APXS_MPM" != "prefork"; then
+-    PHP_BUILD_THREAD_SAFE
+-  fi
+   AC_MSG_RESULT(yes)
+   
+   PHP_SUBST(APXS)
+diff -u --recursive php-5.0.4-orig/sapi/apache2handler/config.m4 php-5.0.4/sapi/apache2handler/config.m4
+--- php-5.0.4-orig/sapi/apache2handler/config.m4       2005-03-13 20:30:44.771050512 +0000
++++ php-5.0.4/sapi/apache2handler/config.m4    2005-03-13 20:31:50.106118072 +0000
+@@ -114,9 +114,6 @@
+     ;;
+   esac
+ 
+-  if test "$APXS_MPM" != "prefork"; then
+-    PHP_BUILD_THREAD_SAFE
+-  fi
+   AC_MSG_RESULT(yes)
+ 
+   PHP_SUBST(APXS)
diff --git a/dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff b/dev-lang/php/files/5.1-any/php5-soap_persistence_session.diff
new file mode 100644 (file)
index 0000000..626ac67
--- /dev/null
@@ -0,0 +1,35 @@
+diff -ruN php-5.0.0RC3.orig/ext/soap/soap.c php-5.0.0RC3/ext/soap/soap.c
+--- php-5.0.0RC3.orig/ext/soap/soap.c  2004-06-22 19:35:59.801348936 +0300
++++ php-5.0.0RC3/ext/soap/soap.c       2004-06-29 13:39:00.506820928 +0300
+@@ -1341,16 +1341,21 @@
+               soap_obj = NULL;
+ #if HAVE_PHP_SESSION
+               /* If persistent then set soap_obj from from the previous created session (if available) */
++              char soapname[32+sizeof("_bogus_session_name")]; //Now we use  max 32 chars from class name, must be overwriten with dynamic allocation with exact length!!
+               if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+                       zval **tmp_soap;
+ 
++                      bzero(soapname,32+sizeof("_bogus_session_name"));
++                        strncpy(soapname,service->soap_class.ce->name,32);
++                        strcat(soapname,"_bogus_session_name");
++
+                       if (PS(session_status) != php_session_active &&
+                           PS(session_status) != php_session_disabled) {
+                               php_session_start(TSRMLS_C);
+                       }
+ 
+                       /* Find the soap object and assign */
+-                      if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS &&
++                      if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), (void **) &tmp_soap) == SUCCESS &&
+                           Z_TYPE_PP(tmp_soap) == IS_OBJECT &&
+                           Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) {
+                               soap_obj = *tmp_soap;
+@@ -1432,7 +1437,7 @@
+                       /* If session then update session hash with new object */
+                       if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) {
+                               zval **tmp_soap_pp;
+-                              if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {
++                              if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) {
+                                       soap_obj = *tmp_soap_pp;
+                               }
+                       } else {
diff --git a/dev-lang/php/files/5.1-any/php5-with-iodbc.diff b/dev-lang/php/files/5.1-any/php5-with-iodbc.diff
new file mode 100644 (file)
index 0000000..81afcc0
--- /dev/null
@@ -0,0 +1,13 @@
+--- ext/odbc/php_odbc_includes.h       2005-02-22 17:55:18.000000000 +0000
++++ ext/odbc/php_odbc_includes.h       2005-02-22 17:55:26.000000000 +0000
+@@ -91,8 +91,8 @@
+ #elif defined(HAVE_IODBC) /* iODBC library */
+ 
+ #define ODBC_TYPE "iODBC"
+-#include <isql.h>
+-#include <isqlext.h>
++#include <iodbc/isql.h>
++#include <iodbc/isqlext.h>
+ #define HAVE_SQL_EXTENDED_FETCH 1
+ #define SQL_FD_FETCH_ABSOLUTE   0x00000010L
+ #define SQL_CURSOR_DYNAMIC      2UL
similarity index 100%
rename from dev-lang/php/files/digest-php-4.3.11-r1
rename to dev-lang/php/files/digest-php-4.3.11-r2
index 8eda7cdd6588d1f9fd15c3e725622b5740333d72..65531066fd6b76add0ed59f56c222cdd1aa5b1a3 100644 (file)
@@ -1,3 +1,3 @@
-MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
 MD5 00c2176c90b085ba76871524392f7d03 hardening-patch-4.3.11-0.4.3.patch.gz 105574
+MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
similarity index 100%
rename from dev-lang/php/files/digest-php-4.4.0-r1
rename to dev-lang/php/files/digest-php-4.4.0-r2
index dd3eed8b1d000fe4fa36c44456c43d3b4e083c19..5cf0a8b3bd282d6b431643a17ceccfdcccc4ee76 100644 (file)
@@ -1,3 +1,3 @@
-MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
 MD5 6eac3c5c5a7473c68a043c7657298f48 hardening-patch-4.4.0-0.4.3.patch.gz 104840
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
similarity index 100%
rename from dev-lang/php/files/digest-php-5.0.4-r1
rename to dev-lang/php/files/digest-php-5.0.4-r2
index a2bcd3e685a95175638c226bc613bb5cb2b30bc5..6b6d1ce71bb57f7a1558048ff2e2dd19b62e72da 100644 (file)
@@ -1,3 +1,3 @@
-MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383
 MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342
+MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383
 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
similarity index 100%
rename from dev-lang/php/files/digest-php-5.0.5-r1
rename to dev-lang/php/files/digest-php-5.0.5-r2
index c7aa92f99282075f8b91c485727e253833bd3699..9a62d89ecd07649c51ff7b9ba0e8aed7b8946199 100644 (file)
@@ -1,2 +1,2 @@
-MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556
 MD5 6af27b59251bb9ce4741b17e2e5358f7 hardening-patch-5.0.5-0.4.3.patch.gz 51173
+MD5 b5d4ca75bbb11ee5b830fa67213d9f7f php-5.0.5.tar.bz2 4895556
similarity index 81%
rename from dev-lang/php/php-4.3.11-r1.ebuild
rename to dev-lang/php/php-4.3.11-r2.ebuild
index 4025a8d29819fd3b8f6dc86a56b80aadee5b77bb..be50106dbad6257fd48d8b57ea353eb97f6c8066 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.3.11-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.3.11-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $
 
 IUSE="cgi cli discard-path force-cgi-redirect"
 KEYWORDS="~sparc ~x86"
@@ -28,7 +28,7 @@ DEPEND="${DEPEND} app-admin/eselect-php"
 RDEPEND="${RDEPEND} app-admin/eselect-php"
 
 # fixed PCRE library for security issues, bug #102373
-SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
 
 pkg_setup() {
        # make sure the user has specified a SAPI
@@ -77,14 +77,32 @@ src_unpack() {
                unpack ${A}
        fi
 
-       cd ${S}
+       cd "${S}"
+
+       # fix PHP branding
+       sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in
+
+       # patch to fix pspell extension, bug #99312 (new patch by upstream)
+       use spell && epatch "${FILESDIR}/4.3.11/php4.3.11-pspell-ext-segf.patch"
+
+       # patch to fix safe_mode bypass in GD extension, bug #109669
+       if use gd || use gd-external ; then
+               epatch "${FILESDIR}/4.3.11/php4.3.11-gd_safe_mode.patch"
+       fi
+
+       # patch open_basedir directory bypass, bug #102943
+       epatch "${FILESDIR}/4.3.11/php4.3.11-fopen_wrappers.patch"
+
+       # patch to fix session.save_path segfault and other issues in
+       # the apache2handler SAPI, bug #107602
+       epatch "${FILESDIR}/4.3.11/php4.3.11-session_save_path-segf.patch"
 
        # patch to fix PCRE library security issues, bug #102373
-       epatch ${FILESDIR}/4.4.0/php4.3.11-pcre-security.patch
+       epatch "${FILESDIR}/4.3.11/php4.3.11-pcre-security.patch"
 
        # sobstitute the bundled PCRE library with a fixed version for bug #102373
        einfo "Updating bundled PCRE library"
-       rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library"
+       rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
 
        # we call the eclass src_unpack, but don't want ${A} to be unpacked again
        PHP_PACKAGE=0
@@ -174,7 +192,7 @@ src_compile_fastbuild() {
                einfo
 
                sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
-               sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h
+               sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
                for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
                        [[ -f ${x} ]] && rm -f ${x}
                done
@@ -187,7 +205,7 @@ src_compile_fastbuild() {
                einfo
 
                sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
-               sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h
+               sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
                for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
                        [[ -f ${x} ]] && rm -f ${x}
                done
@@ -199,8 +217,8 @@ src_compile_fastbuild() {
                einfo "Building apache${USE_APACHE2} SAPI"
                einfo
 
-               sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h
-               sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h
+               sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+               sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
                for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
                        [[ -f ${x} ]] && rm -f ${x}
                done
@@ -272,15 +290,15 @@ src_install() {
                                ;;
                        apache*)
                                einfo "Installing apache${USE_APACHE2} SAPI"
-                               make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+                               make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
                                if [ -n "${USE_APACHE2}" ] ; then
                                        einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
                                        insinto ${APACHE_MODULES_CONFDIR}
-                                       doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf"
+                                       doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
                                else
                                        einfo "Installing Apache config for PHP (70_mod_php.conf)"
                                        insinto ${APACHE_MODULES_CONFDIR}
-                                       doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf"
+                                       doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
                                fi
                                php4_4-sapi_install_ini
                                ;;
@@ -294,9 +312,9 @@ pkg_postinst()
        # Output some general info to the user
        if useq apache || useq apache2 ; then
                APACHE1_MOD_DEFINE="PHP4"
-               APACHE1_MOD_CONF="70_mod_php.conf"
+               APACHE1_MOD_CONF="70_mod_php"
                APACHE2_MOD_DEFINE="PHP4"
-               APACHE2_MOD_CONF="70_mod_php.conf"
+               APACHE2_MOD_CONF="70_mod_php"
                apache-module_pkg_postinst
        fi
        php4_4-sapi_pkg_postinst
similarity index 81%
rename from dev-lang/php/php-4.4.0-r1.ebuild
rename to dev-lang/php/php-4.4.0-r2.ebuild
index 54ef4805588d12b951527f491f411c5f3932bdcb..a0c185f1b0422d84d831ab6bdc4060f931661757 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.4.0-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.4.0-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $
 
 IUSE="cgi cli discard-path force-cgi-redirect"
 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
@@ -28,7 +28,7 @@ DEPEND="${DEPEND} app-admin/eselect-php"
 RDEPEND="${RDEPEND} app-admin/eselect-php"
 
 # fixed PCRE library for security issues, bug #102373
-SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
 
 pkg_setup() {
        # make sure the user has specified a SAPI
@@ -77,14 +77,32 @@ src_unpack() {
                unpack ${A}
        fi
 
-       cd ${S}
+       cd "${S}"
+
+       # fix PHP branding
+       sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in
+
+       # patch to fix pspell extension, bug #99312 (new patch by upstream)
+       use spell && epatch "${FILESDIR}/4.4.0/php4.4.0-pspell-ext-segf.patch"
+
+       # patch to fix safe_mode bypass in GD extension, bug #109669
+       if use gd || use gd-external ; then
+               epatch "${FILESDIR}/4.4.0/php4.4.0-gd_safe_mode.patch"
+       fi
+
+       # patch open_basedir directory bypass, bug #102943
+       epatch "${FILESDIR}/4.4.0/php4.4.0-fopen_wrappers.patch"
+
+       # patch to fix session.save_path segfault and other issues in
+       # the apache2handler SAPI, bug #107602
+       epatch "${FILESDIR}/4.4.0/php4.4.0-session_save_path-segf.patch"
 
        # patch to fix PCRE library security issues, bug #102373
-       epatch ${FILESDIR}/4.4.0/php4.4.0-pcre-security.patch
+       epatch "${FILESDIR}/4.4.0/php4.4.0-pcre-security.patch"
 
        # sobstitute the bundled PCRE library with a fixed version for bug #102373
        einfo "Updating bundled PCRE library"
-       rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library"
+       rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
 
        # we call the eclass src_unpack, but don't want ${A} to be unpacked again
        PHP_PACKAGE=0
@@ -174,7 +192,7 @@ src_compile_fastbuild() {
                einfo
 
                sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
-               sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h
+               sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext-active"|g;' -i main/build-defs.h
                for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
                        [[ -f ${x} ]] && rm -f ${x}
                done
@@ -187,7 +205,7 @@ src_compile_fastbuild() {
                einfo
 
                sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
-               sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h
+               sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext-active"|g;' -i main/build-defs.h
                for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
                        [[ -f ${x} ]] && rm -f ${x}
                done
@@ -199,8 +217,8 @@ src_compile_fastbuild() {
                einfo "Building apache${USE_APACHE2} SAPI"
                einfo
 
-               sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h
-               sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h
+               sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php4\"|g;" -i main/build-defs.h
+               sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php4/ext-active\"|g;" -i main/build-defs.h
                for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
                        [[ -f ${x} ]] && rm -f ${x}
                done
@@ -272,15 +290,15 @@ src_install() {
                                ;;
                        apache*)
                                einfo "Installing apache${USE_APACHE2} SAPI"
-                               make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+                               make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
                                if [ -n "${USE_APACHE2}" ] ; then
                                        einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
                                        insinto ${APACHE_MODULES_CONFDIR}
-                                       doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf"
+                                       doins "${FILESDIR}/4-any/apache-2.0/70_mod_php.conf"
                                else
                                        einfo "Installing Apache config for PHP (70_mod_php.conf)"
                                        insinto ${APACHE_MODULES_CONFDIR}
-                                       doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf"
+                                       doins "${FILESDIR}/4-any/apache-1.3/70_mod_php.conf"
                                fi
                                php4_4-sapi_install_ini
                                ;;
@@ -294,9 +312,9 @@ pkg_postinst()
        # Output some general info to the user
        if useq apache || useq apache2 ; then
                APACHE1_MOD_DEFINE="PHP4"
-               APACHE1_MOD_CONF="70_mod_php.conf"
+               APACHE1_MOD_CONF="70_mod_php"
                APACHE2_MOD_DEFINE="PHP4"
-               APACHE2_MOD_CONF="70_mod_php.conf"
+               APACHE2_MOD_CONF="70_mod_php"
                apache-module_pkg_postinst
        fi
        php4_4-sapi_pkg_postinst
similarity index 76%
rename from dev-lang/php/php-5.0.4-r1.ebuild
rename to dev-lang/php/php-5.0.4-r2.ebuild
index 2e89faffd5538d8c04782cd7b20956df29706754..02f914447afc6d6985094db79fac2f11dc84e079 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.4-r1.ebuild,v 1.1 2005/09/18 13:21:54 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.4-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $
 
 IUSE="cgi cli discard-path force-cgi-redirect"
 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
@@ -28,7 +28,7 @@ DEPEND="${DEPEND} app-admin/eselect-php"
 RDEPEND="${RDEPEND} app-admin/eselect-php"
 
 # fixed PCRE library for security issues, bug #102373
-SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
 
 pkg_setup() {
        # make sure the user has specified a SAPI
@@ -66,17 +66,35 @@ src_unpack() {
                unpack ${A}
        fi
 
-       cd ${S}
+       cd "${S}"
+
+       # fix PHP branding
+       sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in
 
        # fix a GCC4 compile bug in XMLRPC extension, bug #96813
-       epatch ${FILESDIR}/5.0.0/php5.0.4-xmlrcp-ccode.diff
+       use xmlrpc && epatch "${FILESDIR}/5.0.4/php5.0.4-xmlrcp-ccode.diff"
+
+       # patch to fix pspell extension, bug #99312 (new patch by upstream)
+       use spell && epatch "${FILESDIR}/5.0.4/php5.0.4-pspell-ext-segf.patch"
+
+       # patch to fix safe_mode bypass in GD extension, bug #109669
+       if use gd || use gd-external ; then
+               epatch "${FILESDIR}/5.0.4/php5.0.4-gd_safe_mode.patch"
+       fi
+
+       # patch open_basedir directory bypass, bug #102943
+       epatch "${FILESDIR}/5.0.4/php5.0.4-fopen_wrappers.patch"
+
+       # patch to fix session.save_path segfault and other issues in
+       # the apache2handler SAPI, bug #107602
+       epatch "${FILESDIR}/5.0.4/php5.0.4-session_save_path-segf.patch"
 
        # patch to fix PCRE library security issues, bug #102373
-       epatch ${FILESDIR}/5.0.0/php5.0.4-pcre-security.patch
+       epatch "${FILESDIR}/5.0.4/php5.0.4-pcre-security.patch"
 
        # sobstitute the bundled PCRE library with a fixed version for bug #102373
        einfo "Updating bundled PCRE library"
-       rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library"
+       rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library"
 
        # we call the eclass src_unpack, but don't want ${A} to be unpacked again
        PHP_PACKAGE=0
@@ -171,15 +189,15 @@ src_install() {
                                ;;
                        apache*)
                                einfo "Installing apache${USE_APACHE2} SAPI"
-                               make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+                               make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
                                if [ -n "${USE_APACHE2}" ] ; then
                                        einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
                                        insinto ${APACHE_MODULES_CONFDIR}
-                                       doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf"
+                                       doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
                                else
                                        einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
                                        insinto ${APACHE_MODULES_CONFDIR}
-                                       doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf"
+                                       doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
                                fi
                                php5_0-sapi_install_ini
                                ;;
@@ -192,9 +210,9 @@ pkg_postinst()
        # Output some general info to the user
        if useq apache || useq apache2 ; then
                APACHE1_MOD_DEFINE="PHP5"
-               APACHE1_MOD_CONF="70_mod_php5.conf"
+               APACHE1_MOD_CONF="70_mod_php5"
                APACHE2_MOD_DEFINE="PHP5"
-               APACHE2_MOD_CONF="70_mod_php5.conf"
+               APACHE2_MOD_CONF="70_mod_php5"
                apache-module_pkg_postinst
        fi
        php5_0-sapi_pkg_postinst
similarity index 79%
rename from dev-lang/php/php-5.0.5-r1.ebuild
rename to dev-lang/php/php-5.0.5-r2.ebuild
index 546d1707a35f27829af301e147ae851c4dc8906d..177824a91cf8c873f6a82fceed0c3ffc111625d5 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.5-r1.ebuild,v 1.2 2005/09/24 19:21:33 weeve Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.5-r2.ebuild,v 1.1 2005/10/31 14:10:39 chtekk Exp $
 
 IUSE="cgi cli discard-path force-cgi-redirect"
 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
@@ -63,10 +63,28 @@ src_unpack() {
                unpack ${A}
        fi
 
-       cd ${S}
+       cd "${S}"
+
+       # fix PHP branding
+       sed -e 's|^EXTRA_VERSION=""|EXTRA_VERSION="-pl2-gentoo"|g' -i configure.in
+
+       # patch to fix pspell extension, bug #99312 (new patch by upstream)
+       use spell && epatch "${FILESDIR}/5.0.5/php5.0.5-pspell-ext-segf.patch"
+
+       # patch to fix safe_mode bypass in GD extension, bug #109669
+       if use gd || use gd-external ; then
+               epatch "${FILESDIR}/5.0.5/php5.0.5-gd_safe_mode.patch"
+       fi
+
+       # patch open_basedir directory bypass, bug #102943
+       epatch "${FILESDIR}/5.0.5/php5.0.5-fopen_wrappers.patch"
+
+       # patch to fix session.save_path segfault and other issues in
+       # the apache2handler SAPI, bug #107602
+       epatch "${FILESDIR}/5.0.5/php5.0.5-session_save_path-segf.patch"
 
        # fix a object serialization bug, bug #105374
-       epatch ${FILESDIR}/5.0.0/php5.0.5-obj-serialize.patch
+       epatch "${FILESDIR}/5.0.5/php5.0.5-obj-serialize.patch"
 
        # we call the eclass src_unpack, but don't want ${A} to be unpacked again
        PHP_PACKAGE=0
@@ -161,15 +179,15 @@ src_install() {
                                ;;
                        apache*)
                                einfo "Installing apache${USE_APACHE2} SAPI"
-                               make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+                               make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
                                if [ -n "${USE_APACHE2}" ] ; then
                                        einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
                                        insinto ${APACHE_MODULES_CONFDIR}
-                                       doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf"
+                                       doins "${FILESDIR}/5.0-any/apache-2.0/70_mod_php5.conf"
                                else
                                        einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
                                        insinto ${APACHE_MODULES_CONFDIR}
-                                       doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf"
+                                       doins "${FILESDIR}/5.0-any/apache-1.3/70_mod_php5.conf"
                                fi
                                php5_0-sapi_install_ini
                                ;;
@@ -182,9 +200,9 @@ pkg_postinst()
        # Output some general info to the user
        if useq apache || useq apache2 ; then
                APACHE1_MOD_DEFINE="PHP5"
-               APACHE1_MOD_CONF="70_mod_php5.conf"
+               APACHE1_MOD_CONF="70_mod_php5"
                APACHE2_MOD_DEFINE="PHP5"
-               APACHE2_MOD_CONF="70_mod_php5.conf"
+               APACHE2_MOD_CONF="70_mod_php5"
                apache-module_pkg_postinst
        fi
        php5_0-sapi_pkg_postinst