summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Longinotti <chtekk@gentoo.org>2005-10-29 22:16:13 +0000
committerLuca Longinotti <chtekk@gentoo.org>2005-10-29 22:16:13 +0000
commit6c19507c12f0c7184d6274bef2e7474428e6fb46 (patch)
tree559a685bf9f7dbd0f181ca57a9b12f32efe7cd02 /dev-php/php
parentCorrected Manifest. (diff)
downloadgentoo-2-6c19507c12f0c7184d6274bef2e7474428e6fb46.tar.gz
gentoo-2-6c19507c12f0c7184d6274bef2e7474428e6fb46.tar.bz2
gentoo-2-6c19507c12f0c7184d6274bef2e7474428e6fb46.zip
Old-style PHP update, fixes a couple of bugs.
(Portage version: 2.0.53_rc6)
Diffstat (limited to 'dev-php/php')
-rw-r--r--dev-php/php/ChangeLog18
-rw-r--r--dev-php/php/Manifest42
-rw-r--r--dev-php/php/files/digest-php-4.3.112
-rw-r--r--dev-php/php/files/digest-php-4.3.11-r12
-rw-r--r--dev-php/php/files/digest-php-4.3.11-r24
-rw-r--r--dev-php/php/files/digest-php-4.4.04
-rw-r--r--dev-php/php/files/digest-php-4.4.0-r14
-rw-r--r--dev-php/php/files/digest-php-4.4.0-r24
-rw-r--r--dev-php/php/files/libmbfl-headers.patch11
-rw-r--r--dev-php/php/files/php4.3.11-fopen_wrappers.patch46
-rw-r--r--dev-php/php/files/php4.3.11-gd_safe_mode.patch39
-rw-r--r--dev-php/php/files/php4.3.11-pspell-ext-segf.patch317
-rw-r--r--dev-php/php/files/php4.3.11-session_save_path-segf.patch154
-rw-r--r--dev-php/php/files/php4.4.0-fopen_wrappers.patch46
-rw-r--r--dev-php/php/files/php4.4.0-gd_safe_mode.patch20
-rw-r--r--dev-php/php/files/php4.4.0-pspell-ext-segf.patch317
-rw-r--r--dev-php/php/files/php4.4.0-session_save_path-segf.patch127
-rw-r--r--dev-php/php/files/stdint.diff11
-rw-r--r--dev-php/php/php-4.3.11-r1.ebuild20
-rw-r--r--dev-php/php/php-4.3.11-r2.ebuild83
-rw-r--r--dev-php/php/php-4.3.11.ebuild8
-rw-r--r--dev-php/php/php-4.4.0-r1.ebuild16
-rw-r--r--dev-php/php/php-4.4.0-r2.ebuild77
-rw-r--r--dev-php/php/php-4.4.0.ebuild4
24 files changed, 1302 insertions, 74 deletions
diff --git a/dev-php/php/ChangeLog b/dev-php/php/ChangeLog
index 1b44d6c279ee..3bf7ef81a868 100644
--- a/dev-php/php/ChangeLog
+++ b/dev-php/php/ChangeLog
@@ -1,6 +1,22 @@
# ChangeLog for dev-php/php
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-php/php/ChangeLog,v 1.195 2005/10/02 13:57:26 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/php/ChangeLog,v 1.196 2005/10/29 22:16:13 chtekk Exp $
+
+*php-4.4.0-r2 (29 Oct 2005)
+*php-4.3.11-r2 (29 Oct 2005)
+
+ 29 Oct 2005; Luca Longinotti <chtekk@gentoo.org>
+ +files/php4.3.11-gd_safe_mode.patch,
+ +files/php4.3.11-pspell-ext-segf.patch,
+ +files/php4.3.11-session_save_path-segf.patch,
+ +files/php4.4.0-fopen_wrappers.patch, +files/php4.4.0-gd_safe_mode.patch,
+ -files/libmbfl-headers.patch, +files/php4.3.11-fopen_wrappers.patch,
+ +files/php4.4.0-pspell-ext-segf.patch,
+ +files/php4.4.0-session_save_path-segf.patch, -files/stdint.diff,
+ php-4.3.11.ebuild, php-4.3.11-r1.ebuild, +php-4.3.11-r2.ebuild,
+ php-4.4.0.ebuild, php-4.4.0-r1.ebuild, +php-4.4.0-r2.ebuild:
+ Old-style PHP update: fix quotation of some vars, change URI of a mirror,
+ remove two unused patches and fix bugs #99312, #109669, #102943, #107602.
02 Oct 2005; Aron Griffis <agriffis@gentoo.org> php-4.4.0-r1.ebuild:
Mark 4.4.0-r1 stable on ia64
diff --git a/dev-php/php/Manifest b/dev-php/php/Manifest
index 9089c3ece77b..3ce71201629c 100644
--- a/dev-php/php/Manifest
+++ b/dev-php/php/Manifest
@@ -1,29 +1,29 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 7d4aa22887055dc44402c1c89228c586 ChangeLog 26618
-MD5 c3936dcc33eacdde589f42f0f28e4bd6 files/digest-php-4.3.11 213
-MD5 d1536bfe7ebf7dab5076fcd56b03250a files/digest-php-4.3.11-r1 290
-MD5 b3403a09e5d5fa394900b99ca6f63335 files/digest-php-4.4.0 211
-MD5 58cd61c7ae093d9e2b847d68e76b88a2 files/digest-php-4.4.0-r1 288
-MD5 522f94bfc40f65c2263785f960035875 files/libmbfl-headers.patch 309
+MD5 c1a27c2215058036b12a30e665df6da6 ChangeLog 27395
+MD5 289778209b2df87dbc5052351e604b1a files/digest-php-4.3.11 213
+MD5 a7b81d42cc56fdd6c72fbe2549dbe898 files/digest-php-4.3.11-r1 290
+MD5 a7b81d42cc56fdd6c72fbe2549dbe898 files/digest-php-4.3.11-r2 290
+MD5 f25bbe20f37a0eb83f7a57ca2c3a25e3 files/digest-php-4.4.0 211
+MD5 43c5b30a9e9bde68a44cf414341e32e8 files/digest-php-4.4.0-r1 288
+MD5 43c5b30a9e9bde68a44cf414341e32e8 files/digest-php-4.4.0-r2 288
MD5 cdec3284251432935f950c2d15a405b7 files/php-4.3.11-flash.patch 694
MD5 b2aa5952d5c805b3e57a5a6bf0f0b8d0 files/php-4.3.11-gmp.patch 925
MD5 7515e9b1dc298a0fb1c12d35a58c265d files/php-4.3.4-amd64hack.diff 1028
+MD5 cb36a386184ed6a887f62d2205f57173 files/php4.3.11-fopen_wrappers.patch 1481
+MD5 4db8e0b66cde22dd4e4d9f51e59f6098 files/php4.3.11-gd_safe_mode.patch 1573
MD5 47a031979331eeb527d0918d2c38cdbe files/php4.3.11-imap-symlink.diff 1238
MD5 a9b932952f12aa01a9f98a7fcbf32ed9 files/php4.3.11-pcre-security.patch 6031
+MD5 48d9c939434e9b01d0696410d59c503c files/php4.3.11-pspell-ext-segf.patch 8482
+MD5 17b906361a7ab8a3008446871623eeae files/php4.3.11-session_save_path-segf.patch 4938
+MD5 cb36a386184ed6a887f62d2205f57173 files/php4.4.0-fopen_wrappers.patch 1481
+MD5 a540c54ba22dc16b157edcf1ecb6258f files/php4.4.0-gd_safe_mode.patch 883
MD5 4c86d8ed96f2bb38b94e826c1f028c80 files/php4.4.0-imap-symlink.diff 1238
MD5 54a4ad0766f89185d7de2c6d07b07296 files/php4.4.0-pcre-security.patch 6177
-MD5 ad986b02a371b2fea3b4ae5060c9dc81 files/stdint.diff 358
+MD5 48d9c939434e9b01d0696410d59c503c files/php4.4.0-pspell-ext-segf.patch 8482
+MD5 83fb9efb602c178741ea2e40e13b014f files/php4.4.0-session_save_path-segf.patch 4132
MD5 38fe937e954ab7109395cefa86fcd2d4 metadata.xml 384
-MD5 2630de70f85b3e7115124be4489ad515 php-4.3.11-r1.ebuild 1947
-MD5 eaa1a899f214a9ad1a095e9f6a4f5fc5 php-4.3.11.ebuild 1214
-MD5 6c2b68141ee6ebe197a6f9296c0a9365 php-4.4.0-r1.ebuild 1811
-MD5 1832b7dad433181a1ea82028e176f098 php-4.4.0.ebuild 1080
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
-
-iD4DBQFDSLx+gIKl8Uu19MoRAlkkAJ95oq86rerma3XPiGiiOU9RXn0kvgCYwdfA
-KTwI7BwN1UHd8+HX9GXoDg==
-=55EK
------END PGP SIGNATURE-----
+MD5 13f16673a3322d2526c41304a92cb258 php-4.3.11-r1.ebuild 1971
+MD5 97a173f74e09115932bb77211bf0811a php-4.3.11-r2.ebuild 2542
+MD5 c726df49806f6e7c5df1af60e62c9393 php-4.3.11.ebuild 1220
+MD5 85507b461b039104ec28adcc96072bb9 php-4.4.0-r1.ebuild 1831
+MD5 001529d07933cef3c221786bc9d5b2c1 php-4.4.0-r2.ebuild 2401
+MD5 936cb97f05b9e214aa8840adcb11d090 php-4.4.0.ebuild 1082
diff --git a/dev-php/php/files/digest-php-4.3.11 b/dev-php/php/files/digest-php-4.3.11
index ee98e2095709..afa221c26709 100644
--- a/dev-php/php/files/digest-php-4.3.11
+++ b/dev-php/php/files/digest-php-4.3.11
@@ -1,3 +1,3 @@
+MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613
MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
-MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613
diff --git a/dev-php/php/files/digest-php-4.3.11-r1 b/dev-php/php/files/digest-php-4.3.11-r1
index 5bff16fceb06..252c3a932b24 100644
--- a/dev-php/php/files/digest-php-4.3.11-r1
+++ b/dev-php/php/files/digest-php-4.3.11-r1
@@ -1,4 +1,4 @@
+MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613
MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
-MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613
MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-php/php/files/digest-php-4.3.11-r2 b/dev-php/php/files/digest-php-4.3.11-r2
new file mode 100644
index 000000000000..252c3a932b24
--- /dev/null
+++ b/dev-php/php/files/digest-php-4.3.11-r2
@@ -0,0 +1,4 @@
+MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613
+MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575
+MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-php/php/files/digest-php-4.4.0 b/dev-php/php/files/digest-php-4.4.0
index 70d0e03a076c..413538df8e6b 100644
--- a/dev-php/php/files/digest-php-4.4.0
+++ b/dev-php/php/files/digest-php-4.4.0
@@ -1,3 +1,3 @@
-MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
-MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347
+MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
diff --git a/dev-php/php/files/digest-php-4.4.0-r1 b/dev-php/php/files/digest-php-4.4.0-r1
index 1471bf09112b..077ffb8eedda 100644
--- a/dev-php/php/files/digest-php-4.4.0-r1
+++ b/dev-php/php/files/digest-php-4.4.0-r1
@@ -1,4 +1,4 @@
-MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
-MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347
+MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-php/php/files/digest-php-4.4.0-r2 b/dev-php/php/files/digest-php-4.4.0-r2
new file mode 100644
index 000000000000..077ffb8eedda
--- /dev/null
+++ b/dev-php/php/files/digest-php-4.4.0-r2
@@ -0,0 +1,4 @@
+MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347
+MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
+MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619
diff --git a/dev-php/php/files/libmbfl-headers.patch b/dev-php/php/files/libmbfl-headers.patch
deleted file mode 100644
index cb1cd65f14ed..000000000000
--- a/dev-php/php/files/libmbfl-headers.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- scripts/Makefile.frag.old 2005-02-28 06:40:38.693990560 +0100
-+++ scripts/Makefile.frag 2005-02-28 06:40:51.610027024 +0100
-@@ -37,6 +37,8 @@
- ext/xml/ \
- ext/xml/expat/ \
- ext/mbstring/ \
-+ ext/mbstring/libmbfl/ \
-+ ext/mbstring/libmbfl/mbfl/ \
- ext/sqlite/libsqlite/src/sqlite.h
-
- install-headers:
diff --git a/dev-php/php/files/php4.3.11-fopen_wrappers.patch b/dev-php/php/files/php4.3.11-fopen_wrappers.patch
new file mode 100644
index 000000000000..672da5ece63b
--- /dev/null
+++ b/dev-php/php/files/php4.3.11-fopen_wrappers.patch
@@ -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-php/php/files/php4.3.11-gd_safe_mode.patch b/dev-php/php/files/php4.3.11-gd_safe_mode.patch
new file mode 100644
index 000000000000..19011120eea2
--- /dev/null
+++ b/dev-php/php/files/php4.3.11-gd_safe_mode.patch
@@ -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;
diff --git a/dev-php/php/files/php4.3.11-pspell-ext-segf.patch b/dev-php/php/files/php4.3.11-pspell-ext-segf.patch
new file mode 100644
index 000000000000..a62c42fec553
--- /dev/null
+++ b/dev-php/php/files/php4.3.11-pspell-ext-segf.patch
@@ -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-php/php/files/php4.3.11-session_save_path-segf.patch b/dev-php/php/files/php4.3.11-session_save_path-segf.patch
new file mode 100644
index 000000000000..3836776b14b4
--- /dev/null
+++ b/dev-php/php/files/php4.3.11-session_save_path-segf.patch
@@ -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-php/php/files/php4.4.0-fopen_wrappers.patch b/dev-php/php/files/php4.4.0-fopen_wrappers.patch
new file mode 100644
index 000000000000..672da5ece63b
--- /dev/null
+++ b/dev-php/php/files/php4.4.0-fopen_wrappers.patch
@@ -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-php/php/files/php4.4.0-gd_safe_mode.patch b/dev-php/php/files/php4.4.0-gd_safe_mode.patch
new file mode 100644
index 000000000000..1e0d49d1373c
--- /dev/null
+++ b/dev-php/php/files/php4.4.0-gd_safe_mode.patch
@@ -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;
+ }
diff --git a/dev-php/php/files/php4.4.0-pspell-ext-segf.patch b/dev-php/php/files/php4.4.0-pspell-ext-segf.patch
new file mode 100644
index 000000000000..a62c42fec553
--- /dev/null
+++ b/dev-php/php/files/php4.4.0-pspell-ext-segf.patch
@@ -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-php/php/files/php4.4.0-session_save_path-segf.patch b/dev-php/php/files/php4.4.0-session_save_path-segf.patch
new file mode 100644
index 000000000000..8f936ae5ec39
--- /dev/null
+++ b/dev-php/php/files/php4.4.0-session_save_path-segf.patch
@@ -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-php/php/files/stdint.diff b/dev-php/php/files/stdint.diff
deleted file mode 100644
index 451d7fb44cf3..000000000000
--- a/dev-php/php/files/stdint.diff
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nura php-4.3.10/Zend/zend_strtod.c php-4.3.10.stdint/Zend/zend_strtod.c
---- php-4.3.10/Zend/zend_strtod.c 2004-12-14 05:35:26.000000000 -0300
-+++ php-4.3.10.stdint/Zend/zend_strtod.c 2004-12-16 15:33:47.000000000 -0300
-@@ -128,6 +128,7 @@
- #endif
-
- #if defined(__sparc__) || defined(__ppc__)
-+#include <stdint.h>
- #define u_int32_t uint32_t
- #endif
-
diff --git a/dev-php/php/php-4.3.11-r1.ebuild b/dev-php/php/php-4.3.11-r1.ebuild
index 163b37671f02..1a1888fb439f 100644
--- a/dev-php/php/php-4.3.11-r1.ebuild
+++ b/dev-php/php/php-4.3.11-r1.ebuild
@@ -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-php/php/php-4.3.11-r1.ebuild,v 1.6 2005/09/27 02:47:28 weeve Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.3.11-r1.ebuild,v 1.7 2005/10/29 22:16:13 chtekk Exp $
PHPSAPI="cli"
inherit php-sapi eutils
@@ -11,32 +11,32 @@ KEYWORDS="alpha amd64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
IUSE=""
# 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"
src_unpack() {
php-sapi_src_unpack
- [ "${ARCH}" == "amd64" ] && epatch ${FILESDIR}/php-4.3.4-amd64hack.diff
+ [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff"
# Bug 88756
- use flash && epatch ${FILESDIR}/php-4.3.11-flash.patch
+ use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch"
# Bug 88795
- use gmp && epatch ${FILESDIR}/php-4.3.11-gmp.patch
+ use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch"
# fix imap symlink creation, bug #105351
- use imap && epatch ${FILESDIR}/php4.3.11-imap-symlink.diff
+ use imap && epatch "${FILESDIR}/php4.3.11-imap-symlink.diff"
# we need to unpack the files here, the eclass doesn't handle this
- cd ${WORKDIR}
+ cd "${WORKDIR}"
unpack php-pcrelib-new-secpatch.tar.bz2
- cd ${S}
+ cd "${S}"
# patch to fix PCRE library security issues, bug #102373
- epatch ${FILESDIR}/php4.3.11-pcre-security.patch
+ epatch "${FILESDIR}/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"
}
src_compile() {
diff --git a/dev-php/php/php-4.3.11-r2.ebuild b/dev-php/php/php-4.3.11-r2.ebuild
new file mode 100644
index 000000000000..450cd3ea9a62
--- /dev/null
+++ b/dev-php/php/php-4.3.11-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.3.11-r2.ebuild,v 1.1 2005/10/29 22:16:13 chtekk Exp $
+
+PHPSAPI="cli"
+inherit php-sapi eutils
+
+DESCRIPTION="PHP Shell Interpreter"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+src_unpack() {
+ php-sapi_src_unpack
+ [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff"
+
+ # Bug 88756
+ use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch"
+
+ # Bug 88795
+ use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch"
+
+ # fix imap symlink creation, bug #105351
+ use imap && epatch "${FILESDIR}/php4.3.11-imap-symlink.diff"
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/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}/php4.3.11-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/php4.3.11-fopen_wrappers.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/php4.3.11-session_save_path-segf.patch"
+
+ # we need to unpack the files here, the eclass doesn't handle this
+ cd "${WORKDIR}"
+ unpack php-pcrelib-new-secpatch.tar.bz2
+ cd "${S}"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/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"
+}
+
+src_compile() {
+ myconf="${myconf} \
+ --disable-cgi \
+ --enable-cli"
+
+ php-sapi_src_compile
+}
+
+
+src_install() {
+ PHP_INSTALLTARGETS="install"
+ php-sapi_src_install
+
+ einfo "Installing manpage"
+ doman sapi/cli/php.1
+}
+
+pkg_postinst() {
+ php-sapi_pkg_postinst
+ einfo "This is a CLI only build."
+ einfo "You cannot use it on a webserver."
+
+ if [ -f "${ROOT}/root/.pearrc" -a "`md5sum ${ROOT}/root/.pearrc`" = "f0243f51b2457bc545158cf066e4e7a2 ${ROOT}/root/.pearrc" ]; then
+ einfo "Cleaning up an old PEAR install glitch"
+ mv ${ROOT}/root/.pearrc ${ROOT}/root/.pearrc.`date +%Y%m%d%H%M%S`
+ fi
+}
diff --git a/dev-php/php/php-4.3.11.ebuild b/dev-php/php/php-4.3.11.ebuild
index 29187969957e..cca71b2de8e0 100644
--- a/dev-php/php/php-4.3.11.ebuild
+++ b/dev-php/php/php-4.3.11.ebuild
@@ -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-php/php/php-4.3.11.ebuild,v 1.13 2005/07/08 04:07:42 hardave Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.3.11.ebuild,v 1.14 2005/10/29 22:16:13 chtekk Exp $
PHPSAPI="cli"
inherit php-sapi eutils
@@ -12,13 +12,13 @@ IUSE=""
src_unpack() {
php-sapi_src_unpack
- [ "${ARCH}" == "amd64" ] && epatch ${FILESDIR}/php-4.3.4-amd64hack.diff
+ [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff"
# Bug 88756
- use flash && epatch ${FILESDIR}/php-4.3.11-flash.patch
+ use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch"
# Bug 88795
- use gmp && epatch ${FILESDIR}/php-4.3.11-gmp.patch
+ use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch"
}
src_compile() {
diff --git a/dev-php/php/php-4.4.0-r1.ebuild b/dev-php/php/php-4.4.0-r1.ebuild
index cf74dd07ae43..10f3405ea033 100644
--- a/dev-php/php/php-4.4.0-r1.ebuild
+++ b/dev-php/php/php-4.4.0-r1.ebuild
@@ -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-php/php/php-4.4.0-r1.ebuild,v 1.8 2005/10/09 06:43:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.4.0-r1.ebuild,v 1.9 2005/10/29 22:16:13 chtekk Exp $
PHPSAPI="cli"
inherit php-sapi eutils
@@ -11,26 +11,26 @@ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
IUSE=""
# 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"
src_unpack() {
php-sapi_src_unpack
- [ "${ARCH}" == "amd64" ] && epatch ${FILESDIR}/php-4.3.4-amd64hack.diff
+ [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff"
# fix imap symlink creation, bug #105351
- use imap && epatch ${FILESDIR}/php4.4.0-imap-symlink.diff
+ use imap && epatch "${FILESDIR}/php4.4.0-imap-symlink.diff"
# we need to unpack the files here, the eclass doesn't handle this
- cd ${WORKDIR}
+ cd "${WORKDIR}"
unpack php-pcrelib-new-secpatch.tar.bz2
- cd ${S}
+ cd "${S}"
# patch to fix PCRE library security issues, bug #102373
- epatch ${FILESDIR}/php4.4.0-pcre-security.patch
+ epatch "${FILESDIR}/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"
}
src_compile() {
diff --git a/dev-php/php/php-4.4.0-r2.ebuild b/dev-php/php/php-4.4.0-r2.ebuild
new file mode 100644
index 000000000000..9d210d3ca575
--- /dev/null
+++ b/dev-php/php/php-4.4.0-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.4.0-r2.ebuild,v 1.1 2005/10/29 22:16:13 chtekk Exp $
+
+PHPSAPI="cli"
+inherit php-sapi eutils
+
+DESCRIPTION="PHP Shell Interpreter"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+# fixed PCRE library for security issues, bug #102373
+SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2"
+
+src_unpack() {
+ php-sapi_src_unpack
+ [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff"
+
+ # fix imap symlink creation, bug #105351
+ use imap && epatch "${FILESDIR}/php4.4.0-imap-symlink.diff"
+
+ # patch to fix pspell extension, bug #99312 (new patch by upstream)
+ use spell && epatch "${FILESDIR}/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}/php4.4.0-gd_safe_mode.patch"
+ fi
+
+ # patch open_basedir directory bypass, bug #102943
+ epatch "${FILESDIR}/php4.4.0-fopen_wrappers.patch"
+
+ # patch to fix session.save_path segfault and other issues in
+ # the apache2handler SAPI, bug #107602
+ epatch "${FILESDIR}/php4.4.0-session_save_path-segf.patch"
+
+ # we need to unpack the files here, the eclass doesn't handle this
+ cd "${WORKDIR}"
+ unpack php-pcrelib-new-secpatch.tar.bz2
+ cd "${S}"
+
+ # patch to fix PCRE library security issues, bug #102373
+ epatch "${FILESDIR}/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"
+}
+
+src_compile() {
+ myconf="${myconf} \
+ --disable-cgi \
+ --enable-cli"
+
+ php-sapi_src_compile
+}
+
+
+src_install() {
+ PHP_INSTALLTARGETS="install"
+ php-sapi_src_install
+
+ einfo "Installing manpage"
+ doman sapi/cli/php.1
+}
+
+pkg_postinst() {
+ php-sapi_pkg_postinst
+ einfo "This is a CLI only build."
+ einfo "You cannot use it on a webserver."
+
+ if [ -f "${ROOT}/root/.pearrc" -a "`md5sum ${ROOT}/root/.pearrc`" = "f0243f51b2457bc545158cf066e4e7a2 ${ROOT}/root/.pearrc" ]; then
+ einfo "Cleaning up an old PEAR install glitch"
+ mv ${ROOT}/root/.pearrc ${ROOT}/root/.pearrc.`date +%Y%m%d%H%M%S`
+ fi
+}
diff --git a/dev-php/php/php-4.4.0.ebuild b/dev-php/php/php-4.4.0.ebuild
index 6a96e1c69793..3c0caba38675 100644
--- a/dev-php/php/php-4.4.0.ebuild
+++ b/dev-php/php/php-4.4.0.ebuild
@@ -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-php/php/php-4.4.0.ebuild,v 1.11 2005/08/16 04:07:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.4.0.ebuild,v 1.12 2005/10/29 22:16:13 chtekk Exp $
PHPSAPI="cli"
inherit php-sapi eutils
@@ -12,7 +12,7 @@ IUSE=""
src_unpack() {
php-sapi_src_unpack
- [ "${ARCH}" == "amd64" ] && epatch ${FILESDIR}/php-4.3.4-amd64hack.diff
+ [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff"
}
src_compile() {