Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 122723 Details for
Bug 180556
dev-lang/php Multiple issues (CVE-2007-{1887|1900|2756|2872})
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
php-overlay: svn diff (including important patches from php-cvs up to June 21th)
php-overlay-5.2.3.diff (text/plain), 139.05 KB, created by
Christian Hoffmann (RETIRED)
on 2007-06-21 19:44:00 UTC
(
hide
)
Description:
php-overlay: svn diff (including important patches from php-cvs up to June 21th)
Filename:
MIME Type:
Creator:
Christian Hoffmann (RETIRED)
Created:
2007-06-21 19:44:00 UTC
Size:
139.05 KB
patch
obsolete
>Index: patches/php-patches/5.2.2/opt/php5.2.2-concurrent_apache_modules.patch >=================================================================== >--- patches/php-patches/5.2.2/opt/php5.2.2-concurrent_apache_modules.patch (revision 1228) >+++ patches/php-patches/5.2.2/opt/php5.2.2-concurrent_apache_modules.patch (working copy) >@@ -1,57 +0,0 @@ >---- sapi/apache2handler/sapi_apache2.c 2006-06-26 12:23:36.000000000 +0200 >-+++ sapi/apache2handler/sapi_apache2.c 2006-06-26 12:23:50.000000000 +0200 >-@@ -59,8 +59,8 @@ >- */ >- #undef shutdown >- >--#define PHP_MAGIC_TYPE "application/x-httpd-php" >--#define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php-source" >-+#define PHP_MAGIC_TYPE "application/x-httpd-php5" >-+#define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php5-source" >- #define PHP_SCRIPT "php5-script" >- >- /* A way to specify the location of the php.ini dir in an apache directive */ >---- sapi/apache2handler/apache_config.c 2006-07-06 01:19:59.000000000 +0200 >-+++ sapi/apache2handler/apache_config.c 2006-07-06 01:20:21.000000000 +0200 >-@@ -178,11 +178,11 @@ >- >- const command_rec php_dir_cmds[] = >- { >-- AP_INIT_TAKE2("php_value", php_apache_value_handler, NULL, OR_OPTIONS, "PHP Value Modifier"), >-- AP_INIT_TAKE2("php_flag", php_apache_flag_handler, NULL, OR_OPTIONS, "PHP Flag Modifier"), >-- AP_INIT_TAKE2("php_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Value Modifier (Admin)"), >-- AP_INIT_TAKE2("php_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Flag Modifier (Admin)"), >-- AP_INIT_TAKE1("PHPINIDir", php_apache_phpini_set, NULL, RSRC_CONF, "Directory containing the php.ini file"), >-+ AP_INIT_TAKE2("php5_value", php_apache_value_handler, NULL, OR_OPTIONS, "PHP Value Modifier"), >-+ AP_INIT_TAKE2("php5_flag", php_apache_flag_handler, NULL, OR_OPTIONS, "PHP Flag Modifier"), >-+ AP_INIT_TAKE2("php5_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Value Modifier (Admin)"), >-+ AP_INIT_TAKE2("php5_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Flag Modifier (Admin)"), >-+ AP_INIT_TAKE1("PHP5INIDir", php_apache_phpini_set, NULL, RSRC_CONF, "Directory containing the php.ini file"), >- {NULL} >- }; >- >---- Zend/zend.h 2006-12-08 23:47:10.000000000 +0100 >-+++ Zend/zend.h 2006-12-08 23:48:02.000000000 +0100 >-@@ -101,6 +101,10 @@ >- # define RTLD_GLOBAL 0 >- # endif >- >-+extern void *dlvsym (void *__restrict __handle, >-+ __const char *__restrict __name, >-+ __const char *__restrict __version); >-+ >- # if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT) >- # define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT) >- # elif defined(RTLD_DEEPBIND) >-@@ -110,9 +114,9 @@ >- # endif >- # define DL_UNLOAD dlclose >- # if defined(DLSYM_NEEDS_UNDERSCORE) >--# define DL_FETCH_SYMBOL(h,s) dlsym((h), "_" s) >-+# define DL_FETCH_SYMBOL(h,s) dlvsym((h), "_" s, "PHP_5") >- # else >--# define DL_FETCH_SYMBOL dlsym >-+# define DL_FETCH_SYMBOL(h,s) dlvsym((h), s, "PHP_5") >- # endif >- # define DL_ERROR dlerror >- # define DL_HANDLE void * >Index: patches/php-patches/5.2.2/opt/php5.2.2-fastbuild.patch >=================================================================== >--- patches/php-patches/5.2.2/opt/php5.2.2-fastbuild.patch (revision 1228) >+++ patches/php-patches/5.2.2/opt/php5.2.2-fastbuild.patch (working copy) >@@ -1,246 +0,0 @@ >---- php-5.2.2/acinclude.m4 2007-03-25 12:21:02.000000000 +0200 >-+++ php-5.2.2-fastbuild/acinclude.m4 2007-05-04 15:02:45.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 >-@@ -966,12 +966,8 @@ >- if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then >- dnl ---------------------------------------------- CLI static module >- [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no >-- 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) >---- php-5.2.2/sapi/cgi/config9.m4 2007-02-20 21:11:11.000000000 +0100 >-+++ php-5.2.2-fastbuild/sapi/cgi/config9.m4 2007-05-04 15:03:17.000000000 +0200 >-@@ -50,86 +50,99 @@ >- PHP_ENABLE_PATHINFO_CHECK=yes >- ]) >- >--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) >-- >-- 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) >- >-+ 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 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 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 fastcgi support) >-- if test "$PHP_ENABLE_FASTCGI" = "yes"; then >-- PHP_FASTCGI=1 >-- PHP_FCGI_FILES="fastcgi.c" >-- PHP_FCGI_STATIC=1 >-- else >-- PHP_FASTCGI=0 >-- PHP_FCGI_FILES="" >-- 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, , '$(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/\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 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) >-+ if test "$PHP_ENABLE_FASTCGI" = "yes"; then >-+ PHP_FASTCGI=1 >-+ PHP_FCGI_FILES="fastcgi.c" >-+ PHP_FCGI_STATIC=1 >-+ else >-+ PHP_FASTCGI=0 >-+ PHP_FCGI_FILES="" >-+ 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-cgi\$(program_suffix)\$(EXEEXT)" >-+ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, , 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/\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)" >- ;; >-- *) >-- 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)" >-+ *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)" >- ;; >-- esac >-+ *) >-+ 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 >- >-- 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($SAPI_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 >---- php-5.2.2/sapi/cgi/Makefile.frag 2003-07-02 03:08:26.000000000 +0200 >-+++ php-5.2.2-fastbuild/sapi/cgi/Makefile.frag 2007-05-04 15:02:45.000000000 +0200 >-@@ -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) >---- php-5.2.2/configure.in 2007-05-03 01:05:13.000000000 +0200 >-+++ php-5.2.2-fastbuild/configure.in 2007-05-04 15:02:45.000000000 +0200 >-@@ -1300,20 +1300,20 @@ >- INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" >- CXXFLAGS="$CXXFLAGS $standard_libtool_flag" >- >--all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET)" >-+all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET) \$(PHP_CGI_TARGET)" >- install_targets="$install_modules install-build install-headers install-programs $install_pear" >- >--case $PHP_SAPI in >-- cgi) >-- install_targets="install-sapi $install_targets" >-- ;; >-- cli) >-- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" >-- ;; >-- *) >-- install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets" >-- ;; >--esac >-+if test "$PHP_SAPI_CGI" != "no" ; then >-+ install_targets="$PHP_INSTALL_CGI_TARGET $install_targets" >-+fi >-+ >-+if test "$PHP_SAPI_CLI" != "no" ; then >-+ install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" >-+fi >-+ >-+if test "$PHP_SAPI" != "default" ; then >-+ install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $PHP_INSTALL_CGI_TARGET $install_targets" >-+fi >- >- PHP_SUBST(all_targets) >- PHP_SUBST(install_targets) >Index: patches/php-patches/5.2.2/opt/php5.2.2-multilib-search-path.patch >=================================================================== >--- patches/php-patches/5.2.2/opt/php5.2.2-multilib-search-path.patch (revision 1228) >+++ patches/php-patches/5.2.2/opt/php5.2.2-multilib-search-path.patch (working copy) >@@ -1,133 +0,0 @@ >-diff -Nru php-5.2.1.orig/acinclude.m4 php-5.2.1/acinclude.m4 >---- php-5.2.1.orig/acinclude.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/acinclude.m4 2007-02-22 14:54:19.000000000 +0100 >-@@ -441,7 +441,7 @@ >- dnl Adds a path to linkpath/runpath (LDFLAGS) >- dnl >- AC_DEFUN([PHP_ADD_LIBPATH],[ >-- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then >-+ if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib" && test "$1" != "/usr/lib64"; then >- PHP_EXPAND_PATH($1, ai_p) >- ifelse([$2],,[ >- _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) >-@@ -1957,7 +1957,7 @@ >- dnl Search for the sendmail binary >- dnl >- AC_DEFUN([PHP_PROG_SENDMAIL], [ >-- PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib >-+ PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64 >- AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) >- if test -n "$PROG_SENDMAIL"; then >- AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) >-diff -Nru php-5.2.1.orig/ext/interbase/config.m4 php-5.2.1/ext/interbase/config.m4 >---- php-5.2.1.orig/ext/interbase/config.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/ext/interbase/config.m4 2007-02-22 14:54:19.000000000 +0100 >-@@ -12,7 +12,7 @@ >- IBASE_LIBDIR=/usr/interbase/lib >- else >- IBASE_INCDIR=$PHP_INTERBASE/include >-- IBASE_LIBDIR=$PHP_INTERBASE/lib >-+ IBASE_LIBDIR=$PHP_INTERBASE/$PHP_LIBDIR >- fi >- >- PHP_CHECK_LIBRARY(fbclient, isc_detach_database, >-diff -Nru php-5.2.1.orig/ext/mbstring/config.m4 php-5.2.1/ext/mbstring/config.m4 >---- php-5.2.1.orig/ext/mbstring/config.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/ext/mbstring/config.m4 2007-02-22 14:54:19.000000000 +0100 >-@@ -270,7 +270,7 @@ >- ],[ >- AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.]) >- ], [ >-- -LPHP_LIBMBFL/$PHP_LIBDIR >-+ -L$PHP_LIBMBFL/$PHP_LIBDIR >- ]) >- fi >- ]) >-diff -Nru php-5.2.1.orig/ext/odbc/config.m4 php-5.2.1/ext/odbc/config.m4 >---- php-5.2.1.orig/ext/odbc/config.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/ext/odbc/config.m4 2007-02-22 14:54:23.000000000 +0100 >-@@ -141,7 +141,7 @@ >- fi >- if test "$withval" != "no"; then >- PHP_ADD_INCLUDE($withval/incl) >-- PHP_ADD_LIBPATH($withval/lib) >-+ PHP_ADD_LIBPATH($withval/$PHP_LIBDIR) >- PHP_ADD_LIBRARY(sqlod) >- ODBC_TYPE=sapdb >- AC_DEFINE(HAVE_SAPDB,1,[ ]) >-@@ -439,7 +439,7 @@ >- withval=/usr/local >- fi >- if test "$withval" != "no"; then >-- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) >-+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/$PHP_LIBDIR) >- PHP_ADD_INCLUDE($withval/include, 1) >- ODBC_TYPE=iodbc >- ODBC_INCLUDE=-I$withval/include >-diff -Nru php-5.2.1.orig/ext/pdo_firebird/config.m4 php-5.2.1/ext/pdo_firebird/config.m4 >---- php-5.2.1.orig/ext/pdo_firebird/config.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/ext/pdo_firebird/config.m4 2007-02-22 14:54:23.000000000 +0100 >-@@ -14,7 +14,7 @@ >- FIREBIRD_LIBDIR=/opt/firebird/lib >- else >- FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include >-- FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/lib >-+ FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR >- fi >- >- PHP_CHECK_LIBRARY(fbclient, isc_detach_database, >-diff -Nru php-5.2.1.orig/ext/pdo_mysql/config.m4 php-5.2.1/ext/pdo_mysql/config.m4 >---- php-5.2.1.orig/ext/pdo_mysql/config.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/ext/pdo_mysql/config.m4 2007-02-22 14:54:23.000000000 +0100 >-@@ -78,10 +78,10 @@ >- else >- PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include >- fi >-- if test -r $PDO_MYSQL_DIR/lib/mysql; then >-- PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib/mysql >-+ if test -r $PDO_MYSQL_DIR/$PHP_LIBDIR/mysql; then >-+ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/$PHP_LIBDIR/mysql >- else >-- PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib >-+ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/$PHP_LIBDIR >- fi >- >- if test -r "$PDO_MYSQL_LIB_DIR"; then >-diff -Nru php-5.2.1.orig/ext/pdo_odbc/config.m4 php-5.2.1/ext/pdo_odbc/config.m4 >---- php-5.2.1.orig/ext/pdo_odbc/config.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/ext/pdo_odbc/config.m4 2007-02-22 14:54:23.000000000 +0100 >-@@ -99,7 +99,7 @@ >- >- if test -n "$pdo_odbc_dir"; then >- PDO_ODBC_INCDIR="$pdo_odbc_dir/include" >-- PDO_ODBC_LIBDIR="$pdo_odbc_dir/lib" >-+ PDO_ODBC_LIBDIR="$pdo_odbc_dir/$PHP_LIBDIR" >- else >- PDO_ODBC_INCDIR="$pdo_odbc_def_incdir" >- PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir" >-diff -Nru php-5.2.1.orig/ext/pdo_pgsql/config.m4 php-5.2.1/ext/pdo_pgsql/config.m4 >---- php-5.2.1.orig/ext/pdo_pgsql/config.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/ext/pdo_pgsql/config.m4 2007-02-22 14:54:23.000000000 +0100 >-@@ -46,7 +46,7 @@ >- fi >- done >- >-- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do >-+ for j in $PHP_LIBDIR $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do >- if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then >- PGSQL_LIBDIR=$i/$j >- fi >-diff -Nru php-5.2.1.orig/ext/snmp/config.m4 php-5.2.1/ext/snmp/config.m4 >---- php-5.2.1.orig/ext/snmp/config.m4 2007-02-22 14:53:49.000000000 +0100 >-+++ php-5.2.1/ext/snmp/config.m4 2007-02-22 14:54:25.000000000 +0100 >-@@ -45,8 +45,8 @@ >- test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp >- test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp >- done >-- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do >-- test -f $i/lib/libsnmp.a || test -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib >-+ for i in /usr/$PHP_LIBDIR /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do >-+ test -f $i/libsnmp.a || test -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i >- done >- else >- SNMP_INCDIR=$PHP_SNMP/include >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-filter_mail_regexp_fix.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-filter_mail_regexp_fix.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-filter_mail_regexp_fix.patch (working copy) >@@ -1,11 +0,0 @@ >---- ext/filter/logical_filters.c 2007/01/01 09:36:00 1.1.2.21 >-+++ ext/filter/logical_filters.c 2007/05/03 23:38:27 1.1.2.22 >-@@ -469,7 +469,7 @@ >- void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ >- { >- /* From http://cvs.php.net/co.php/pear/HTML_QuickForm/QuickForm/Rule/Email.php?r=1.4 */ >-- const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/"; >-+ const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/D"; >- >- pcre *re = NULL; >- pcre_extra *pcre_extra = NULL; >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-dba_config.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-dba_config.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-dba_config.patch (working copy) >@@ -1,11 +0,0 @@ >---- ext/dba/config.m4 2006-08-29 19:20:55.000000000 +0200 >-+++ ext/dba/config.m4 2006-08-29 19:21:22.000000000 +0200 >-@@ -463,7 +463,7 @@ >- >- AC_ARG_WITH(cdb, >- [ --with-cdb[=DIR] DBA: Include CDB support],[ >-- if test "$withval" = "yes" || test "$HAVE_DBA" = "1"; then >-+ if test "$withval" = "yes" && test "$HAVE_DBA" = "1"; then >- PHP_DBA_BUILTIN_CDB >- elif test "$withval" != "no"; then >- PHP_DBA_STD_BEGIN >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-wddx_array_serialize.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-wddx_array_serialize.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-wddx_array_serialize.patch (working copy) >@@ -1,12 +0,0 @@ >---- ext/wddx/wddx.c 2007/03/04 04:38:43 1.119.2.10.2.15 >-+++ ext/wddx/wddx.c 2007/05/05 15:14:56 1.119.2.10.2.16 >-@@ -984,6 +984,9 @@ >- goto bigint; >- } >- l = (long) d; >-+ if (l != d) { >-+ goto bigint; >-+ } >- case IS_LONG: >- zend_hash_index_update(target_hash, l, &ent1->data, sizeof(zval *), NULL); >- break; >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-mysqli-charsetphpini.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-mysqli-charsetphpini.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-mysqli-charsetphpini.patch (working copy) >@@ -1,76 +0,0 @@ >---- ext/mysqli/mysqli_api.c 2006-12-01 16:30:36.000000000 +0100 >-+++ ext/mysqli/mysqli_api.c 2006-12-01 16:39:32.000000000 +0100 >-@@ -1395,7 +1395,7 @@ >- PHP_FUNCTION(mysqli_real_connect) >- { >- MY_MYSQL *mysql; >-- char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL; >-+ char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL, *connect_charset=NULL; >- unsigned int hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0; >- unsigned long port=0, flags=0; >- zval *mysql_link; >-@@ -1436,6 +1436,12 @@ >- socket = MyG(default_socket); >- } >- >-+ connect_charset = MyG(connect_charset); >-+ >-+ if (connect_charset != NULL) { >-+ mysql_options(mysql->mysql, MYSQL_SET_CHARSET_NAME, connect_charset); >-+ } >-+ >- if (mysql_real_connect(mysql->mysql,hostname,username,passwd,dbname,port,socket,flags) == NULL) { >- php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql) TSRMLS_CC); >- php_mysqli_throw_sql_exception( mysql->mysql->net.sqlstate, mysql->mysql->net.last_errno TSRMLS_CC, >---- ext/mysqli/mysqli.c 2006-12-01 16:30:36.000000000 +0100 >-+++ ext/mysqli/mysqli.c 2006-12-01 16:38:01.000000000 +0100 >-@@ -459,6 +459,7 @@ >- STD_PHP_INI_ENTRY("mysqli.default_pw", NULL, PHP_INI_ALL, OnUpdateString, default_pw, zend_mysqli_globals, mysqli_globals) >- STD_PHP_INI_ENTRY("mysqli.default_port", "3306", PHP_INI_ALL, OnUpdateLong, default_port, zend_mysqli_globals, mysqli_globals) >- STD_PHP_INI_ENTRY("mysqli.default_socket", NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_socket, zend_mysqli_globals, mysqli_globals) >-+ STD_PHP_INI_ENTRY("mysqli.connect_charset", NULL, PHP_INI_ALL, OnUpdateString, connect_charset, zend_mysqli_globals, mysqli_globals) >- STD_PHP_INI_BOOLEAN("mysqli.reconnect", "0", PHP_INI_SYSTEM, OnUpdateLong, reconnect, zend_mysqli_globals, mysqli_globals) >- PHP_INI_END() >- >-@@ -475,6 +476,7 @@ >- mysqli_globals->default_user = NULL; >- mysqli_globals->default_pw = NULL; >- mysqli_globals->default_socket = NULL; >-+ mysqli_globals->connect_charset = NULL; >- mysqli_globals->reconnect = 0; >- mysqli_globals->report_mode = 0; >- mysqli_globals->report_ht = 0; >---- ext/mysqli/mysqli_nonapi.c 2006-12-01 16:30:36.000000000 +0100 >-+++ ext/mysqli/mysqli_nonapi.c 2006-12-01 16:40:29.000000000 +0100 >-@@ -36,7 +36,7 @@ >- MY_MYSQL *mysql; >- MYSQLI_RESOURCE *mysqli_resource; >- zval *object = getThis(); >-- char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL; >-+ char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL, *connect_charset=NULL; >- unsigned int hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0; >- long port=0; >- >-@@ -88,6 +88,12 @@ >- socket = MyG(default_socket); >- } >- >-+ connect_charset = MyG(connect_charset); >-+ >-+ if (connect_charset != NULL) { >-+ mysql_options(mysql->mysql, MYSQL_SET_CHARSET_NAME, connect_charset); >-+ } >-+ >- if (mysql_real_connect(mysql->mysql,hostname,username,passwd,dbname,port,socket,CLIENT_MULTI_RESULTS) == NULL) { >- /* Save error messages */ >- >---- ext/mysqli/php_mysqli.h 2006-12-01 16:30:36.000000000 +0100 >-+++ ext/mysqli/php_mysqli.h 2006-12-01 16:36:23.000000000 +0100 >-@@ -433,6 +433,7 @@ >- char *default_user; >- char *default_socket; >- char *default_pw; >-+ char *connect_charset; >- int reconnect; >- int strict; >- long error_no; >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-sqlite_CVE-2007-1887_improved.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-sqlite_CVE-2007-1887_improved.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-sqlite_CVE-2007-1887_improved.patch (working copy) >@@ -1,39 +0,0 @@ >---- ext/sqlite/sqlite.c 2007/03/06 02:17:13 1.166.2.13.2.7 >-+++ ext/sqlite/sqlite.c 2007/05/05 15:36:15 1.166.2.13.2.8 >-@@ -73,7 +73,7 @@ >- extern int sqlite_decode_binary(const unsigned char *in, unsigned char *out); >- >- #define php_sqlite_encode_binary(in, n, out) sqlite_encode_binary((const unsigned char *)in, n, (unsigned char *)out) >--#define php_sqlite_decode_binary(in, out) sqlite_decode_binary((const unsigned char *)in, (unsigned char *)out) >-+#define php_sqlite_decode_binary(in, out) in && *in ? sqlite_decode_binary((const unsigned char *)in, (unsigned char *)out) : 0 >- >- static int sqlite_count_elements(zval *object, long *count TSRMLS_DC); >- >-@@ -1133,7 +1133,7 @@ >- { >- php_info_print_table_start(); >- php_info_print_table_header(2, "SQLite support", "enabled"); >-- php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.13.2.7 2007/03/06 02:17:13 stas Exp $"); >-+ php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.13.2.8 2007/05/05 15:36:15 iliaa Exp $"); >- php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); >- php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); >- php_info_print_table_end(); >---- ext/sqlite/sess_sqlite.c 2007/01/01 09:36:07 1.18.2.1.2.1 >-+++ ext/sqlite/sess_sqlite.c 2007/05/05 15:36:15 1.18.2.1.2.2 >-@@ -110,9 +110,13 @@ >- case SQLITE_ROW: >- if (rowdata[0] != NULL) { >- *vallen = strlen(rowdata[0]); >-- *val = emalloc(*vallen); >-- *vallen = sqlite_decode_binary(rowdata[0], *val); >-- (*val)[*vallen] = '\0'; >-+ if (*vallen) { >-+ *val = emalloc(*vallen); >-+ *vallen = sqlite_decode_binary(rowdata[0], *val); >-+ (*val)[*vallen] = '\0'; >-+ } else { >-+ *val = STR_EMPTY_ALLOC(); >-+ } >- } >- break; >- default: >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-soap_array_minoccurs.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-soap_array_minoccurs.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-soap_array_minoccurs.patch (working copy) >@@ -1,26 +0,0 @@ >---- ext/soap/php_encoding.c 2007/05/02 17:24:16 1.103.2.21.2.32 >-+++ ext/soap/php_encoding.c 2007/05/04 06:19:34 1.103.2.21.2.33 >-@@ -1595,6 +1595,8 @@ >- property = xmlNewNode(NULL, BAD_CAST("BOGUS")); >- xmlAddChild(node, property); >- set_xsi_nil(property); >-+ } else if (Z_TYPE_P(data) == IS_NULL && model->min_occurs == 0) { >-+ return 1; >- } else { >- property = master_to_xml(enc, data, style, node); >- if (property->children && property->children->content && >-@@ -3356,8 +3358,12 @@ >- int i, count = zend_hash_num_elements(Z_ARRVAL_P(array)); >- >- zend_hash_internal_pointer_reset(Z_ARRVAL_P(array)); >-- for (i = 0;i < count;i++) { >-- if (zend_hash_get_current_key_type(Z_ARRVAL_P(array)) == HASH_KEY_IS_STRING) { >-+ for (i = 0; i < count; i++) { >-+ char *str_index; >-+ ulong num_index; >-+ >-+ if (zend_hash_get_current_key(Z_ARRVAL_P(array), &str_index, &num_index, 0) == HASH_KEY_IS_STRING || >-+ num_index != i) { >- return TRUE; >- } >- zend_hash_move_forward(Z_ARRVAL_P(array)); >Index: patches/php-patches/5.2.2/5.2.2/OUR_PATCHES >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/OUR_PATCHES (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/OUR_PATCHES (working copy) >@@ -1,5 +0,0 @@ >-OUR_PATCHES >-php5.2.2-dba_config.patch >-php5.2.2-mysql-charsetphpini.patch >-php5.2.2-mysqli-charsetphpini.patch >-php5.2.2-pdo_mysql-charsetphpini.patch >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-mysql-charsetphpini.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-mysql-charsetphpini.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-mysql-charsetphpini.patch (working copy) >@@ -1,74 +0,0 @@ >---- ext/mysql/php_mysql.c 2007-04-23 11:32:44.000000000 +0200 >-+++ ext/mysql/php_mysql.c 2007-05-04 15:49:37.000000000 +0200 >-@@ -354,6 +354,7 @@ >- PHP_INI_ENTRY("mysql.default_port", NULL, PHP_INI_ALL, OnMySQLPort) >- STD_PHP_INI_ENTRY("mysql.default_socket", NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_socket, zend_mysql_globals, mysql_globals) >- STD_PHP_INI_ENTRY("mysql.connect_timeout", "60", PHP_INI_ALL, OnUpdateLong, connect_timeout, zend_mysql_globals, mysql_globals) >-+ STD_PHP_INI_ENTRY("mysql.connect_charset", NULL, PHP_INI_ALL, OnUpdateString, connect_charset, zend_mysql_globals, mysql_globals) >- STD_PHP_INI_BOOLEAN("mysql.trace_mode", "0", PHP_INI_ALL, OnUpdateLong, trace_mode, zend_mysql_globals, mysql_globals) >- PHP_INI_END() >- /* }}} */ >-@@ -370,6 +371,7 @@ >- mysql_globals->connect_errno = 0; >- mysql_globals->connect_error = NULL; >- mysql_globals->connect_timeout = 0; >-+ mysql_globals->connect_charset = NULL; >- mysql_globals->trace_mode = 0; >- mysql_globals->result_allocated = 0; >- } >-@@ -480,6 +482,7 @@ >- static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) >- { >- char *user=NULL, *passwd=NULL, *host_and_port=NULL, *socket=NULL, *tmp=NULL, *host=NULL; >-+ char *connect_charset=NULL; >- char *hashed_details=NULL; >- int hashed_details_length, port = MYSQL_PORT; >- int client_flags = 0; >-@@ -493,6 +496,7 @@ >- >- >- connect_timeout = MySG(connect_timeout); >-+ connect_charset = MySG(connect_charset); >- >- socket = MySG(default_socket); >- >-@@ -673,6 +677,9 @@ >- mysql_options(&mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout); >- } >- >-+ if (connect_charset != NULL) >-+ mysql_options(&mysql->conn, MYSQL_SET_CHARSET_NAME, connect_charset); >-+ >- if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) { >- #else >- if (mysql_connect(&mysql->conn, host, user, passwd)==NULL) { >-@@ -717,6 +724,9 @@ >- signal(SIGPIPE, handler); >- #endif /* end mysql_ping */ >- #if MYSQL_VERSION_ID > 32199 /* this lets us set the port number */ >-+ if (connect_charset != NULL) >-+ mysql_options(le->ptr, MYSQL_SET_CHARSET_NAME, connect_charset); >-+ >- if (mysql_real_connect(le->ptr, host, user, passwd, NULL, port, socket, client_flags)==NULL) { >- #else >- if (mysql_connect(le->ptr, host, user, passwd)==NULL) { >-@@ -779,6 +789,9 @@ >- mysql_options(&mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout); >- } >- >-+ if (connect_charset != NULL) >-+ mysql_options(&mysql->conn, MYSQL_SET_CHARSET_NAME, connect_charset); >-+ >- if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) { >- #else >- if (mysql_connect(&mysql->conn, host, user, passwd)==NULL) { >---- ext/mysql/php_mysql.h 2006-12-01 12:33:54.000000000 +0100 >-+++ ext/mysql/php_mysql.h 2006-12-01 16:24:25.000000000 +0100 >-@@ -100,6 +100,7 @@ >- long default_port; >- char *default_host, *default_user, *default_password; >- char *default_socket; >-+ char *connect_charset; >- char *connect_error; >- long connect_errno; >- long connect_timeout; >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-Zend_this_alter_this.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-Zend_this_alter_this.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-Zend_this_alter_this.patch (working copy) >@@ -1,22 +0,0 @@ >---- Zend/zend_compile.c 2007/05/02 17:24:15 1.647.2.27.2.37 >-+++ Zend/zend_compile.c 2007/05/04 06:18:53 1.647.2.27.2.38 >-@@ -1265,9 +1265,18 @@ >- >- void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initialization, znode *class_type, znode *varname, zend_uchar pass_by_reference TSRMLS_DC) >- { >-- zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); >-+ zend_op *opline; >- zend_arg_info *cur_arg_info; >- >-+ if (CG(active_op_array)->scope && >-+ ((CG(active_op_array)->fn_flags & ZEND_ACC_STATIC) == 0) && >-+ (Z_TYPE(varname->u.constant) == IS_STRING) && >-+ (Z_STRLEN(varname->u.constant) == sizeof("this")-1) && >-+ (memcmp(Z_STRVAL(varname->u.constant), "this", sizeof("this")) == 0)) { >-+ zend_error(E_COMPILE_ERROR, "Cannot re-assign $this"); >-+ } >-+ >-+ opline = get_next_op(CG(active_op_array) TSRMLS_CC); >- CG(active_op_array)->num_args++; >- opline->opcode = op; >- opline->result = *var; >Index: patches/php-patches/5.2.2/5.2.2/php5.2.2-pdo_mysql-charsetphpini.patch >=================================================================== >--- patches/php-patches/5.2.2/5.2.2/php5.2.2-pdo_mysql-charsetphpini.patch (revision 1228) >+++ patches/php-patches/5.2.2/5.2.2/php5.2.2-pdo_mysql-charsetphpini.patch (working copy) >@@ -1,111 +0,0 @@ >---- ext/pdo_mysql/mysql_driver.c 2006-12-02 17:26:53.000000000 +0100 >-+++ ext/pdo_mysql/mysql_driver.c 2006-12-02 17:27:12.000000000 +0100 >-@@ -436,6 +436,7 @@ >- pdo_mysql_db_handle *H; >- int i, ret = 0; >- char *host = NULL, *unix_socket = NULL; >-+ char *connect_charset = NULL; >- unsigned int port = 3306; >- char *dbname; >- struct pdo_data_src_parser vars[] = { >-@@ -546,6 +547,13 @@ >- if (vars[2].optval && !strcmp("localhost", vars[2].optval)) { >- unix_socket = vars[4].optval; >- } >-+ >-+ connect_charset = PDOMYSQLG(connect_charset); >-+ >-+ if (connect_charset != NULL) { >-+ mysql_options(H->server, MYSQL_SET_CHARSET_NAME, connect_charset); >-+ } >-+ >- if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, connect_opts) == NULL) { >- pdo_mysql_error(dbh); >- goto cleanup; >---- ext/pdo_mysql/pdo_mysql.c 2006-12-02 17:26:53.000000000 +0100 >-+++ ext/pdo_mysql/pdo_mysql.c 2006-12-02 17:27:12.000000000 +0100 >-@@ -30,6 +30,9 @@ >- #include "php_pdo_mysql.h" >- #include "php_pdo_mysql_int.h" >- >-+ZEND_DECLARE_MODULE_GLOBALS(pdo_mysql) >-+static PHP_GINIT_FUNCTION(pdo_mysql); >-+ >- /* {{{ pdo_mysql_functions[] */ >- zend_function_entry pdo_mysql_functions[] = { >- {NULL, NULL, NULL} >-@@ -61,7 +64,11 @@ >- NULL, >- PHP_MINFO(pdo_mysql), >- "1.0.2", >-- STANDARD_MODULE_PROPERTIES >-+ PHP_MODULE_GLOBALS(pdo_mysql), >-+ PHP_GINIT(pdo_mysql), >-+ NULL, >-+ NULL, >-+ STANDARD_MODULE_PROPERTIES_EX >- }; >- /* }}} */ >- >-@@ -69,12 +76,23 @@ >- ZEND_GET_MODULE(pdo_mysql) >- #endif >- >-+PHP_INI_BEGIN() >-+ STD_PHP_INI_ENTRY("pdo_mysql.connect_charset", NULL, PHP_INI_ALL, OnUpdateString, connect_charset, zend_pdo_mysql_globals, pdo_mysql_globals) >-+PHP_INI_END() >-+ >-+static PHP_GINIT_FUNCTION(pdo_mysql) >-+{ >-+ pdo_mysql_globals->connect_charset = NULL; >-+} >-+ >- /* true global environment */ >- >- /* {{{ PHP_MINIT_FUNCTION >- */ >- PHP_MINIT_FUNCTION(pdo_mysql) >- { >-+ REGISTER_INI_ENTRIES(); >-+ >- REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_USE_BUFFERED_QUERY", (long)PDO_MYSQL_ATTR_USE_BUFFERED_QUERY); >- REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_LOCAL_INFILE", (long)PDO_MYSQL_ATTR_LOCAL_INFILE); >- REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_INIT_COMMAND", (long)PDO_MYSQL_ATTR_INIT_COMMAND); >-@@ -91,6 +109,7 @@ >- */ >- PHP_MSHUTDOWN_FUNCTION(pdo_mysql) >- { >-+ UNREGISTER_INI_ENTRIES(); >- php_pdo_unregister_driver(&pdo_mysql_driver); >- return SUCCESS; >- } >-@@ -103,6 +122,8 @@ >- php_info_print_table_start(); >- php_info_print_table_header(2, "PDO Driver for MySQL, client library version", mysql_get_client_info()); >- php_info_print_table_end(); >-+ >-+ DISPLAY_INI_ENTRIES(); >- } >- /* }}} */ >- >---- ext/pdo_mysql/php_pdo_mysql.h 2006-12-02 17:26:53.000000000 +0100 >-+++ ext/pdo_mysql/php_pdo_mysql.h 2006-12-02 17:28:49.000000000 +0100 >-@@ -40,6 +40,18 @@ >- PHP_RSHUTDOWN_FUNCTION(pdo_mysql); >- PHP_MINFO_FUNCTION(pdo_mysql); >- >-+ZEND_BEGIN_MODULE_GLOBALS(pdo_mysql) >-+ char *connect_charset; >-+ZEND_END_MODULE_GLOBALS(pdo_mysql) >-+ >-+#ifdef ZTS >-+# define PDOMYSQLG(v) TSRMG(pdo_mysql_globals_id, zend_pdo_mysql_globals *, v) >-+#else >-+# define PDOMYSQLG(v) (pdo_mysql_globals.v) >-+#endif >-+ >-+ZEND_EXTERN_MODULE_GLOBALS(pdo_mysql) >-+ >- #endif /* PHP_PDO_MYSQL_H */ >- >- >Index: patches/php-patches/5.2.2/php5/php5-with-iodbc.patch >=================================================================== >--- patches/php-patches/5.2.2/php5/php5-with-iodbc.patch (revision 1228) >+++ patches/php-patches/5.2.2/php5/php5-with-iodbc.patch (working copy) >@@ -1,13 +0,0 @@ >---- 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 >Index: patches/php-patches/5.2.2/php5/php5-imap-symlink.patch >=================================================================== >--- patches/php-patches/5.2.2/php5/php5-imap-symlink.patch (revision 1228) >+++ patches/php-patches/5.2.2/php5/php5-imap-symlink.patch (working copy) >@@ -1,15 +0,0 @@ >---- ext/imap/config.m4 2006-10-21 21:25:24.000000000 +0200 >-+++ ext/imap/config.m4 2006-10-21 21:26:15.000000000 +0200 >-@@ -192,12 +192,6 @@ >- AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) >- fi >- >-- if test -r "$IMAP_DIR/c-client/c-client.a"; then >-- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 >-- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then >-- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 >-- fi >-- >- for lib in c-client4 c-client imap; do >- IMAP_LIB=$lib >- IMAP_LIB_CHK($PHP_LIBDIR) >Index: patches/php-patches/5.2.2/php5/php5-make_test.patch >=================================================================== >--- patches/php-patches/5.2.2/php5/php5-make_test.patch (revision 1228) >+++ patches/php-patches/5.2.2/php5/php5-make_test.patch (working copy) >@@ -1,102 +0,0 @@ >---- run-tests.php 2007-05-02 17:41:06.000000000 +0200 >-+++ run-tests.php 2007-05-04 15:44:47.000000000 +0200 >-@@ -192,13 +192,13 @@ >- $info_params = array(); >- settings2array($ini_overwrites,$info_params); >- settings2params($info_params); >-- $php_info = `$php $pass_options $info_params "$info_file"`; >-+ $php_info = `$php -n $pass_options $info_params "$info_file"`; >- @unlink($info_file); >-- define('TESTED_PHP_VERSION', `$php -r "echo PHP_VERSION;"`); >-+ define('TESTED_PHP_VERSION', `$php -n -r "echo PHP_VERSION;"`); >- >- // load list of enabled extensions >- save_text($info_file, '<?php echo join(",",get_loaded_extensions()); ?>'); >-- $exts_to_test = explode(',',`$php $pass_options $info_params "$info_file"`); >-+ $exts_to_test = explode(',',`$php -n $pass_options $info_params "$info_file"`); >- // check for extensions that need special handling and regenerate >- $info_params_ex = array( >- 'session' => array('session.auto_start=0'), >-@@ -1047,13 +1047,10 @@ >- if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) { >- if (isset($php_cgi)) { >- $old_php = $php; >-- $php = $php_cgi .' -C '; >-+ $php = $php_cgi . ' -n -C '; >- } elseif (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) { >- $old_php = $php; >- $php = realpath(dirname($php) ."/php-cgi.exe") .' -C '; >-- } elseif (file_exists("./sapi/cgi/php")) { >-- $old_php = $php; >-- $php = realpath("./sapi/cgi/php") . ' -C '; >- } else { >- show_result("SKIP", $tested, $tested_file, "reason: CGI not available"); >- return 'SKIPPED'; >-@@ -1182,7 +1179,7 @@ >- } else { >- $env['USE_ZEND_ALLOC'] = '1'; >- } >-- $output = system_with_timeout("$extra $php -q $ini_settings $test_skipif", $env); >-+ $output = system_with_timeout("$extra $php -n -q $ini_settings $test_skipif", $env); >- if (!$cfg['keep']['skip']) { >- @unlink($test_skipif); >- } >-@@ -1324,7 +1321,7 @@ >- return 'BORKED'; >- } >- save_text($tmp_post, $request); >-- $cmd = "$php$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; >-+ $cmd = "$php -n$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; >- } elseif (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { >- >- $post = trim($section_text['POST']); >-@@ -1335,7 +1332,7 @@ >- $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; >- $env['CONTENT_LENGTH'] = $content_length; >- >-- $cmd = "$php$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; >-+ $cmd = "$php -n$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; >- >- } else { >- >-@@ -1343,7 +1340,7 @@ >- $env['CONTENT_TYPE'] = ''; >- $env['CONTENT_LENGTH'] = ''; >- >-- $cmd = "$php$pass_options$ini_settings -f \"$test_file\" $args 2>&1"; >-+ $cmd = "$php -n$pass_options$ini_settings -f \"$test_file\" $args 2>&1"; >- } >- >- if ($leak_check) { >-@@ -1381,7 +1378,7 @@ >- settings2params($clean_params); >- $extra = substr(PHP_OS, 0, 3) !== "WIN" ? >- "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": ""; >-- system_with_timeout("$extra $php -q $clean_params $test_clean", $env); >-+ system_with_timeout("$extra $php -n -q $clean_params $test_clean", $env); >- } >- if (!$cfg['keep']['clean']) { >- @unlink($test_clean); >---- Makefile.global 2006-08-06 02:00:55.000000000 +0200 >-+++ Makefile.global 2006-08-06 02:02:35.000000000 +0200 >-@@ -70,16 +70,11 @@ >- install-su: install-pear >- >- test: all >-- -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ >-- TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ >-- TEST_PHP_SRCDIR=$(top_srcdir) \ >-+ -@if test ! -z "$(top_builddir)/php-cli" && test -x "$(top_builddir)/php-cli"; then \ >-+ TEST_PHP_EXECUTABLE="$(top_builddir)/php-cli" \ >-+ TEST_PHP_SRCDIR="$(top_srcdir)" \ >- CC="$(CC)" \ >-- $(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \ >-- elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \ >-- TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ >-- TEST_PHP_SRCDIR=$(top_srcdir) \ >-- CC="$(CC)" \ >-- $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \ >-+ "$(top_builddir)/php-cli" -n -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' "$(top_srcdir)/run-tests.php" $(TESTS); \ >- else \ >- echo "ERROR: Cannot run tests without CLI sapi."; \ >- fi >Index: patches/php-patches/5.2.2/php5/php5-prefork-peruser-itk.patch >=================================================================== >--- patches/php-patches/5.2.2/php5/php5-prefork-peruser-itk.patch (revision 1228) >+++ patches/php-patches/5.2.2/php5/php5-prefork-peruser-itk.patch (working copy) >@@ -1,22 +0,0 @@ >---- sapi/apache2filter/config.m4 2006-02-08 22:13:06.000000000 +0100 >-+++ sapi/apache2filter/config.m4 2006-02-08 22:14:05.000000000 +0100 >-@@ -115,7 +115,7 @@ >- ;; >- esac >- >-- if test "$APXS_MPM" != "prefork"; then >-+ if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then >- PHP_BUILD_THREAD_SAFE >- fi >- AC_MSG_RESULT(yes) >---- sapi/apache2handler/config.m4 2006-02-08 22:13:12.000000000 +0100 >-+++ sapi/apache2handler/config.m4 2006-02-08 22:14:43.000000000 +0100 >-@@ -114,7 +114,7 @@ >- ;; >- esac >- >-- if test "$APXS_MPM" != "prefork"; then >-+ if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then >- PHP_BUILD_THREAD_SAFE >- fi >- AC_MSG_RESULT(yes) >Index: patches/php-patches/5.2.2/php5/php5-iodbc-config.patch >=================================================================== >--- patches/php-patches/5.2.2/php5/php5-iodbc-config.patch (revision 1228) >+++ patches/php-patches/5.2.2/php5/php5-iodbc-config.patch (working copy) >@@ -1,14 +0,0 @@ >---- ext/odbc/config.m4 2006-10-21 21:25:24.000000000 +0200 >-+++ ext/odbc/config.m4 2006-10-21 21:32:18.000000000 +0200 >-@@ -440,9 +440,9 @@ >- fi >- if test "$withval" != "no"; then >- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/$PHP_LIBDIR) >-- PHP_ADD_INCLUDE($withval/include, 1) >-+ PHP_ADD_INCLUDE($withval/include/iodbc, 1) >- ODBC_TYPE=iodbc >-- ODBC_INCLUDE=-I$withval/include >-+ ODBC_INCLUDE=-I$withval/include/iodbc >- ODBC_LFLAGS=-L$withval/$PHP_LIBDIR >- ODBC_LIBS=-liodbc >- AC_DEFINE(HAVE_IODBC,1,[ ]) >Index: patches/php-patches/5.2.3/opt/php5.2.3-concurrent_apache_modules.patch >=================================================================== >--- patches/php-patches/5.2.3/opt/php5.2.3-concurrent_apache_modules.patch (revision 0) >+++ patches/php-patches/5.2.3/opt/php5.2.3-concurrent_apache_modules.patch (revision 0) >@@ -0,0 +1,57 @@ >+--- sapi/apache2handler/sapi_apache2.c 2006-06-26 12:23:36.000000000 +0200 >++++ sapi/apache2handler/sapi_apache2.c 2006-06-26 12:23:50.000000000 +0200 >+@@ -59,8 +59,8 @@ >+ */ >+ #undef shutdown >+ >+-#define PHP_MAGIC_TYPE "application/x-httpd-php" >+-#define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php-source" >++#define PHP_MAGIC_TYPE "application/x-httpd-php5" >++#define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php5-source" >+ #define PHP_SCRIPT "php5-script" >+ >+ /* A way to specify the location of the php.ini dir in an apache directive */ >+--- sapi/apache2handler/apache_config.c 2006-07-06 01:19:59.000000000 +0200 >++++ sapi/apache2handler/apache_config.c 2006-07-06 01:20:21.000000000 +0200 >+@@ -178,11 +178,11 @@ >+ >+ const command_rec php_dir_cmds[] = >+ { >+- AP_INIT_TAKE2("php_value", php_apache_value_handler, NULL, OR_OPTIONS, "PHP Value Modifier"), >+- AP_INIT_TAKE2("php_flag", php_apache_flag_handler, NULL, OR_OPTIONS, "PHP Flag Modifier"), >+- AP_INIT_TAKE2("php_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Value Modifier (Admin)"), >+- AP_INIT_TAKE2("php_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Flag Modifier (Admin)"), >+- AP_INIT_TAKE1("PHPINIDir", php_apache_phpini_set, NULL, RSRC_CONF, "Directory containing the php.ini file"), >++ AP_INIT_TAKE2("php5_value", php_apache_value_handler, NULL, OR_OPTIONS, "PHP Value Modifier"), >++ AP_INIT_TAKE2("php5_flag", php_apache_flag_handler, NULL, OR_OPTIONS, "PHP Flag Modifier"), >++ AP_INIT_TAKE2("php5_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Value Modifier (Admin)"), >++ AP_INIT_TAKE2("php5_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Flag Modifier (Admin)"), >++ AP_INIT_TAKE1("PHP5INIDir", php_apache_phpini_set, NULL, RSRC_CONF, "Directory containing the php.ini file"), >+ {NULL} >+ }; >+ >+--- Zend/zend.h 2006-12-08 23:47:10.000000000 +0100 >++++ Zend/zend.h 2006-12-08 23:48:02.000000000 +0100 >+@@ -101,6 +101,10 @@ >+ # define RTLD_GLOBAL 0 >+ # endif >+ >++extern void *dlvsym (void *__restrict __handle, >++ __const char *__restrict __name, >++ __const char *__restrict __version); >++ >+ # if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT) >+ # define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT) >+ # elif defined(RTLD_DEEPBIND) >+@@ -110,9 +114,9 @@ >+ # endif >+ # define DL_UNLOAD dlclose >+ # if defined(DLSYM_NEEDS_UNDERSCORE) >+-# define DL_FETCH_SYMBOL(h,s) dlsym((h), "_" s) >++# define DL_FETCH_SYMBOL(h,s) dlvsym((h), "_" s, "PHP_5") >+ # else >+-# define DL_FETCH_SYMBOL dlsym >++# define DL_FETCH_SYMBOL(h,s) dlvsym((h), s, "PHP_5") >+ # endif >+ # define DL_ERROR dlerror >+ # define DL_HANDLE void * >Index: patches/php-patches/5.2.3/opt/php5.2.3-fastbuild.patch >=================================================================== >--- patches/php-patches/5.2.3/opt/php5.2.3-fastbuild.patch (revision 0) >+++ patches/php-patches/5.2.3/opt/php5.2.3-fastbuild.patch (revision 0) >@@ -0,0 +1,237 @@ >+diff -urd php-5.2.3/acinclude.m4 php-5.2.3-fastbuild/acinclude.m4 >+--- php-5.2.3/acinclude.m4 2007-06-09 11:44:40.000000000 +0200 >++++ php-5.2.3-fastbuild/acinclude.m4 2007-06-09 11:47:18.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 >+@@ -966,12 +966,8 @@ >+ if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then >+ dnl ---------------------------------------------- CLI static module >+ [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no >+- 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 -urd php-5.2.3/configure.in php-5.2.3-fastbuild/configure.in >+--- php-5.2.3/configure.in 2007-06-09 11:44:40.000000000 +0200 >++++ php-5.2.3-fastbuild/configure.in 2007-06-09 11:47:18.000000000 +0200 >+@@ -1294,17 +1294,20 @@ >+ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" >+ CXXFLAGS="$CXXFLAGS $standard_libtool_flag" >+ >+-all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET)" >++all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET) \$(PHP_CGI_TARGET)" >+ install_targets="$install_modules install-build install-headers install-programs $install_pear" >+ >+-case $PHP_SAPI in >+- cli) >+- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" >+- ;; >+- *) >+- install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets" >+- ;; >+-esac >++if test "$PHP_SAPI_CGI" != "no" ; then >++ install_targets="$PHP_INSTALL_CGI_TARGET $install_targets" >++fi >++ >++if test "$PHP_SAPI_CLI" != "no" ; then >++ install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" >++fi >++ >++if test "$PHP_SAPI" != "default" ; then >++ install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $PHP_INSTALL_CGI_TARGET $install_targets" >++fi >+ >+ PHP_SUBST(all_targets) >+ PHP_SUBST(install_targets) >+diff -urd php-5.2.3/sapi/cgi/config9.m4 php-5.2.3-fastbuild/sapi/cgi/config9.m4 >+--- php-5.2.3/sapi/cgi/config9.m4 2007-06-09 11:44:40.000000000 +0200 >++++ php-5.2.3-fastbuild/sapi/cgi/config9.m4 2007-06-09 11:47:18.000000000 +0200 >+@@ -50,83 +50,96 @@ >+ PHP_ENABLE_PATHINFO_CHECK=yes >+ ]) >+ >+-if test "$PHP_SAPI" = "default"; then >+- AC_MSG_CHECKING(for CGI build) >+- if test "$PHP_SAPI_CGI" != "no"; then >+- AC_MSG_RESULT(yes) >++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-cgi.exe >+- ;; >+- * ) >+- SAPI_CGI_PATH=sapi/cgi/php-cgi >+- ;; >+- esac >+- PHP_SUBST(SAPI_CGI_PATH) >++ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) >++ case $host_alias in >++ *cygwin* ) >++ SAPI_CGI_PATH=sapi/cgi/php-cgi.exe >++ ;; >++ * ) >++ SAPI_CGI_PATH=sapi/cgi/php-cgi >++ ;; >++ esac >++ PHP_SUBST(SAPI_CGI_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 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 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 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 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) >+- if test "$PHP_ENABLE_FASTCGI" = "yes"; then >+- PHP_FASTCGI=1 >+- PHP_FCGI_FILES="fastcgi.c" >+- else >+- PHP_FASTCGI=0 >+- PHP_FCGI_FILES="" >+- fi >+- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) >+- AC_MSG_RESULT($PHP_ENABLE_FASTCGI) >++ AC_MSG_CHECKING(whether to enable fastcgi support) >++ if test "$PHP_ENABLE_FASTCGI" = "yes"; then >++ PHP_FASTCGI=1 >++ PHP_FCGI_FILES="fastcgi.c" >++ else >++ PHP_FASTCGI=0 >++ PHP_FCGI_FILES="" >++ fi >++ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) >++ AC_MSG_RESULT($PHP_ENABLE_FASTCGI) >+ >+- INSTALL_IT="@echo \"Installing PHP CGI binary: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php-cgi\$(program_suffix)\$(EXEEXT)" >+- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, , '$(SAPI_CGI_PATH)') >++ INSTALL_CGI="@echo \"Installing PHP CGI binary: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php-cgi\$(program_suffix)\$(EXEEXT)" >++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, , 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_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\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)" >++ 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/\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)" >+ ;; >+- *) >+- 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)" >++ *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)" >+ ;; >+- esac >++ *) >++ 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 >+ >+- 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($SAPI_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 -urd php-5.2.3/sapi/cgi/Makefile.frag php-5.2.3-fastbuild/sapi/cgi/Makefile.frag >+--- php-5.2.3/sapi/cgi/Makefile.frag 2007-06-09 11:44:40.000000000 +0200 >++++ php-5.2.3-fastbuild/sapi/cgi/Makefile.frag 2007-06-09 11:47:18.000000000 +0200 >+@@ -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) >Index: patches/php-patches/5.2.3/opt/php5.2.3-multilib-search-path.patch >=================================================================== >--- patches/php-patches/5.2.3/opt/php5.2.3-multilib-search-path.patch (revision 0) >+++ patches/php-patches/5.2.3/opt/php5.2.3-multilib-search-path.patch (revision 0) >@@ -0,0 +1,133 @@ >+diff -u -r php-5.2.3-orig/acinclude.m4 php-5.2.3/acinclude.m4 >+--- php-5.2.3-orig/acinclude.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/acinclude.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -441,7 +441,7 @@ >+ dnl Adds a path to linkpath/runpath (LDFLAGS) >+ dnl >+ AC_DEFUN([PHP_ADD_LIBPATH],[ >+- if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then >++ if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib" && test "$1" != "/usr/lib64"; then >+ PHP_EXPAND_PATH($1, ai_p) >+ ifelse([$2],,[ >+ _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) >+@@ -1961,7 +1961,7 @@ >+ dnl Search for the sendmail binary >+ dnl >+ AC_DEFUN([PHP_PROG_SENDMAIL], [ >+- PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib >++ PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64 >+ AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) >+ if test -n "$PROG_SENDMAIL"; then >+ AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) >+diff -u -r php-5.2.3-orig/ext/interbase/config.m4 php-5.2.3/ext/interbase/config.m4 >+--- php-5.2.3-orig/ext/interbase/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/interbase/config.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -12,7 +12,7 @@ >+ IBASE_LIBDIR=/usr/interbase/lib >+ else >+ IBASE_INCDIR=$PHP_INTERBASE/include >+- IBASE_LIBDIR=$PHP_INTERBASE/lib >++ IBASE_LIBDIR=$PHP_INTERBASE/$PHP_LIBDIR >+ fi >+ >+ PHP_CHECK_LIBRARY(fbclient, isc_detach_database, >+diff -u -r php-5.2.3-orig/ext/mbstring/config.m4 php-5.2.3/ext/mbstring/config.m4 >+--- php-5.2.3-orig/ext/mbstring/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/mbstring/config.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -270,7 +270,7 @@ >+ ],[ >+ AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.]) >+ ], [ >+- -LPHP_LIBMBFL/$PHP_LIBDIR >++ -L$PHP_LIBMBFL/$PHP_LIBDIR >+ ]) >+ fi >+ ]) >+diff -u -r php-5.2.3-orig/ext/odbc/config.m4 php-5.2.3/ext/odbc/config.m4 >+--- php-5.2.3-orig/ext/odbc/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/odbc/config.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -141,7 +141,7 @@ >+ fi >+ if test "$withval" != "no"; then >+ PHP_ADD_INCLUDE($withval/incl) >+- PHP_ADD_LIBPATH($withval/lib) >++ PHP_ADD_LIBPATH($withval/$PHP_LIBDIR) >+ PHP_ADD_LIBRARY(sqlod) >+ ODBC_TYPE=sapdb >+ AC_DEFINE(HAVE_SAPDB,1,[ ]) >+@@ -439,7 +439,7 @@ >+ withval=/usr/local >+ fi >+ if test "$withval" != "no"; then >+- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib) >++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/$PHP_LIBDIR) >+ PHP_ADD_INCLUDE($withval/include, 1) >+ ODBC_TYPE=iodbc >+ ODBC_INCLUDE=-I$withval/include >+diff -u -r php-5.2.3-orig/ext/pdo_firebird/config.m4 php-5.2.3/ext/pdo_firebird/config.m4 >+--- php-5.2.3-orig/ext/pdo_firebird/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/pdo_firebird/config.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -14,7 +14,7 @@ >+ FIREBIRD_LIBDIR=/opt/firebird/lib >+ else >+ FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include >+- FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/lib >++ FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR >+ fi >+ >+ PHP_CHECK_LIBRARY(fbclient, isc_detach_database, >+diff -u -r php-5.2.3-orig/ext/pdo_mysql/config.m4 php-5.2.3/ext/pdo_mysql/config.m4 >+--- php-5.2.3-orig/ext/pdo_mysql/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/pdo_mysql/config.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -78,10 +78,10 @@ >+ else >+ PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include >+ fi >+- if test -r $PDO_MYSQL_DIR/lib/mysql; then >+- PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib/mysql >++ if test -r $PDO_MYSQL_DIR/$PHP_LIBDIR/mysql; then >++ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/$PHP_LIBDIR/mysql >+ else >+- PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/lib >++ PDO_MYSQL_LIB_DIR=$PDO_MYSQL_DIR/$PHP_LIBDIR >+ fi >+ >+ if test -r "$PDO_MYSQL_LIB_DIR"; then >+diff -u -r php-5.2.3-orig/ext/pdo_odbc/config.m4 php-5.2.3/ext/pdo_odbc/config.m4 >+--- php-5.2.3-orig/ext/pdo_odbc/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/pdo_odbc/config.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -99,7 +99,7 @@ >+ >+ if test -n "$pdo_odbc_dir"; then >+ PDO_ODBC_INCDIR="$pdo_odbc_dir/include" >+- PDO_ODBC_LIBDIR="$pdo_odbc_dir/lib" >++ PDO_ODBC_LIBDIR="$pdo_odbc_dir/$PHP_LIBDIR" >+ else >+ PDO_ODBC_INCDIR="$pdo_odbc_def_incdir" >+ PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir" >+diff -u -r php-5.2.3-orig/ext/pdo_pgsql/config.m4 php-5.2.3/ext/pdo_pgsql/config.m4 >+--- php-5.2.3-orig/ext/pdo_pgsql/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/pdo_pgsql/config.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -46,7 +46,7 @@ >+ fi >+ done >+ >+- for j in lib lib/pgsql lib/postgres lib/postgresql ""; do >++ for j in $PHP_LIBDIR $PHP_LIBDIR/pgsql $PHP_LIBDIR/postgres $PHP_LIBDIR/postgresql ""; do >+ if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then >+ PGSQL_LIBDIR=$i/$j >+ fi >+diff -u -r php-5.2.3-orig/ext/snmp/config.m4 php-5.2.3/ext/snmp/config.m4 >+--- php-5.2.3-orig/ext/snmp/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/snmp/config.m4 2007-06-09 10:51:28.000000000 +0200 >+@@ -45,8 +45,8 @@ >+ test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp >+ test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp >+ done >+- for i in /usr /usr/snmp /usr/local /usr/local/snmp; do >+- test -f $i/lib/libsnmp.a || test -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib >++ for i in /usr/$PHP_LIBDIR /usr/snmp/lib /usr/local/lib /usr/local/snmp/lib; do >++ test -f $i/libsnmp.a || test -f $i/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i >+ done >+ else >+ SNMP_INCDIR=$PHP_SNMP/include >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-pdo_mysql-charsetphpini.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-pdo_mysql-charsetphpini.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-pdo_mysql-charsetphpini.patch (revision 0) >@@ -0,0 +1,111 @@ >+--- ext/pdo_mysql/mysql_driver.c 2006-12-02 17:26:53.000000000 +0100 >++++ ext/pdo_mysql/mysql_driver.c 2006-12-02 17:27:12.000000000 +0100 >+@@ -436,6 +436,7 @@ >+ pdo_mysql_db_handle *H; >+ int i, ret = 0; >+ char *host = NULL, *unix_socket = NULL; >++ char *connect_charset = NULL; >+ unsigned int port = 3306; >+ char *dbname; >+ struct pdo_data_src_parser vars[] = { >+@@ -546,6 +547,13 @@ >+ if (vars[2].optval && !strcmp("localhost", vars[2].optval)) { >+ unix_socket = vars[4].optval; >+ } >++ >++ connect_charset = PDOMYSQLG(connect_charset); >++ >++ if (connect_charset != NULL) { >++ mysql_options(H->server, MYSQL_SET_CHARSET_NAME, connect_charset); >++ } >++ >+ if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, connect_opts) == NULL) { >+ pdo_mysql_error(dbh); >+ goto cleanup; >+--- ext/pdo_mysql/pdo_mysql.c 2006-12-02 17:26:53.000000000 +0100 >++++ ext/pdo_mysql/pdo_mysql.c 2006-12-02 17:27:12.000000000 +0100 >+@@ -30,6 +30,9 @@ >+ #include "php_pdo_mysql.h" >+ #include "php_pdo_mysql_int.h" >+ >++ZEND_DECLARE_MODULE_GLOBALS(pdo_mysql) >++static PHP_GINIT_FUNCTION(pdo_mysql); >++ >+ /* {{{ pdo_mysql_functions[] */ >+ zend_function_entry pdo_mysql_functions[] = { >+ {NULL, NULL, NULL} >+@@ -61,7 +64,11 @@ >+ NULL, >+ PHP_MINFO(pdo_mysql), >+ "1.0.2", >+- STANDARD_MODULE_PROPERTIES >++ PHP_MODULE_GLOBALS(pdo_mysql), >++ PHP_GINIT(pdo_mysql), >++ NULL, >++ NULL, >++ STANDARD_MODULE_PROPERTIES_EX >+ }; >+ /* }}} */ >+ >+@@ -69,12 +76,23 @@ >+ ZEND_GET_MODULE(pdo_mysql) >+ #endif >+ >++PHP_INI_BEGIN() >++ STD_PHP_INI_ENTRY("pdo_mysql.connect_charset", NULL, PHP_INI_ALL, OnUpdateString, connect_charset, zend_pdo_mysql_globals, pdo_mysql_globals) >++PHP_INI_END() >++ >++static PHP_GINIT_FUNCTION(pdo_mysql) >++{ >++ pdo_mysql_globals->connect_charset = NULL; >++} >++ >+ /* true global environment */ >+ >+ /* {{{ PHP_MINIT_FUNCTION >+ */ >+ PHP_MINIT_FUNCTION(pdo_mysql) >+ { >++ REGISTER_INI_ENTRIES(); >++ >+ REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_USE_BUFFERED_QUERY", (long)PDO_MYSQL_ATTR_USE_BUFFERED_QUERY); >+ REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_LOCAL_INFILE", (long)PDO_MYSQL_ATTR_LOCAL_INFILE); >+ REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_INIT_COMMAND", (long)PDO_MYSQL_ATTR_INIT_COMMAND); >+@@ -91,6 +109,7 @@ >+ */ >+ PHP_MSHUTDOWN_FUNCTION(pdo_mysql) >+ { >++ UNREGISTER_INI_ENTRIES(); >+ php_pdo_unregister_driver(&pdo_mysql_driver); >+ return SUCCESS; >+ } >+@@ -103,6 +122,8 @@ >+ php_info_print_table_start(); >+ php_info_print_table_header(2, "PDO Driver for MySQL, client library version", mysql_get_client_info()); >+ php_info_print_table_end(); >++ >++ DISPLAY_INI_ENTRIES(); >+ } >+ /* }}} */ >+ >+--- ext/pdo_mysql/php_pdo_mysql.h 2006-12-02 17:26:53.000000000 +0100 >++++ ext/pdo_mysql/php_pdo_mysql.h 2006-12-02 17:28:49.000000000 +0100 >+@@ -40,6 +40,18 @@ >+ PHP_RSHUTDOWN_FUNCTION(pdo_mysql); >+ PHP_MINFO_FUNCTION(pdo_mysql); >+ >++ZEND_BEGIN_MODULE_GLOBALS(pdo_mysql) >++ char *connect_charset; >++ZEND_END_MODULE_GLOBALS(pdo_mysql) >++ >++#ifdef ZTS >++# define PDOMYSQLG(v) TSRMG(pdo_mysql_globals_id, zend_pdo_mysql_globals *, v) >++#else >++# define PDOMYSQLG(v) (pdo_mysql_globals.v) >++#endif >++ >++ZEND_EXTERN_MODULE_GLOBALS(pdo_mysql) >++ >+ #endif /* PHP_PDO_MYSQL_H */ >+ >+ >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-ze2-segfault-object+switch.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-ze2-segfault-object+switch.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-ze2-segfault-object+switch.patch (revision 0) >@@ -0,0 +1,11 @@ >+--- Zend/zend_execute.c 2007/04/16 08:09:54 1.716.2.12.2.19 >++++ Zendzend_execute.c 2007/06/06 08:35:23 1.716.2.12.2.20 >+@@ -366,7 +366,7 @@ >+ * quick & silent get_zval_ptr, and FREE_OP >+ */ >+ PZVAL_UNLOCK_FREE(T->str_offset.str); >+- } else { >++ } else if (T(opline->op1.u.var).var.ptr) { >+ zval_ptr_dtor(&T(opline->op1.u.var).var.ptr); >+ if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { /* foreach() free */ >+ zval_ptr_dtor(&T(opline->op1.u.var).var.ptr); >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-gif-invalid-color-index-segfault.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-gif-invalid-color-index-segfault.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-gif-invalid-color-index-segfault.patch (revision 0) >@@ -0,0 +1,14 @@ >+--- ext/gd/libgd/gd_gif_in.c 2007/04/04 11:40:11 1.5.4.2.2.11 >++++ ext/gd/libgd/gd_gif_in.c 2007/06/07 21:07:33 1.5.4.2.2.12 >+@@ -586,7 +586,10 @@ >+ /* return; */ >+ /*} */ >+ >+- while ((v = LWZReadByte(fd, &sd, FALSE, c, ZeroDataBlockP)) >= 0 ) { >++ while ((v = LWZReadByte(fd, &sd, FALSE, c, ZeroDataBlockP)) >= 0) { >++ if (v >= gdMaxColors) { >++ v = 0; >++ } >+ /* This how we recognize which colors are actually used. */ >+ if (im->open[v]) { >+ im->open[v] = 0; >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-dba_config.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-dba_config.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-dba_config.patch (revision 0) >@@ -0,0 +1,13 @@ >+diff -ur php-5.2.3-orig/ext/dba/config.m4 php-5.2.3/ext/dba/config.m4 >+--- php-5.2.3-orig/ext/dba/config.m4 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/dba/config.m4 2007-06-09 12:26:05.000000000 +0200 >+@@ -468,7 +468,7 @@ >+ >+ AC_ARG_WITH(cdb, >+ [ --with-cdb[=DIR] DBA: Include CDB support],[ >+- if test "$withval" = "yes" || test "$HAVE_DBA" = "1"; then >++ if test "$withval" = "yes" && test "$HAVE_DBA" = "1"; then >+ PHP_DBA_BUILTIN_CDB >+ elif test "$withval" != "no"; then >+ PHP_DBA_STD_BEGIN >+Only in php-5.2.3/ext/dba: config.m4.orig >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-mysqli-infile-openbasedir.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-mysqli-infile-openbasedir.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-mysqli-infile-openbasedir.patch (revision 0) >@@ -0,0 +1,28 @@ >+--- ext/mysqli/mysqli_api.c 2007/03/08 22:49:53 1.118.2.22.2.11 >++++ ext/mysqli/mysqli_api.c 2007/06/18 21:51:32 1.118.2.22.2.12 >+@@ -1289,6 +1289,12 @@ >+ } >+ MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED); >+ >++ if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) { >++ if(mysql_option == MYSQL_OPT_LOCAL_INFILE) { >++ RETURN_FALSE; >++ } >++ } >++ >+ switch (Z_TYPE_PP(&mysql_value)) { >+ case IS_STRING: >+ ret = mysql_options(mysql->mysql, mysql_option, Z_STRVAL_PP(&mysql_value)); >+@@ -1427,9 +1433,9 @@ >+ MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED); >+ >+ /* remove some insecure options */ >+- flags ^= CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */ >+- if (PG(open_basedir) && strlen(PG(open_basedir))) { >+- flags ^= CLIENT_LOCAL_FILES; >++ flags &= ~CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */ >++ if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) { >++ flags &= ~CLIENT_LOCAL_FILES; >+ } >+ >+ if (!socket) { >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-mysqli-charsetphpini.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-mysqli-charsetphpini.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-mysqli-charsetphpini.patch (revision 0) >@@ -0,0 +1,76 @@ >+--- ext/mysqli/mysqli_api.c 2006-12-01 16:30:36.000000000 +0100 >++++ ext/mysqli/mysqli_api.c 2006-12-01 16:39:32.000000000 +0100 >+@@ -1395,7 +1395,7 @@ >+ PHP_FUNCTION(mysqli_real_connect) >+ { >+ MY_MYSQL *mysql; >+- char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL; >++ char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL, *connect_charset=NULL; >+ unsigned int hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0; >+ unsigned long port=0, flags=0; >+ zval *mysql_link; >+@@ -1436,6 +1436,12 @@ >+ socket = MyG(default_socket); >+ } >+ >++ connect_charset = MyG(connect_charset); >++ >++ if (connect_charset != NULL) { >++ mysql_options(mysql->mysql, MYSQL_SET_CHARSET_NAME, connect_charset); >++ } >++ >+ if (mysql_real_connect(mysql->mysql,hostname,username,passwd,dbname,port,socket,flags) == NULL) { >+ php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql) TSRMLS_CC); >+ php_mysqli_throw_sql_exception( mysql->mysql->net.sqlstate, mysql->mysql->net.last_errno TSRMLS_CC, >+--- ext/mysqli/mysqli.c 2006-12-01 16:30:36.000000000 +0100 >++++ ext/mysqli/mysqli.c 2006-12-01 16:38:01.000000000 +0100 >+@@ -459,6 +459,7 @@ >+ STD_PHP_INI_ENTRY("mysqli.default_pw", NULL, PHP_INI_ALL, OnUpdateString, default_pw, zend_mysqli_globals, mysqli_globals) >+ STD_PHP_INI_ENTRY("mysqli.default_port", "3306", PHP_INI_ALL, OnUpdateLong, default_port, zend_mysqli_globals, mysqli_globals) >+ STD_PHP_INI_ENTRY("mysqli.default_socket", NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_socket, zend_mysqli_globals, mysqli_globals) >++ STD_PHP_INI_ENTRY("mysqli.connect_charset", NULL, PHP_INI_ALL, OnUpdateString, connect_charset, zend_mysqli_globals, mysqli_globals) >+ STD_PHP_INI_BOOLEAN("mysqli.reconnect", "0", PHP_INI_SYSTEM, OnUpdateLong, reconnect, zend_mysqli_globals, mysqli_globals) >+ PHP_INI_END() >+ >+@@ -475,6 +476,7 @@ >+ mysqli_globals->default_user = NULL; >+ mysqli_globals->default_pw = NULL; >+ mysqli_globals->default_socket = NULL; >++ mysqli_globals->connect_charset = NULL; >+ mysqli_globals->reconnect = 0; >+ mysqli_globals->report_mode = 0; >+ mysqli_globals->report_ht = 0; >+--- ext/mysqli/mysqli_nonapi.c 2006-12-01 16:30:36.000000000 +0100 >++++ ext/mysqli/mysqli_nonapi.c 2006-12-01 16:40:29.000000000 +0100 >+@@ -36,7 +36,7 @@ >+ MY_MYSQL *mysql; >+ MYSQLI_RESOURCE *mysqli_resource; >+ zval *object = getThis(); >+- char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL; >++ char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL, *connect_charset=NULL; >+ unsigned int hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0; >+ long port=0; >+ >+@@ -88,6 +88,12 @@ >+ socket = MyG(default_socket); >+ } >+ >++ connect_charset = MyG(connect_charset); >++ >++ if (connect_charset != NULL) { >++ mysql_options(mysql->mysql, MYSQL_SET_CHARSET_NAME, connect_charset); >++ } >++ >+ if (mysql_real_connect(mysql->mysql,hostname,username,passwd,dbname,port,socket,CLIENT_MULTI_RESULTS) == NULL) { >+ /* Save error messages */ >+ >+--- ext/mysqli/php_mysqli.h 2006-12-01 16:30:36.000000000 +0100 >++++ ext/mysqli/php_mysqli.h 2006-12-01 16:36:23.000000000 +0100 >+@@ -433,6 +433,7 @@ >+ char *default_user; >+ char *default_socket; >+ char *default_pw; >++ char *connect_charset; >+ int reconnect; >+ int strict; >+ long error_no; >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-php_admin-vs-ini_set.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-php_admin-vs-ini_set.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-php_admin-vs-ini_set.patch (revision 0) >@@ -0,0 +1,13 @@ >+--- Zend/zend_ini.c 2007/04/16 08:09:54 1.39.2.2.2.8 >++++ Zend/zend_ini.c 2007/06/08 14:47:45 1.39.2.2.2.9 >+@@ -242,6 +242,10 @@ >+ >+ if (!(ini_entry->modifiable & modify_type)) { >+ return FAILURE; >++ } >++ >++ if (stage == ZEND_INI_STAGE_ACTIVATE && modify_type == ZEND_INI_SYSTEM) { >++ ini_entry->modifiable = ZEND_INI_SYSTEM; >+ } >+ >+ duplicate = estrndup(new_value, new_value_length); >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-better-image-dimension-checks.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-better-image-dimension-checks.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-better-image-dimension-checks.patch (revision 0) >@@ -0,0 +1,24 @@ >+--- ext/gd/gd.c 2007/05/22 10:22:49 1.312.2.20.2.26 >++++ ext/gd/gd.c 2007/06/02 15:38:09 1.312.2.20.2.27 >+@@ -1718,7 +1718,9 @@ >+ convert_to_long_ex(x_size); >+ convert_to_long_ex(y_size); >+ >+- if (Z_LVAL_PP(x_size) <= 0 || Z_LVAL_PP(y_size) <= 0) { >++ if (Z_LVAL_PP(x_size) <= 0 || Z_LVAL_PP(y_size) <= 0 || >++ Z_LVAL_PP(x_size) >= INT_MAX || Z_LVAL_PP(y_size) >= INT_MAX >++ ) { >+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid image dimensions"); >+ RETURN_FALSE; >+ } >+@@ -2326,7 +2328,9 @@ >+ convert_to_long_ex(x_size); >+ convert_to_long_ex(y_size); >+ >+- if (Z_LVAL_PP(x_size) <= 0 || Z_LVAL_PP(y_size) <= 0) { >++ if (Z_LVAL_PP(x_size) <= 0 || Z_LVAL_PP(y_size) <= 0 || >++ Z_LVAL_PP(x_size) >= INT_MAX || Z_LVAL_PP(y_size) >= INT_MAX >++ ) { >+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid image dimensions"); >+ RETURN_FALSE; >+ } >Index: patches/php-patches/5.2.3/5.2.3/PATCHES >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/PATCHES (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/PATCHES (revision 0) >@@ -0,0 +1,15 @@ >+php5.2.3-chunk_split-fix2.patch http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.58&r2=1.445.2.14.2.59 >+php5.2.3-gd-better-image-dimension-checks.patch http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.26&r2=1.312.2.20.2.27&pathrev=PHP_5_2 >+php5.2.3-gd-fix-integer-overflows.patch http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.28&r2=1.312.2.20.2.29&pathrev=PHP_5_2 http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.11&r2=1.90.2.1.2.12&pathrev=PHP_5_2 >+php5.2.3-gd-gif-invalid-color-index-segfault.patch http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.5.4.2.2.11&r2=1.5.4.2.2.12&pathrev=PHP_5_2 http://bugs.php.net/bug.php?id=41630 >+php5.2.3-mopb-02-2007-improvement.patch http://cvs.php.net/viewvc.cgi/php-src/main/php_variables.c?r1=1.104.2.10.2.8&r2=1.104.2.10.2.9&pathrev=PHP_5_2 >+php5.2.3-php_admin-vs-ini_set.patch http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2.2.8&r2=1.39.2.2.2.9&pathrev=PHP_5_2 http://bugs.php.net/bug.php?id=41561 >+php5.2.3-strripos-fix-segfault.patch http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.62&r2=1.445.2.14.2.63&pathrev=PHP_5_2 >+php5.2.3-ze2-segfault-object+switch.patch http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.19&r2=1.716.2.12.2.20&pathrev=PHP_5_2 http://bugs.php.net/bug.php?id=41608 >+php5.2.3-zip-addEmptyDir-fix-crash.patch http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.33&r2=1.1.2.34&pathrev=PHP_5_2 >+php5.2.3-glob-openbasedir-fix.patch http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.147.2.3.2.4&r2=1.147.2.3.2.5&pathrev=PHP_5_2 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.147.2.3.2.5&r2=1.147.2.3.2.6&pathrev=PHP_5_2 >+php5.2.3-session-urlencode-cookie-values.patch http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.36&r2=1.417.2.8.2.37&pathrev=PHP_5_2 >+php5.2.3-zend-ini-memory-interruption-vuln.patch http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2.2.9&r2=1.39.2.2.2.10&pathrev=PHP_5_2 >+php5.2.3-mysql-infile-openbasedir.patch http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.13&r2=1.213.2.6.2.14&pathrev=PHP_5_2 >+php5.2.3-mysqli-infile-openbasedir.patch http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.11&r2=1.118.2.22.2.12&pathrev=PHP_5_2 >+php5.2.3-pdo_mysql-infile-openbasedir.patch http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.59.2.13.2.4&r2=1.59.2.13.2.5&pathrev=PHP_5_2 >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-strripos-fix-segfault.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-strripos-fix-segfault.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-strripos-fix-segfault.patch (revision 0) >@@ -0,0 +1,27 @@ >+diff -ur php-5.2.3-orig/ext/standard/string.c php-5.2.3/ext/standard/string.c >+--- php-5.2.3-orig/ext/standard/string.c 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/standard/string.c 2007-06-09 16:24:49.000000000 +0200 >+@@ -1856,12 +1856,11 @@ >+ e = haystack + haystack_len - 1; >+ } else { >+ p = haystack; >+- if (-offset > haystack_len || -offset < 0) { >++ if (-offset > haystack_len || offset < -INT_MAX) { >+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string"); >+ RETURN_FALSE; >+- } else { >+- e = haystack + haystack_len + offset; >+ } >++ e = haystack + haystack_len + offset; >+ } >+ /* Borrow that ord_needle buffer to avoid repeatedly tolower()ing needle */ >+ *ord_needle = tolower(*needle); >+@@ -1889,7 +1888,7 @@ >+ p = haystack_dup + offset; >+ e = haystack_dup + haystack_len - needle_len; >+ } else { >+- if (-offset > haystack_len || -offset < 0) { >++ if (-offset > haystack_len || offset < -INT_MAX) { >+ efree(needle_dup); >+ efree(haystack_dup); >+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string"); >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-fix-simplexml-segfault-41582.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-fix-simplexml-segfault-41582.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-fix-simplexml-segfault-41582.patch (revision 0) >@@ -0,0 +1,51 @@ >+--- ext/simplexml/simplexml.c 2007/04/24 14:11:28 1.151.2.22.2.26 >++++ ext/simplexml/simplexml.c 2007/06/05 10:03:12 1.151.2.22.2.27 >+@@ -238,7 +238,7 @@ >+ >+ /* {{{ sxe_prop_dim_read() >+ */ >+-static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, zend_bool attribs, zend_bool silent TSRMLS_DC) >++static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, zend_bool attribs, int type TSRMLS_DC) >+ { >+ zval *return_value; >+ php_sxe_object *sxe; >+@@ -249,6 +249,12 @@ >+ int nodendx = 0; >+ int test = 0; >+ >++ if (!member) { >++ return_value = &EG(uninitialized_zval); >++ return_value->is_ref = 1; >++ return return_value; >++ } >++ >+ sxe = php_sxe_fetch_object(object TSRMLS_CC); >+ >+ if (Z_TYPE_P(member) == IS_LONG) { >+@@ -357,7 +363,7 @@ >+ */ >+ static zval * sxe_property_read(zval *object, zval *member, int type TSRMLS_DC) >+ { >+- return sxe_prop_dim_read(object, member, 1, 0, type == BP_VAR_IS TSRMLS_CC); >++ return sxe_prop_dim_read(object, member, 1, 0, type TSRMLS_CC); >+ } >+ /* }}} */ >+ >+@@ -365,7 +371,7 @@ >+ */ >+ static zval * sxe_dimension_read(zval *object, zval *offset, int type TSRMLS_DC) >+ { >+- return sxe_prop_dim_read(object, offset, 0, 1, 0 TSRMLS_CC); >++ return sxe_prop_dim_read(object, offset, 0, 1, type TSRMLS_CC); >+ } >+ /* }}} */ >+ >+@@ -2368,7 +2374,7 @@ >+ { >+ php_info_print_table_start(); >+ php_info_print_table_header(2, "Simplexml support", "enabled"); >+- php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.26 $"); >++ php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.27 $"); >+ php_info_print_table_row(2, "Schema support", >+ #ifdef LIBXML_SCHEMAS_ENABLED >+ "enabled"); >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-zip-addEmptyDir-fix-crash.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-zip-addEmptyDir-fix-crash.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-zip-addEmptyDir-fix-crash.patch (revision 0) >@@ -0,0 +1,67 @@ >+diff -ur php-5.2.3-orig/ext/zip/php_zip.c php-5.2.3/ext/zip/php_zip.c >+--- php-5.2.3-orig/ext/zip/php_zip.c 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/zip/php_zip.c 2007-06-09 14:59:11.000000000 +0200 >+@@ -120,7 +120,7 @@ >+ len = spprintf(&file_dirname_fullpath, 0, "%s", dest); >+ } >+ >+- php_basename(file, file_len, NULL, 0, &file_basename, (unsigned int *)&file_basename_len TSRMLS_CC); >++ php_basename(file, file_len, NULL, 0, &file_basename, (size_t *)&file_basename_len TSRMLS_CC); >+ >+ if (OPENBASEDIR_CHECKPATH(file_dirname_fullpath)) { >+ efree(file_dirname_fullpath); >+@@ -985,6 +985,9 @@ >+ zval *this = getThis(); >+ char *dirname; >+ int dirname_len; >++ int idx; >++ struct zip_stat sb; >++ char *s; >+ >+ if (!this) { >+ RETURN_FALSE; >+@@ -996,14 +999,40 @@ >+ &dirname, &dirname_len) == FAILURE) { >+ return; >+ } >++ >+ if (dirname_len<1) { >+ RETURN_FALSE; >+ } >+ >+- if (zip_add_dir(intern, (const char *)dirname) < 0) { >+- RETURN_FALSE; >++ if (dirname[dirname_len-1] != '/') { >++ s=(char *)emalloc(dirname_len+2); >++ strcpy(s, dirname); >++ s[dirname_len] = '/'; >++ s[dirname_len+1] = '\0'; >++ } else { >++ s = dirname; >++ } >++ >++ idx = zip_stat(intern, s, 0, &sb); >++ if (idx >= 0) { >++ RETVAL_FALSE; >++ } else { >++ /* reset the error */ >++ if (intern->error.str) { >++ _zip_error_fini(&intern->error); >++ } >++ _zip_error_init(&intern->error); >++ >++ if (zip_add_dir(intern, (const char *)s) == -1) { >++ RETVAL_FALSE; >++ } else { >++ RETVAL_TRUE; >++ } >++ } >++ >++ if (s != dirname) { >++ efree(s); >+ } >+- RETURN_TRUE; >+ } >+ /* }}} */ >+ >+ >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-chunk_split-fix2.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-chunk_split-fix2.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-chunk_split-fix2.patch (revision 0) >@@ -0,0 +1,26 @@ >+--- ext/standard/string.c 2007/05/30 00:33:13 1.445.2.14.2.58 >++++ ext/standard/string.c 2007/06/03 18:47:10 1.445.2.14.2.59 >+@@ -1956,18 +1956,20 @@ >+ char *p, *q; >+ int chunks; /* complete chunks! */ >+ int restlen; >+- int out_len; >++ float out_len; >+ >+ chunks = srclen / chunklen; >+ restlen = srclen - chunks * chunklen; /* srclen % chunklen */ >+ >+- out_len = (srclen + (chunks + 1) * endlen + 1); >++ out_len = chunks + 1; >++ out_len *= endlen; >++ out_len += srclen + 1; >+ >+ if (out_len > INT_MAX || out_len <= 0) { >+ return NULL; >+ } >+ >+- dest = safe_emalloc(out_len, sizeof(char), 0); >++ dest = safe_emalloc((int)out_len, sizeof(char), 0); >+ >+ for (p = src, q = dest; p < (src + srclen - chunklen + 1); ) { >+ memcpy(q, p, chunklen); >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-fix-integer-overflows.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-fix-integer-overflows.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-gd-fix-integer-overflows.patch (revision 0) >@@ -0,0 +1,100 @@ >+diff -ur php-5.2.3-orig/ext/gd/gd.c php-5.2.3/ext/gd/gd.c >+--- php-5.2.3-orig/ext/gd/gd.c 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/gd/gd.c 2007-06-09 14:52:38.000000000 +0200 >+@@ -1725,6 +1725,10 @@ >+ >+ im = gdImageCreateTrueColor(Z_LVAL_PP(x_size), Z_LVAL_PP(y_size)); >+ >++ if (!im) { >++ RETURN_FALSE; >++ } >++ >+ ZEND_REGISTER_RESOURCE(return_value, im, le_gd); >+ } >+ /* }}} */ >+@@ -2333,6 +2337,10 @@ >+ >+ im = gdImageCreate(Z_LVAL_PP(x_size), Z_LVAL_PP(y_size)); >+ >++ if (!im) { >++ RETURN_FALSE; >++ } >++ >+ ZEND_REGISTER_RESOURCE(return_value, im, le_gd); >+ } >+ /* }}} */ >+diff -ur php-5.2.3-orig/ext/gd/libgd/gd.c php-5.2.3/ext/gd/libgd/gd.c >+--- php-5.2.3-orig/ext/gd/libgd/gd.c 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/gd/libgd/gd.c 2007-06-09 14:52:38.000000000 +0200 >+@@ -120,6 +120,15 @@ >+ { >+ int i; >+ gdImagePtr im; >++ >++ if (overflow2(sx, sy)) { >++ return NULL; >++ } >++ >++ if (overflow2(sizeof(unsigned char *), sy)) { >++ return NULL; >++ } >++ >+ im = (gdImage *) gdMalloc(sizeof(gdImage)); >+ memset(im, 0, sizeof(gdImage)); >+ /* Row-major ever since gd 1.3 */ >+@@ -162,6 +171,19 @@ >+ { >+ int i; >+ gdImagePtr im; >++ >++ if (overflow2(sx, sy)) { >++ return NULL; >++ } >++ >++ if (overflow2(sizeof(unsigned char *), sy)) { >++ return NULL; >++ } >++ >++ if (overflow2(sizeof(int), sx)) { >++ return NULL; >++ } >++ >+ im = (gdImage *) gdMalloc(sizeof(gdImage)); >+ memset(im, 0, sizeof(gdImage)); >+ im->tpixels = (int **) gdMalloc(sizeof(int *) * sy); >+@@ -2404,6 +2426,14 @@ >+ int *stx, *sty; >+ /* We only need to use floating point to determine the correct stretch vector for one line's worth. */ >+ double accum; >++ >++ if (overflow2(sizeof(int), srcW)) { >++ return; >++ } >++ if (overflow2(sizeof(int), srcH)) { >++ return; >++ } >++ >+ stx = (int *) gdMalloc (sizeof (int) * srcW); >+ sty = (int *) gdMalloc (sizeof (int) * srcH); >+ accum = 0; >+@@ -3195,6 +3225,10 @@ >+ return; >+ } >+ >++ if (overflow2(sizeof(int), n)) { >++ return; >++ } >++ >+ if (c == gdAntiAliased) { >+ fill_color = im->AA_color; >+ } else { >+@@ -3209,6 +3243,9 @@ >+ while (im->polyAllocated < n) { >+ im->polyAllocated *= 2; >+ } >++ if (overflow2(sizeof(int), im->polyAllocated)) { >++ return; >++ } >+ im->polyInts = (int *) gdRealloc(im->polyInts, sizeof(int) * im->polyAllocated); >+ } >+ miny = p[0].y; >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-glob-openbasedir-fix.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-glob-openbasedir-fix.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-glob-openbasedir-fix.patch (revision 0) >@@ -0,0 +1,62 @@ >+diff -urN php-orig/ext/standard/dir.c php-5.2.3/ext/standard/dir.c >+--- php-orig/ext/standard/dir.c 2007-06-21 18:25:19.000000000 +0200 >++++ php-5.2.3/ext/standard/dir.c 2007-06-21 18:27:54.000000000 +0200 >+@@ -24,6 +24,7 @@ >+ #include "fopen_wrappers.h" >+ #include "file.h" >+ #include "php_dir.h" >++#include "php_string.h" >+ #include "php_scandir.h" >+ >+ #ifdef HAVE_DIRENT_H >+@@ -361,9 +362,9 @@ >+ Find pathnames matching a pattern */ >+ PHP_FUNCTION(glob) >+ { >+- char cwd[MAXPATHLEN]; >+ int cwd_skip = 0; >+ #ifdef ZTS >++ char cwd[MAXPATHLEN]; >+ char work_pattern[MAXPATHLEN]; >+ char *result; >+ #endif >+@@ -395,6 +396,22 @@ >+ } >+ #endif >+ >++ if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { >++ size_t base_len = php_dirname(pattern, strlen(pattern)); >++ char pos = pattern[base_len]; >++ >++ pattern[base_len] = '\0'; >++ >++ if (PG(safe_mode) && (!php_checkuid(pattern, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { >++ RETURN_FALSE; >++ } >++ if (php_check_open_basedir(pattern TSRMLS_CC)) { >++ RETURN_FALSE; >++ } >++ >++ pattern[base_len] = pos; >++ } >++ >+ globbuf.gl_offs = 0; >+ if (0 != (ret = glob(pattern, flags & GLOB_FLAGMASK, NULL, &globbuf))) { >+ #ifdef GLOB_NOMATCH >+@@ -420,16 +437,6 @@ >+ return; >+ } >+ >+- /* we assume that any glob pattern will match files from one directory only >+- so checking the dirname of the first match should be sufficient */ >+- strlcpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); >+- if (PG(safe_mode) && (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { >+- RETURN_FALSE; >+- } >+- if (php_check_open_basedir(cwd TSRMLS_CC)) { >+- RETURN_FALSE; >+- } >+- >+ array_init(return_value); >+ for (n = 0; n < globbuf.gl_pathc; n++) { >+ /* we need to do this everytime since GLOB_ONLYDIR does not guarantee that >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-cgi-missing-openbasedir-checks.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-cgi-missing-openbasedir-checks.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-cgi-missing-openbasedir-checks.patch (revision 0) >@@ -0,0 +1,35 @@ >+--- sapi/cgi/cgi_main.c 2007/05/28 08:11:59 1.267.2.15.2.40 >++++ sapi/cgi/cgi_main.c 2007/06/04 15:38:12 1.267.2.15.2.41 >+@@ -1682,7 +1682,9 @@ >+ */ >+ retval = FAILURE; >+ if (cgi || SG(request_info).path_translated) { >+- retval = php_fopen_primary_script(&file_handle TSRMLS_CC); >++ if (!php_check_open_basedir(SG(request_info).path_translated TSRMLS_CC)) { >++ retval = php_fopen_primary_script(&file_handle TSRMLS_CC); >++ } >+ } >+ /* >+ if we are unable to open path_translated and we are not >+@@ -1704,9 +1706,21 @@ >+ goto fastcgi_request_done; >+ } >+ #endif >++ >++ STR_FREE(SG(request_info).path_translated); >++ >++ if (free_query_string && SG(request_info).query_string) { >++ free(SG(request_info).query_string); >++ SG(request_info).query_string = NULL; >++ } >++ >+ php_request_shutdown((void *) 0); >+ SG(server_context) = NULL; >+ php_module_shutdown(TSRMLS_C); >++ sapi_shutdown(); >++#ifdef ZTS >++ tsrm_shutdown(); >++#endif >+ return FAILURE; >+ } >+ >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-mysql-infile-openbasedir.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-mysql-infile-openbasedir.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-mysql-infile-openbasedir.patch (revision 0) >@@ -0,0 +1,11 @@ >+--- ext/mysql/php_mysql.c 2007/06/07 12:17:35 1.213.2.6.2.13 >++++ ext/mysql/php_mysql.c 2007/06/18 21:51:32 1.213.2.6.2.14 >+@@ -603,7 +603,7 @@ >+ break; >+ } >+ /* disable local infile option for open_basedir */ >+- if (PG(open_basedir) && strlen(PG(open_basedir)) && (client_flags & CLIENT_LOCAL_FILES)) { >++ if (((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) && (client_flags & CLIENT_LOCAL_FILES)) { >+ client_flags ^= CLIENT_LOCAL_FILES; >+ } >+ >Index: patches/php-patches/5.2.3/5.2.3/OUR_PATCHES >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/OUR_PATCHES (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/OUR_PATCHES (revision 0) >@@ -0,0 +1,5 @@ >+OUR_PATCHES >+php5.2.2-dba_config.patch >+php5.2.2-mysql-charsetphpini.patch >+php5.2.2-mysqli-charsetphpini.patch >+php5.2.2-pdo_mysql-charsetphpini.patch >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-exif-memory-corruption.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-exif-memory-corruption.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-exif-memory-corruption.patch (revision 0) >@@ -0,0 +1,71 @@ >+--- ext/exif/exif.c 2007/02/27 03:04:40 1.173.2.5.2.19 >++++ ext/exif/exif.c 2007/06/10 20:12:45 1.173.2.5.2.20 >+@@ -3744,7 +3744,9 @@ >+ >+ if (ImageInfo->FileSize >= 2) { >+ php_stream_seek(ImageInfo->infile, 0, SEEK_SET); >+- php_stream_read(ImageInfo->infile, (char*)file_header, 2); >++ if (php_stream_read(ImageInfo->infile, (char*)file_header, 2) != 2) { >++ return FALSE; >++ } >+ if ((file_header[0]==0xff) && (file_header[1]==M_SOI)) { >+ ImageInfo->FileType = IMAGE_FILETYPE_JPEG; >+ if (exif_scan_JPEG_header(ImageInfo TSRMLS_CC)) { >+@@ -3753,7 +3755,9 @@ >+ exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Invalid JPEG file"); >+ } >+ } else if (ImageInfo->FileSize >= 8) { >+- php_stream_read(ImageInfo->infile, (char*)(file_header+2), 6); >++ if (php_stream_read(ImageInfo->infile, (char*)(file_header+2), 6) != 6) { >++ return FALSE; >++ } >+ if (!memcmp(file_header, "II\x2A\x00", 4)) { >+ ImageInfo->FileType = IMAGE_FILETYPE_TIFF_II; >+ ImageInfo->motorola_intel = 0; >+@@ -3849,20 +3853,14 @@ >+ return FALSE; >+ } >+ >+- php_basename(FileName, strlen(FileName), NULL, 0, &(ImageInfo->FileName), NULL TSRMLS_CC); >+- ImageInfo->read_thumbnail = read_thumbnail; >+- ImageInfo->read_all = read_all; >+- ImageInfo->Thumbnail.filetype = IMAGE_FILETYPE_UNKNOWN; >+- >+- ImageInfo->encode_unicode = safe_estrdup(EXIF_G(encode_unicode)); >+- ImageInfo->decode_unicode_be = safe_estrdup(EXIF_G(decode_unicode_be)); >+- ImageInfo->decode_unicode_le = safe_estrdup(EXIF_G(decode_unicode_le)); >+- ImageInfo->encode_jis = safe_estrdup(EXIF_G(encode_jis)); >+- ImageInfo->decode_jis_be = safe_estrdup(EXIF_G(decode_jis_be)); >+- ImageInfo->decode_jis_le = safe_estrdup(EXIF_G(decode_jis_le)); >+- >+ if (php_stream_is(ImageInfo->infile, PHP_STREAM_IS_STDIO)) { >+ if (VCWD_STAT(FileName, &st) >= 0) { >++ if ((st.st_mode & S_IFMT) != S_IFREG) { >++ exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Not a file"); >++ php_stream_close(ImageInfo->infile); >++ return FALSE; >++ } >++ >+ /* Store file date/time. */ >+ #ifdef NETWARE >+ ImageInfo->FileDateTime = st.st_mtime.tv_sec; >+@@ -3879,6 +3877,19 @@ >+ php_stream_seek(ImageInfo->infile, 0, SEEK_SET); >+ } >+ } >++ >++ php_basename(FileName, strlen(FileName), NULL, 0, &(ImageInfo->FileName), NULL TSRMLS_CC); >++ ImageInfo->read_thumbnail = read_thumbnail; >++ ImageInfo->read_all = read_all; >++ ImageInfo->Thumbnail.filetype = IMAGE_FILETYPE_UNKNOWN; >++ >++ ImageInfo->encode_unicode = safe_estrdup(EXIF_G(encode_unicode)); >++ ImageInfo->decode_unicode_be = safe_estrdup(EXIF_G(decode_unicode_be)); >++ ImageInfo->decode_unicode_le = safe_estrdup(EXIF_G(decode_unicode_le)); >++ ImageInfo->encode_jis = safe_estrdup(EXIF_G(encode_jis)); >++ ImageInfo->decode_jis_be = safe_estrdup(EXIF_G(decode_jis_be)); >++ ImageInfo->decode_jis_le = safe_estrdup(EXIF_G(decode_jis_le)); >++ >+ >+ ImageInfo->ifd_nesting_level = 0; >+ >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-pdo_mysql-infile-openbasedir.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-pdo_mysql-infile-openbasedir.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-pdo_mysql-infile-openbasedir.patch (revision 0) >@@ -0,0 +1,15 @@ >+--- ext/pdo_mysql/mysql_driver.c 2007/01/01 09:36:05 1.59.2.13.2.4 >++++ ext/pdo_mysql/mysql_driver.c 2007/06/18 21:51:32 1.59.2.13.2.5 >+@@ -492,7 +492,11 @@ >+ pdo_mysql_error(dbh); >+ goto cleanup; >+ } >+- >++ >++ if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) { >++ local_infile = 0; >++ } >++ >+ if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) { >+ pdo_mysql_error(dbh); >+ goto cleanup; >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-mysql-charsetphpini.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-mysql-charsetphpini.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-mysql-charsetphpini.patch (revision 0) >@@ -0,0 +1,78 @@ >+diff -ur php-5.2.3-orig/ext/mysql/php_mysql.c php-5.2.3/ext/mysql/php_mysql.c >+--- php-5.2.3-orig/ext/mysql/php_mysql.c 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/mysql/php_mysql.c 2007-06-09 12:27:23.000000000 +0200 >+@@ -360,6 +360,7 @@ >+ PHP_INI_ENTRY("mysql.default_port", NULL, PHP_INI_ALL, OnMySQLPort) >+ STD_PHP_INI_ENTRY("mysql.default_socket", NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_socket, zend_mysql_globals, mysql_globals) >+ STD_PHP_INI_ENTRY("mysql.connect_timeout", "60", PHP_INI_ALL, OnUpdateLong, connect_timeout, zend_mysql_globals, mysql_globals) >++ STD_PHP_INI_ENTRY("mysql.connect_charset", NULL, PHP_INI_ALL, OnUpdateString, connect_charset, zend_mysql_globals, mysql_globals) >+ STD_PHP_INI_BOOLEAN("mysql.trace_mode", "0", PHP_INI_ALL, OnUpdateLong, trace_mode, zend_mysql_globals, mysql_globals) >+ PHP_INI_END() >+ /* }}} */ >+@@ -376,6 +377,7 @@ >+ mysql_globals->connect_errno = 0; >+ mysql_globals->connect_error = NULL; >+ mysql_globals->connect_timeout = 0; >++ mysql_globals->connect_charset = NULL; >+ mysql_globals->trace_mode = 0; >+ mysql_globals->result_allocated = 0; >+ } >+@@ -486,6 +488,7 @@ >+ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) >+ { >+ char *user=NULL, *passwd=NULL, *host_and_port=NULL, *socket=NULL, *tmp=NULL, *host=NULL; >++ char *connect_charset=NULL; >+ char *hashed_details=NULL; >+ int hashed_details_length, port = MYSQL_PORT; >+ int client_flags = 0; >+@@ -499,6 +502,7 @@ >+ >+ >+ connect_timeout = MySG(connect_timeout); >++ connect_charset = MySG(connect_charset); >+ >+ socket = MySG(default_socket); >+ >+@@ -679,6 +683,9 @@ >+ mysql_options(&mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout); >+ } >+ >++ if (connect_charset != NULL) >++ mysql_options(&mysql->conn, MYSQL_SET_CHARSET_NAME, connect_charset); >++ >+ if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) { >+ #else >+ if (mysql_connect(&mysql->conn, host, user, passwd)==NULL) { >+@@ -723,6 +730,9 @@ >+ signal(SIGPIPE, handler); >+ #endif /* end mysql_ping */ >+ #if MYSQL_VERSION_ID > 32199 /* this lets us set the port number */ >++ if (connect_charset != NULL) >++ mysql_options(le->ptr, MYSQL_SET_CHARSET_NAME, connect_charset); >++ >+ if (mysql_real_connect(le->ptr, host, user, passwd, NULL, port, socket, client_flags)==NULL) { >+ #else >+ if (mysql_connect(le->ptr, host, user, passwd)==NULL) { >+@@ -785,6 +795,9 @@ >+ mysql_options(&mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout); >+ } >+ >++ if (connect_charset != NULL) >++ mysql_options(&mysql->conn, MYSQL_SET_CHARSET_NAME, connect_charset); >++ >+ if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) { >+ #else >+ if (mysql_connect(&mysql->conn, host, user, passwd)==NULL) { >+Only in php-5.2.3/ext/mysql: php_mysql.c.orig >+diff -ur php-5.2.3-orig/ext/mysql/php_mysql.h php-5.2.3/ext/mysql/php_mysql.h >+--- php-5.2.3-orig/ext/mysql/php_mysql.h 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/ext/mysql/php_mysql.h 2007-06-09 12:27:23.000000000 +0200 >+@@ -103,6 +103,7 @@ >+ long default_port; >+ char *default_host, *default_user, *default_password; >+ char *default_socket; >++ char *connect_charset; >+ char *connect_error; >+ long connect_errno; >+ long connect_timeout; >+Only in php-5.2.3/ext/mysql: php_mysql.h.orig >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-session-urlencode-cookie-values.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-session-urlencode-cookie-values.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-session-urlencode-cookie-values.patch (revision 0) >@@ -0,0 +1,32 @@ >+diff -urN php-orig/ext/session/session.c php-5.2.3/ext/session/session.c >+--- php-orig/ext/session/session.c 2007-06-21 18:25:13.000000000 +0200 >++++ php-5.2.3/ext/session/session.c 2007-06-21 18:42:08.000000000 +0200 >+@@ -1075,6 +1075,7 @@ >+ { >+ smart_str ncookie = {0}; >+ char *date_fmt = NULL; >++ char *e_session_name, *e_id; >+ >+ if (SG(headers_sent)) { >+ char *output_start_filename = php_get_output_start_filename(TSRMLS_C); >+@@ -1088,11 +1089,18 @@ >+ } >+ return; >+ } >++ >++ /* URL encode session_name and id because they might be user supplied */ >++ e_session_name = php_url_encode(PS(session_name), strlen(PS(session_name)), NULL); >++ e_id = php_url_encode(PS(id), strlen(PS(id)), NULL); >+ >+ smart_str_appends(&ncookie, COOKIE_SET_COOKIE); >+- smart_str_appends(&ncookie, PS(session_name)); >++ smart_str_appends(&ncookie, e_session_name); >+ smart_str_appendc(&ncookie, '='); >+- smart_str_appends(&ncookie, PS(id)); >++ smart_str_appends(&ncookie, e_id); >++ >++ efree(e_session_name); >++ efree(e_id); >+ >+ if (PS(cookie_lifetime) > 0) { >+ struct timeval tv; >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-mopb-02-2007-improvement.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-mopb-02-2007-improvement.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-mopb-02-2007-improvement.patch (revision 0) >@@ -0,0 +1,38 @@ >+--- main/php_variables.c 2007/04/17 15:06:50 1.104.2.10.2.8 >++++ main/php_variables.c 2007/06/03 16:19:14 1.104.2.10.2.9 >+@@ -125,8 +125,22 @@ >+ int new_idx_len = 0; >+ >+ if(++nest_level > PG(max_input_nesting_level)) { >++ HashTable *ht; >+ /* too many levels of nesting */ >+- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Input variable nesting level more than allowed %ld (change max_input_nesting_level in php.ini to increase the limit)", PG(max_input_nesting_level)); >++ >++ if (track_vars_array) { >++ ht = Z_ARRVAL_P(track_vars_array); >++ } else if (PG(register_globals)) { >++ ht = EG(active_symbol_table); >++ } >++ >++ zend_hash_del(ht, var, var_len + 1); >++ zval_dtor(val); >++ >++ if (!PG(display_errors)) { >++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variable nesting level more than allowed %ld (change max_input_nesting_level in php.ini to increase the limit)", PG(max_input_nesting_level)); >++ } >++ return; >+ } >+ >+ ip++; >+@@ -142,9 +156,9 @@ >+ /* PHP variables cannot contain '[' in their names, so we replace the character with a '_' */ >+ *(index_s - 1) = '_'; >+ >+- index_len = var_len = 0; >++ index_len = 0; >+ if (index) { >+- index_len = var_len = strlen(index); >++ index_len = strlen(index); >+ } >+ goto plain_var; >+ return; >Index: patches/php-patches/5.2.3/5.2.3/php5.2.3-zend-ini-memory-interruption-vuln.patch >=================================================================== >--- patches/php-patches/5.2.3/5.2.3/php5.2.3-zend-ini-memory-interruption-vuln.patch (revision 0) >+++ patches/php-patches/5.2.3/5.2.3/php5.2.3-zend-ini-memory-interruption-vuln.patch (revision 0) >@@ -0,0 +1,66 @@ >+--- Zend/zend_ini.c 2007/06/08 14:47:45 1.39.2.2.2.9 >++++ Zend/zend_ini.c 2007/06/17 14:31:12 1.39.2.2.2.10 >+@@ -55,7 +55,9 @@ >+ ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC); >+ } zend_end_try(); >+ } >+- efree(ini_entry->value); >++ if (ini_entry->value != ini_entry->orig_value) { >++ efree(ini_entry->value); >++ } >+ ini_entry->value = ini_entry->orig_value; >+ ini_entry->value_length = ini_entry->orig_value_length; >+ ini_entry->modified = 0; >+@@ -234,34 +236,39 @@ >+ { >+ zend_ini_entry *ini_entry; >+ char *duplicate; >++ zend_bool modified; >+ TSRMLS_FETCH(); >+ >+ if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) { >+ return FAILURE; >+ } >+ >++ if (stage == ZEND_INI_STAGE_ACTIVATE && modify_type == ZEND_INI_SYSTEM) { >++ ini_entry->modifiable = ZEND_INI_SYSTEM; >++ } >++ >+ if (!(ini_entry->modifiable & modify_type)) { >+ return FAILURE; >+ } >+ >+- if (stage == ZEND_INI_STAGE_ACTIVATE && modify_type == ZEND_INI_SYSTEM) { >+- ini_entry->modifiable = ZEND_INI_SYSTEM; >++ modified = ini_entry->modified; >++ >++ if (!EG(modified_ini_directives)) { >++ ALLOC_HASHTABLE(EG(modified_ini_directives)); >++ zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0); >++ } >++ if (!modified) { >++ ini_entry->orig_value = ini_entry->value; >++ ini_entry->orig_value_length = ini_entry->value_length; >++ ini_entry->modified = 1; >++ zend_hash_add(EG(modified_ini_directives), name, name_length, &ini_entry, sizeof(zend_ini_entry*), NULL); >+ } >+ >+ duplicate = estrndup(new_value, new_value_length); >+- >++ >+ if (!ini_entry->on_modify >+ || ini_entry->on_modify(ini_entry, duplicate, new_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC)==SUCCESS) { >+- if (!ini_entry->modified) { >+- ini_entry->orig_value = ini_entry->value; >+- ini_entry->orig_value_length = ini_entry->value_length; >+- ini_entry->modified = 1; >+- if (!EG(modified_ini_directives)) { >+- ALLOC_HASHTABLE(EG(modified_ini_directives)); >+- zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0); >+- } >+- zend_hash_add(EG(modified_ini_directives), name, name_length, &ini_entry, sizeof(zend_ini_entry*), NULL); >+- } else { /* we already changed the value, free the changed value */ >++ if (modified && ini_entry->orig_value != ini_entry->value) { /* we already changed the value, free the changed value */ >+ efree(ini_entry->value); >+ } >+ ini_entry->value = duplicate; >Index: patches/php-patches/5.2.3/php5/php5-with-iodbc.patch >=================================================================== >--- patches/php-patches/5.2.3/php5/php5-with-iodbc.patch (revision 0) >+++ patches/php-patches/5.2.3/php5/php5-with-iodbc.patch (revision 0) >@@ -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 >Index: patches/php-patches/5.2.3/php5/php5-imap-symlink.patch >=================================================================== >--- patches/php-patches/5.2.3/php5/php5-imap-symlink.patch (revision 0) >+++ patches/php-patches/5.2.3/php5/php5-imap-symlink.patch (revision 0) >@@ -0,0 +1,15 @@ >+--- ext/imap/config.m4 2006-10-21 21:25:24.000000000 +0200 >++++ ext/imap/config.m4 2006-10-21 21:26:15.000000000 +0200 >+@@ -192,12 +192,6 @@ >+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) >+ fi >+ >+- if test -r "$IMAP_DIR/c-client/c-client.a"; then >+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 >+- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then >+- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 >+- fi >+- >+ for lib in c-client4 c-client imap; do >+ IMAP_LIB=$lib >+ IMAP_LIB_CHK($PHP_LIBDIR) >Index: patches/php-patches/5.2.3/php5/php5-make_test.patch >=================================================================== >--- patches/php-patches/5.2.3/php5/php5-make_test.patch (revision 0) >+++ patches/php-patches/5.2.3/php5/php5-make_test.patch (revision 0) >@@ -0,0 +1,104 @@ >+diff -urd php-5.2.3-orig/Makefile.global php-5.2.3/Makefile.global >+--- php-5.2.3-orig/Makefile.global 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/Makefile.global 2007-06-09 11:52:11.000000000 +0200 >+@@ -70,16 +70,11 @@ >+ install-su: install-pear >+ >+ test: all >+- -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ >+- TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ >+- TEST_PHP_SRCDIR=$(top_srcdir) \ >+- CC="$(CC)" \ >+- $(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \ >+- elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \ >+- TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ >+- TEST_PHP_SRCDIR=$(top_srcdir) \ >++ -@if test ! -z "$(top_builddir)/php-cli" && test -x "$(top_builddir)/php-cli"; then \ >++ TEST_PHP_EXECUTABLE="$(top_builddir)/php-cli" \ >++ TEST_PHP_SRCDIR="$(top_srcdir)" \ >+ CC="$(CC)" \ >+- $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \ >++ "$(top_builddir)/php-cli" -n -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' "$(top_srcdir)/run-tests.php" $(TESTS); \ >+ else \ >+ echo "ERROR: Cannot run tests without CLI sapi."; \ >+ fi >+diff -urd php-5.2.3-orig/run-tests.php php-5.2.3/run-tests.php >+--- php-5.2.3-orig/run-tests.php 2007-06-09 10:46:29.000000000 +0200 >++++ php-5.2.3/run-tests.php 2007-06-09 11:53:46.000000000 +0200 >+@@ -192,13 +192,13 @@ >+ $info_params = array(); >+ settings2array($ini_overwrites,$info_params); >+ settings2params($info_params); >+- $php_info = `$php $pass_options $info_params "$info_file"`; >++ $php_info = `$php -n $pass_options $info_params "$info_file"`; >+ @unlink($info_file); >+- define('TESTED_PHP_VERSION', `$php -r "echo PHP_VERSION;"`); >++ define('TESTED_PHP_VERSION', `$php -n -r "echo PHP_VERSION;"`); >+ >+ // load list of enabled extensions >+ save_text($info_file, '<?php echo join(",",get_loaded_extensions()); ?>'); >+- $exts_to_test = explode(',',`$php $pass_options $info_params "$info_file"`); >++ $exts_to_test = explode(',',`$php -n $pass_options $info_params "$info_file"`); >+ // check for extensions that need special handling and regenerate >+ $info_params_ex = array( >+ 'session' => array('session.auto_start=0'), >+@@ -1047,13 +1047,10 @@ >+ if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) { >+ if (isset($php_cgi)) { >+ $old_php = $php; >+- $php = $php_cgi .' -C '; >++ $php = $php_cgi .' -n -C '; >+ } elseif (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) { >+ $old_php = $php; >+ $php = realpath(dirname($php) ."/php-cgi.exe") .' -C '; >+- } elseif (file_exists("./sapi/cgi/php-cgi")) { >+- $old_php = $php; >+- $php = realpath("./sapi/cgi/php-cgi") . ' -C '; >+ } else { >+ show_result("SKIP", $tested, $tested_file, "reason: CGI not available"); >+ return 'SKIPPED'; >+@@ -1182,7 +1179,7 @@ >+ } else { >+ $env['USE_ZEND_ALLOC'] = '1'; >+ } >+- $output = system_with_timeout("$extra $php -q $ini_settings $test_skipif", $env); >++ $output = system_with_timeout("$extra $php -n -q $ini_settings $test_skipif", $env); >+ if (!$cfg['keep']['skip']) { >+ @unlink($test_skipif); >+ } >+@@ -1324,7 +1321,7 @@ >+ return 'BORKED'; >+ } >+ save_text($tmp_post, $request); >+- $cmd = "$php$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; >++ $cmd = "$php -n$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; >+ } elseif (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { >+ >+ $post = trim($section_text['POST']); >+@@ -1344,7 +1341,7 @@ >+ $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; >+ $env['CONTENT_LENGTH'] = $content_length; >+ >+- $cmd = "$php$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; >++ $cmd = "$php -n$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; >+ >+ } else { >+ >+@@ -1352,7 +1349,7 @@ >+ $env['CONTENT_TYPE'] = ''; >+ $env['CONTENT_LENGTH'] = ''; >+ >+- $cmd = "$php$pass_options$ini_settings -f \"$test_file\" $args 2>&1"; >++ $cmd = "$php -n$pass_options$ini_settings -f \"$test_file\" $args 2>&1"; >+ } >+ >+ if ($leak_check) { >+@@ -1390,7 +1387,7 @@ >+ settings2params($clean_params); >+ $extra = substr(PHP_OS, 0, 3) !== "WIN" ? >+ "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": ""; >+- system_with_timeout("$extra $php -q $clean_params $test_clean", $env); >++ system_with_timeout("$extra $php -n -q $clean_params $test_clean", $env); >+ } >+ if (!$cfg['keep']['clean']) { >+ @unlink($test_clean); >Index: patches/php-patches/5.2.3/php5/php5-prefork-peruser-itk.patch >=================================================================== >--- patches/php-patches/5.2.3/php5/php5-prefork-peruser-itk.patch (revision 0) >+++ patches/php-patches/5.2.3/php5/php5-prefork-peruser-itk.patch (revision 0) >@@ -0,0 +1,22 @@ >+--- sapi/apache2filter/config.m4 2006-02-08 22:13:06.000000000 +0100 >++++ sapi/apache2filter/config.m4 2006-02-08 22:14:05.000000000 +0100 >+@@ -115,7 +115,7 @@ >+ ;; >+ esac >+ >+- if test "$APXS_MPM" != "prefork"; then >++ if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then >+ PHP_BUILD_THREAD_SAFE >+ fi >+ AC_MSG_RESULT(yes) >+--- sapi/apache2handler/config.m4 2006-02-08 22:13:12.000000000 +0100 >++++ sapi/apache2handler/config.m4 2006-02-08 22:14:43.000000000 +0100 >+@@ -114,7 +114,7 @@ >+ ;; >+ esac >+ >+- if test "$APXS_MPM" != "prefork"; then >++ if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then >+ PHP_BUILD_THREAD_SAFE >+ fi >+ AC_MSG_RESULT(yes) >Index: patches/php-patches/5.2.3/php5/php5-iodbc-config.patch >=================================================================== >--- patches/php-patches/5.2.3/php5/php5-iodbc-config.patch (revision 0) >+++ patches/php-patches/5.2.3/php5/php5-iodbc-config.patch (revision 0) >@@ -0,0 +1,14 @@ >+--- ext/odbc/config.m4 2006-10-21 21:25:24.000000000 +0200 >++++ ext/odbc/config.m4 2006-10-21 21:32:18.000000000 +0200 >+@@ -440,9 +440,9 @@ >+ fi >+ if test "$withval" != "no"; then >+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/$PHP_LIBDIR) >+- PHP_ADD_INCLUDE($withval/include, 1) >++ PHP_ADD_INCLUDE($withval/include/iodbc, 1) >+ ODBC_TYPE=iodbc >+- ODBC_INCLUDE=-I$withval/include >++ ODBC_INCLUDE=-I$withval/include/iodbc >+ ODBC_LFLAGS=-L$withval/$PHP_LIBDIR >+ ODBC_LIBS=-liodbc >+ AC_DEFINE(HAVE_IODBC,1,[ ]) >Index: testing/dev-lang/php/files/digest-php-5.2.3 >=================================================================== >--- testing/dev-lang/php/files/digest-php-5.2.3 (revision 0) >+++ testing/dev-lang/php/files/digest-php-5.2.3 (revision 0) >@@ -0,0 +1,9 @@ >+MD5 eb50b751c8e1ced05bd012d5a0e4dec3 php-5.2.3.tar.bz2 7417635 >+RMD160 3c895cf7e513e5a3d7d9f742a9d56102cbb3a79b php-5.2.3.tar.bz2 7417635 >+SHA256 eedffda5069caa801a7fec217c77619657416a5fcaefb79ba4620432f0befe29 php-5.2.3.tar.bz2 7417635 >+MD5 fcb41dbf42b005ab75eeba03637278f8 php-patchset-5.2.3-r1.tar.bz2 16321 >+RMD160 26579c65f31a51d533442228a6792e4b88b0eabd php-patchset-5.2.3-r1.tar.bz2 16321 >+SHA256 a343a8bf8c51338f466cd31574bd56746526c99566e1099f2116eaac6b25030d php-patchset-5.2.3-r1.tar.bz2 16321 >+MD5 081fe08d584820a6ece1fe2e8629711f suhosin-patch-5.2.3-0.9.6-gentoo.patch.gz 22850 >+RMD160 c47d4c23cf9c8b654761260586a01dee34163708 suhosin-patch-5.2.3-0.9.6-gentoo.patch.gz 22850 >+SHA256 932d8155028686b96d3ebf89215dab7cd9353ac72f9ea82c252d0999fb4bd864 suhosin-patch-5.2.3-0.9.6-gentoo.patch.gz 22850 >Index: testing/dev-lang/php/Manifest >=================================================================== >--- testing/dev-lang/php/Manifest (revision 0) >+++ testing/dev-lang/php/Manifest (revision 0) >@@ -0,0 +1,46 @@ >+AUX 20php4-envd 145 RMD160 fb57b2d202ab1031303e7525a8ef5b353dc04ef8 SHA1 34ef066d2de22f147fc86bbe884692af7631f726 SHA256 17cd1a952434988b4c2125e4d1eef1df7114809f404605d35f255674419dd5d5 >+MD5 77e3309d68e4a820b2abd408cd6c0ca0 files/20php4-envd 145 >+RMD160 fb57b2d202ab1031303e7525a8ef5b353dc04ef8 files/20php4-envd 145 >+SHA256 17cd1a952434988b4c2125e4d1eef1df7114809f404605d35f255674419dd5d5 files/20php4-envd 145 >+AUX 20php5-envd 145 RMD160 8c81fb7dc1d1ddf16fd956d748514db3bcb27603 SHA1 f1cef57c0def8e2c5422aaf136f40b4ff47801d2 SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4 >+MD5 9de5c2b4ffa3f2753b5e5e690fdade42 files/20php5-envd 145 >+RMD160 8c81fb7dc1d1ddf16fd956d748514db3bcb27603 files/20php5-envd 145 >+SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4 files/20php5-envd 145 >+AUX 70_mod_php.conf-apache2 457 RMD160 3db748289c54547b815f6b2069cc02f4a18f16da SHA1 31f1ef36ad414beaf1dcbd99c3b41db7967c129d SHA256 03059ce0ece6c9b4db2d3bbf4b6352e0a4193a45843f3888ce3c37cc447748a1 >+MD5 159253d05611d995e6ec3ca73bd372ca files/70_mod_php.conf-apache2 457 >+RMD160 3db748289c54547b815f6b2069cc02f4a18f16da files/70_mod_php.conf-apache2 457 >+SHA256 03059ce0ece6c9b4db2d3bbf4b6352e0a4193a45843f3888ce3c37cc447748a1 files/70_mod_php.conf-apache2 457 >+AUX 70_mod_php5.conf-apache2 493 RMD160 c4ace955ff65ca2ce964cf4c8d2b42f6a41e90ef SHA1 226e31837e28675addb82f48d12f05bb4e0a5e66 SHA256 9de8f6073983e0b2ff784271047563782870d981a241abdecbdda8a038b15033 >+MD5 d2b2325e816b90d3be7bd23388980421 files/70_mod_php5.conf-apache2 493 >+RMD160 c4ace955ff65ca2ce964cf4c8d2b42f6a41e90ef files/70_mod_php5.conf-apache2 493 >+SHA256 9de8f6073983e0b2ff784271047563782870d981a241abdecbdda8a038b15033 files/70_mod_php5.conf-apache2 493 >+AUX 70_mod_php5_concurr.conf-apache2 417 RMD160 2f6bc0900fd2a94268f36254f7f6717b7a5fd649 SHA1 5490af6724ecdb5801ec12ed20ab80ac26d2f950 SHA256 f09cedf53f0355130f3a449920191fd4456f7303ebfcedaf57a636a2b18c29ba >+MD5 ddc2f34aaaf326706aff17e220aec916 files/70_mod_php5_concurr.conf-apache2 417 >+RMD160 2f6bc0900fd2a94268f36254f7f6717b7a5fd649 files/70_mod_php5_concurr.conf-apache2 417 >+SHA256 f09cedf53f0355130f3a449920191fd4456f7303ebfcedaf57a636a2b18c29ba files/70_mod_php5_concurr.conf-apache2 417 >+AUX 70_mod_php_concurr.conf-apache2 332 RMD160 e7691ce9ab686e32c48c7b204da339db098f3ef1 SHA1 fdfcebb517a25d78bc4373fec8756b147fd02fad SHA256 bb1764de57b950ca971d20a28a75ea98f907c11e2d8cc82996eda5eacd4baf7f >+MD5 b325972ed888590c3f371458d3aa3d76 files/70_mod_php_concurr.conf-apache2 332 >+RMD160 e7691ce9ab686e32c48c7b204da339db098f3ef1 files/70_mod_php_concurr.conf-apache2 332 >+SHA256 bb1764de57b950ca971d20a28a75ea98f907c11e2d8cc82996eda5eacd4baf7f files/70_mod_php_concurr.conf-apache2 332 >+AUX php4-ldvs 22 RMD160 e70c565b3930d9d9e3253062b7c633346cb99a63 SHA1 8c66355dfb80e2ecc6ee6faae30bf7dbb1727651 SHA256 4aee18478b09cda7e925ccde157db6099ea0122b5c4efb0868e3761b65688dde >+MD5 abaacd6115552db702b3a8df140d107d files/php4-ldvs 22 >+RMD160 e70c565b3930d9d9e3253062b7c633346cb99a63 files/php4-ldvs 22 >+SHA256 4aee18478b09cda7e925ccde157db6099ea0122b5c4efb0868e3761b65688dde files/php4-ldvs 22 >+AUX php5-ldvs 22 RMD160 5846dab2745b68a88175dd4e72d0b8cf4756dd46 SHA1 592398c92575adb14ec972847ce2aca28a7b9c2c SHA256 b79d0e52b1b3b4543b31ad45525ae1c2814a27ea8e676772ab10bf6fb12dfe79 >+MD5 9b26422d0bda7252a77a81d1b734e1bd files/php5-ldvs 22 >+RMD160 5846dab2745b68a88175dd4e72d0b8cf4756dd46 files/php5-ldvs 22 >+SHA256 b79d0e52b1b3b4543b31ad45525ae1c2814a27ea8e676772ab10bf6fb12dfe79 files/php5-ldvs 22 >+DIST php-5.2.3.tar.bz2 7417635 RMD160 3c895cf7e513e5a3d7d9f742a9d56102cbb3a79b SHA1 0a02e05e1c663c0d4ee0b253917c0e140e606261 SHA256 eedffda5069caa801a7fec217c77619657416a5fcaefb79ba4620432f0befe29 >+DIST php-patchset-5.2.3-r1.tar.bz2 16321 RMD160 26579c65f31a51d533442228a6792e4b88b0eabd SHA1 450304e7fdc6c5004df02a0452fdf6a4a3af1bc5 SHA256 a343a8bf8c51338f466cd31574bd56746526c99566e1099f2116eaac6b25030d >+DIST suhosin-patch-5.2.3-0.9.6-gentoo.patch.gz 22850 RMD160 c47d4c23cf9c8b654761260586a01dee34163708 SHA1 e82ef45abb23289b8b4369635f5ddda38f143407 SHA256 932d8155028686b96d3ebf89215dab7cd9353ac72f9ea82c252d0999fb4bd864 >+EBUILD php-5.2.3.ebuild 14248 RMD160 68d224bfae1e6bf93b46c8958d20cc27a6cb94a6 SHA1 4cc87ef50c497cae4721dd09ff16a916296228e0 SHA256 cccaee658a29a8b1b034f12e31f5767d20c60ae881666825f1185b97910761d4 >+MD5 f0af49de781b6f580bb2f701e70d883e php-5.2.3.ebuild 14248 >+RMD160 68d224bfae1e6bf93b46c8958d20cc27a6cb94a6 php-5.2.3.ebuild 14248 >+SHA256 cccaee658a29a8b1b034f12e31f5767d20c60ae881666825f1185b97910761d4 php-5.2.3.ebuild 14248 >+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 >+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157 >+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157 >+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157 >+MD5 082e3a223a7e16cb48798f9e2df82c4b files/digest-php-5.2.3 801 >+RMD160 b2ca2d3985a4ef23b33a4f7898081246b24b805e files/digest-php-5.2.3 801 >+SHA256 038fe83799b291193d1967851bc0a0e1f6b9edd84f5c523d439a31e5b653b259 files/digest-php-5.2.3 801 >Index: testing/dev-lang/php/php-5.2.3.ebuild >=================================================================== >--- testing/dev-lang/php/php-5.2.3.ebuild (revision 0) >+++ testing/dev-lang/php/php-5.2.3.ebuild (revision 0) >@@ -0,0 +1,477 @@ >+# Copyright 1999-2007 Gentoo Foundation >+# Distributed under the terms of the GNU General Public License v2 >+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.2-r1.ebuild,v 1.9 2007/05/12 11:26:51 corsair Exp $ >+ >+CGI_SAPI_USE="discard-path force-cgi-redirect" >+APACHE2_SAPI_USE="concurrentmodphp threads" >+IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild" >+ >+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd" >+ >+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags >+# that have been enabled, so we have to PROVIDE everything for now >+# and hope for the best >+PROVIDE="virtual/php virtual/httpd-php" >+ >+# php package settings >+SLOT="5" >+MY_PHP_PV="${PV}" >+MY_PHP_P="php-${MY_PHP_PV}" >+PHP_PACKAGE="1" >+ >+# php patch settings, general >+PHP_PATCHSET_REV="1" >+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6-gentoo.patch.gz" >+MULTILIB_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-multilib-search-path.patch" >+# php patch settings, ebuild specific >+FASTBUILD_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-fastbuild.patch" >+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/php${MY_PHP_PV}-concurrent_apache_modules.patch" >+ >+inherit php5_2-sapi apache-module >+ >+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs." >+ >+DEPEND="app-admin/php-toolkit" >+RDEPEND="${DEPEND}" >+ >+want_apache >+ >+pkg_setup() { >+ PHPCONFUTILS_AUTO_USE="" >+ >+ # Make sure the user has specified at least one SAPI >+ einfo "Determining SAPI(s) to build" >+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache2 >+ >+ # Threaded Apache2 support >+ if use apache2 ; then >+ if [[ "${APACHE_VERSION}" != "0" ]] ; then >+ if ! use threads ; then >+ APACHE2_SAFE_MPMS="itk peruser prefork" >+ else >+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" >+ fi >+ >+ ewarn >+ ewarn "If this package fails with a fatal error about Apache2 not having" >+ ewarn "been compiled with a compatible MPM, this is normally because you" >+ ewarn "need to toggle the 'threads' USE flag." >+ ewarn >+ ewarn "If 'threads' is off, try switching it on." >+ ewarn "If 'threads' is on, try switching it off." >+ ewarn >+ >+ apache-module_pkg_setup >+ fi >+ fi >+ >+ # Concurrent PHP Apache2 modules support >+ if use apache2 ; then >+ if [[ "${APACHE_VERSION}" != "0" ]] ; then >+ if use concurrentmodphp ; then >+ ewarn >+ ewarn "'concurrentmodphp' makes it possible to load multiple, differently" >+ ewarn "versioned mod_php's into the same Apache instance. This is done with" >+ ewarn "a few linker tricks and workarounds, and is not guaranteed to always" >+ ewarn "work correctly, so use it at your own risk. Especially, do not use" >+ ewarn "this in conjunction with PHP modules (PECL, ...) other than the ones" >+ ewarn "you may find in the Portage tree or the PHP Overlay!" >+ ewarn "This is an experimental feature, so please rebuild PHP" >+ ewarn "without the 'concurrentmodphp' USE flag if you experience" >+ ewarn "any problems, and then reproduce any bugs before filing" >+ ewarn "them in Gentoo's Bugzilla or bugs.php.net." >+ ewarn "If you have conclusive evidence that a bug directly" >+ ewarn "derives from 'concurrentmodphp', please file a bug in" >+ ewarn "Gentoo's Bugzilla only." >+ ewarn >+ ebeep 5 >+ fi >+ fi >+ fi >+ >+ # fastbuild support >+ if use fastbuild ; then >+ ewarn >+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass." >+ ewarn "This is an experimental feature, so please rebuild PHP" >+ ewarn "without the 'fastbuild' USE flag if you experience" >+ ewarn "any problems, and then reproduce any bugs before filing" >+ ewarn "them in Gentoo's Bugzilla or bugs.php.net." >+ ewarn "If you have conclusive evidence that a bug directly" >+ ewarn "derives from 'fastbuild', please file a bug in" >+ ewarn "Gentoo's Bugzilla only." >+ ewarn >+ fi >+ >+ php5_2-sapi_pkg_setup >+} >+ >+php_determine_sapis() { >+ # holds the list of sapis that we want to build >+ PHPSAPIS= >+ >+ if use cli || phpconfutils_usecheck cli ; then >+ PHPSAPIS="${PHPSAPIS} cli" >+ fi >+ >+ if use cgi ; then >+ PHPSAPIS="${PHPSAPIS} cgi" >+ fi >+ >+ # note - apache SAPI comes after the simpler cli/cgi sapis >+ if use apache2 ; then >+ if [[ "${APACHE_VERSION}" != "0" ]] ; then >+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" >+ fi >+ fi >+} >+ >+src_unpack() { >+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then >+ unpack ${A} >+ fi >+ >+ cd "${S}" >+ >+ # Concurrent PHP Apache2 modules support >+ if use apache2 ; then >+ if [[ "${APACHE_VERSION}" != "0" ]] ; then >+ if use concurrentmodphp ; then >+ if [[ -n "${CONCURRENTMODPHP_PATCH}" ]] && [[ -f "${WORKDIR}/${CONCURRENTMODPHP_PATCH}" ]] ; then >+ epatch "${WORKDIR}/${CONCURRENTMODPHP_PATCH}" >+ else >+ ewarn "There is no concurrent mod_php patch available for this PHP release yet!" >+ fi >+ fi >+ fi >+ fi >+ >+ # fastbuild support >+ if use fastbuild ; then >+ if [[ -n "${FASTBUILD_PATCH}" ]] && [[ -f "${WORKDIR}/${FASTBUILD_PATCH}" ]] ; then >+ epatch "${WORKDIR}/${FASTBUILD_PATCH}" >+ else >+ ewarn "There is no fastbuild patch available for this PHP release yet!" >+ fi >+ fi >+ >+ # Now let the eclass do the rest and regenerate the configure >+ php5_2-sapi_src_unpack >+ >+ # Fix Makefile.global:test to consider the CGI SAPI if present >+ if use cgi ; then >+ sed -e "s|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\"|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\" \&\& test \! -z \"\$(top_builddir)/php-cgi\" \&\& test -x \"\$(top_builddir)/php-cgi\"|g" -i Makefile.global >+ sed -e "s|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\"|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\" TEST_PHP_CGI_EXECUTABLE=\"\$(top_builddir)/php-cgi\"|g" -i Makefile.global >+ fi >+} >+ >+src_compile() { >+ if use fastbuild && [[ -n "${FASTBUILD_PATCH}" ]] ; then >+ src_compile_fastbuild >+ else >+ src_compile_normal >+ fi >+} >+ >+src_compile_fastbuild() { >+ php_determine_sapis >+ >+ build_cli=0 >+ build_cgi=0 >+ build_apache2=0 >+ my_conf="" >+ >+ for x in ${PHPSAPIS} ; do >+ case ${x} in >+ cli) >+ build_cli=1 >+ ;; >+ cgi) >+ build_cgi=1 >+ ;; >+ apache2) >+ build_apache2=1 >+ ;; >+ esac >+ done >+ >+ if [[ ${build_cli} = 1 ]] ; then >+ my_conf="${my_conf} --enable-cli" >+ else >+ my_conf="${my_conf} --disable-cli" >+ fi >+ >+ if [[ ${build_cgi} = 1 ]] ; then >+ my_conf="${my_conf} --enable-cgi --enable-fastcgi" >+ phpconfutils_extension_enable "discard-path" "discard-path" 0 >+ phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 >+ else >+ my_conf="${my_conf} --disable-cgi" >+ fi >+ >+ if [[ ${build_apache2} = 1 ]] ; then >+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2" >+ >+ # Threaded Apache2 support >+ if use threads ; then >+ my_conf="${my_conf} --enable-maintainer-zts" >+ ewarn "Enabling ZTS for Apache2 MPM" >+ fi >+ >+ # Concurrent PHP Apache2 modules support >+ if use concurrentmodphp ; then >+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs" >+ fi >+ fi >+ >+ # Now we know what we are building, build it >+ php5_2-sapi_src_compile >+ >+ # To keep the separate php.ini files for each SAPI, we change the >+ # build-defs.h and recompile >+ >+ if [[ ${build_cli} = 1 ]] ; then >+ einfo >+ einfo "Building CLI SAPI" >+ einfo >+ >+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php5"|g;' -i main/build-defs.h >+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php5/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 >+ make sapi/cli/php || die "Unable to make CLI SAPI" >+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" >+ fi >+ >+ if [[ ${build_cgi} = 1 ]] ; then >+ einfo >+ einfo "Building CGI SAPI" >+ einfo >+ >+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php5"|g;' -i main/build-defs.h >+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php5/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 >+ make sapi/cgi/php-cgi || die "Unable to make CGI SAPI" >+ cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" >+ fi >+ >+ if [[ ${build_apache2} = 1 ]] ; then >+ einfo >+ einfo "Building apache${APACHE_VERSION} SAPI" >+ einfo >+ >+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php5\"|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}-php5/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 >+ make || die "Unable to make apache${APACHE_VERSION} SAPI" >+ fi >+} >+ >+src_compile_normal() { >+ php_determine_sapis >+ >+ CLEAN_REQUIRED=0 >+ my_conf="" >+ >+ # Support the Apache2 extras, they must be set globally for all >+ # SAPIs to work correctly, especially for external PHP extensions >+ if use apache2 ; then >+ if [[ "${APACHE_VERSION}" != "0" ]] ; then >+ # Concurrent PHP Apache2 modules support >+ if use concurrentmodphp ; then >+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs" >+ fi >+ fi >+ fi >+ >+ for x in ${PHPSAPIS} ; do >+ # Support the Apache2 extras, they must be set globally for all >+ # SAPIs to work correctly, especially for external PHP extensions >+ if use apache2 ; then >+ if [[ "${APACHE_VERSION}" != "0" ]] ; then >+ # Threaded Apache2 support >+ if use threads ; then >+ my_conf="${my_conf} --enable-maintainer-zts" >+ ewarn "Enabling ZTS for Apache2 MPM" >+ fi >+ fi >+ fi >+ >+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then >+ make clean >+ fi >+ >+ PHPSAPI="${x}" >+ >+ case ${x} in >+ cli) >+ my_conf="${my_conf} --enable-cli --disable-cgi" >+ php5_2-sapi_src_compile >+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" >+ ;; >+ cgi) >+ my_conf="${my_conf} --disable-cli --enable-cgi --enable-fastcgi" >+ phpconfutils_extension_enable "discard-path" "discard-path" 0 >+ phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 >+ php5_2-sapi_src_compile >+ cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" >+ ;; >+ apache2) >+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2" >+ php5_2-sapi_src_compile >+ ;; >+ esac >+ >+ CLEAN_REQUIRED=1 >+ my_conf="" >+ done >+} >+ >+src_install() { >+ php_determine_sapis >+ >+ destdir=/usr/$(get_libdir)/php5 >+ >+ # Let the eclass do the common work >+ php5_2-sapi_src_install >+ >+ einfo >+ einfo "Installing SAPI(s) ${PHPSAPIS}" >+ einfo >+ >+ for x in ${PHPSAPIS} ; do >+ >+ PHPSAPI="${x}" >+ >+ case ${x} in >+ cli) >+ einfo "Installing CLI SAPI" >+ into ${destdir} >+ newbin php-cli php || die "Unable to install ${x} sapi" >+ php5_2-sapi_install_ini >+ ;; >+ cgi) >+ einfo "Installing CGI SAPI" >+ into ${destdir} >+ dobin php-cgi || die "Unable to install ${x} sapi" >+ php5_2-sapi_install_ini >+ ;; >+ apache2) >+ einfo "Installing Apache${APACHE_VERSION} SAPI" >+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" >+ if use concurrentmodphp ; then >+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)" >+ insinto ${APACHE_MODULES_CONFDIR} >+ newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2" "70_mod_php5_concurr.conf" >+ >+ # Put the ld version script in the right place so it's always accessible >+ insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/" >+ doins "${FILESDIR}/php5-ldvs" >+ >+ # Redefine the extension dir to have the modphp suffix >+ PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned" >+ else >+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)" >+ insinto ${APACHE_MODULES_CONFDIR} >+ newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf" >+ fi >+ php5_2-sapi_install_ini >+ ;; >+ esac >+ done >+ >+ # Install env.d files >+ newenvd "${FILESDIR}/20php5-envd" "20php5" >+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5" >+} >+ >+pkg_postinst() { >+ # Output some general info to the user >+ if use apache2 ; then >+ APACHE2_MOD_DEFINE="PHP5" >+ if use concurrentmodphp ; then >+ APACHE2_MOD_CONF="70_mod_php5_concurr" >+ else >+ APACHE2_MOD_CONF="70_mod_php5" >+ fi >+ apache-module_pkg_postinst >+ fi >+ >+ # Update Apache2 to use mod_php >+ if use apache2 ; then >+ "${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 >+ exitStatus=$? >+ if [[ ${exitStatus} == 2 ]] ; then >+ php-select apache2 php5 >+ elif [[ ${exitStatus} == 4 ]] ; then >+ ewarn >+ ewarn "Apache2 is configured to load a different version of PHP." >+ ewarn "To make Apache2 use PHP v5, use php-select:" >+ ewarn >+ ewarn " php-select apache2 php5" >+ ewarn >+ fi >+ fi >+ >+ # Create the symlinks for php-cli >+ if use cli || phpconfutils_usecheck cli ; then >+ "${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 >+ exitStatus=$? >+ if [[ ${exitStatus} == 5 ]] ; then >+ php-select php php5 >+ elif [[ ${exitStatus} == 4 ]] ; then >+ ewarn >+ ewarn "/usr/bin/php links to a different version of PHP." >+ ewarn "To make /usr/bin/php point to PHP v5, use php-select:" >+ ewarn >+ ewarn " php-select php php5" >+ ewarn >+ fi >+ fi >+ >+ # Create the symlinks for php-cgi >+ if use cgi ; then >+ "${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 >+ exitStatus=$? >+ if [[ ${exitStatus} == 5 ]] ; then >+ php-select php-cgi php5 >+ elif [[ ${exitStatus} == 4 ]] ; then >+ ewarn >+ ewarn "/usr/bin/php-cgi links to a different version of PHP." >+ ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:" >+ ewarn >+ ewarn " php-select php-cgi php5" >+ ewarn >+ fi >+ fi >+ >+ # Create the symlinks for php-devel >+ "${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 >+ exitStatus=$? >+ if [[ $exitStatus == 5 ]] ; then >+ php-select php-devel php5 >+ elif [[ $exitStatus == 4 ]] ; then >+ ewarn >+ ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a" >+ ewarn "different version of PHP. To make them point to PHP v5, use" >+ ewarn "php-select:" >+ ewarn >+ ewarn " php-select php-devel php5" >+ ewarn >+ fi >+ >+ php5_2-sapi_pkg_postinst >+} >+ >+src_test() { >+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" >+ if ! emake -j1 test ; then >+ hasq test ${FEATURES} && die "Make test failed. See above for details." >+ hasq test ${FEATURES} || eerror "Make test failed. See above for details." >+ fi >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 180556
:
121589
|
121591
|
121740
| 122723 |
131973