[PHP-CVS] cvs: php-src(PHP_5_1) /pear CODING_STANDARDS PEAR.php README System.php catalog go-pear-list.php go-pear.bat install-pear.php make-pear-bundle.php package-Archive_Tar.xml package-Console_Get

2005-10-19 Thread Greg Beaver
cellog  Wed Oct 19 21:49:43 2005 EDT

  Removed files:   (Branch: PHP_5_1)
/php-src/pear/Archive   Tar.php 
/php-src/pear/Archive/docs  Tar.txt 
/php-src/pear   CODING_STANDARDS PEAR.php README System.php catalog 
go-pear-list.php go-pear.bat install-pear.php 
make-pear-bundle.php package-Archive_Tar.xml 
package-Console_Getopt.xml package-PEAR.xml 
package.dtd template.spec 
/php-src/pear/Console   Getopt.php 
/php-src/pear/Console/tests .cvsignore 001-getopt.phpt 
/php-src/pear/OSGuess.php 
/php-src/pear/PEAR  Autoloader.php Builder.php Command.php 
Common.php Config.php Dependency.php 
DependencyDB.php Downloader.php ErrorStack.php 
Exception.php Installer.php Packager.php 
Registry.php Remote.php RunTest.php 
/php-src/pear/PEAR/Command  Auth.php Build.php Common.php Config.php 
Install.php Mirror.php Package.php 
Registry.php Remote.php 
/php-src/pear/PEAR/Frontend CLI.php 
/php-src/pear/docs  Archive_Tar.txt rfc01_PEAR_pecl-binaries.txt 
rfc01_PEAR_subpackages.txt 
/php-src/pear/packages  HTML_Template_IT-1.1.tar 
Net_UserAgent_Detect-2.0.1.tar 
XML_RPC-1.4.0.tar 
/php-src/pear/scripts   .cvsignore pear.bat pear.sh pearcmd.php 
pearwin.php 
/php-src/pear/tests .cvsignore PEAR_test_mock_pearweb.php.inc 
common_sortPkgDeps1_package.xml 
common_sortPkgDeps2_package.xml 
common_sortPkgDeps3_package.xml 
common_sortPkgDeps4_package.xml 
common_sortPkgDeps5_package.xml 
common_sortPkgDeps6_package.xml 
depnoreleases-1.0.tgz depunstable-1.0.tgz 
download_test.config.inc 
download_test_classes.php.inc merge.input 
merge2.input package-PEARtests.xml pear1.phpt 
pear2.phpt pear_autoloader.phpt 
pear_channelfile.phpt 
pear_common_analyzeSC.phpt 
pear_common_buildProvidesArray.phpt 
pear_common_downloadHttp.phpt 
pear_common_infoFromString.phpt 
pear_common_sortPkgDeps.phpt 
pear_common_validPackageVersion.phpt 
pear_config.phpt pear_config_1.1.phpt 
pear_dependency_checkExtension.phpt 
pear_dependency_checkPackage.phpt 
pear_dependency_checkPackageUninstall.phpt 
pear_downloader_invalid.phpt 
pear_downloader_new.phpt 
pear_downloader_old.phpt pear_error.phpt 
pear_error2.phpt pear_error3.phpt 
pear_error4.phpt pear_installer1.phpt 
pear_installer2.phpt pear_installer3.phpt 
pear_installer4.phpt pear_installer5.phpt 
pear_installer_installFile_channels.phpt 
pear_installer_install_channels.phpt 
pear_packager.phpt pear_registry.phpt 
pear_registry_1.1.phpt 
pear_registry_inc.php.inc pear_system.phpt 
php.ini php_dump.php.inc pkg1-1.1.tgz 
pkg1-2.0b1.tgz pkg2-1.1.tgz pkg3-1.1.tgz 
pkg3-1.4.tgz pkg4-1.1.tgz pkg4AndAHalf-1.3.tgz 
pkg5-1.1.tgz stabilitytoolow-0.3.tgz 
stabilitytoolow-0.5.tgz 
stabilitytoolow-0.6beta.tgz 
stabilitytoolow-1.0b1.tgz 
stabilitytoolow-2.0a1.tgz 
stabilitytoolow-2.0b1.tgz 
stabilitytoolow-2.0dev.tgz 
stabilitytoolow-3.0dev.tgz system.input 
testdownload.tgz toonew.conf user.input 
user2.input user3.input 
/php-src/pear/tests/PEAR_ErrorStack 

Error_Stack_TestCase_getErrorMessage.php 

Error_Stack_TestCase_getErrorMessageTemplate.php 
Error_Stack_TestCase_getErrors.php 
Error_Stack_TestCase_pushpop.php 

Error_Stack_TestCase_pushpopcallback.php 
Error_Stack_TestCase_pushpopstatic.ph

[PHP-CVS] cvs: php-src / Makefile.gcov NEWS configure.in gen_php_cov

2005-10-19 Thread John Coggeshall
johnWed Oct 19 20:18:26 2005 EDT

  Added files: 
/php-srcMakefile.gcov gen_php_cov 

  Modified files:  
/php-srcNEWS configure.in 
  Log:
  Implementing C-level Code coverage (--enable-gcov).
   
o Requires LTP 1.4+ and libgcov
  
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2070&r2=1.2071&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2070 php-src/NEWS:1.2071
--- php-src/NEWS:1.2070 Sat Oct 15 08:54:18 2005
+++ php-src/NEWSWed Oct 19 20:18:23 2005
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? ??? , PHP 6.0
+- C-level Code Coverage Instrumenting (John)
 - Unicode support. (Andrei, Dmitriy, et al)
 - Changed type hints so that they take "= NULL" as default value. (Marcus,
   Derick)
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.588&r2=1.589&ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.588 php-src/configure.in:1.589
--- php-src/configure.in:1.588  Tue Sep 13 17:40:33 2005
+++ php-src/configure.inWed Oct 19 20:18:23 2005
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.588 2005/09/13 21:40:33 sniper Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.589 2005/10/20 00:18:23 john Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -597,6 +597,57 @@
 PHP_CONFIGURE_PART(General settings)
 
 PHP_HELP_SEPARATOR([General settings:])
+PHP_ARG_ENABLE(gcov,  whether to include gcov symbols,
+[  --enable-gcov   Enable GCOV code coverage (requires LTP)], no, no)
+
+if test "$PHP_GCOV" = "yes"; then
+  AC_DEFUN([PHP_PROG_LTP],[
+
+ltp_version_list="1.4"
+
+AC_CHECK_PROG(LTP, lcov, lcov)
+AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
+if test "$LTP"; then
+  AC_CACHE_CHECK([for ltp version], php_cv_ltp_version, [
+php_cv_ltp_version=invalid
+ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
+for ltp_check_version in $ltp_version_list; do
+  if test "$ltp_version" = "$ltp_check_version"; then
+php_cv_ltp_version="$ltp_check_version (ok)"
+  fi
+done
+  ])
+else
+  ltp_msg="To enable code coverage reporting you must have one of the 
following LTP versions installed: $ltp_version_list"  
+  AC_MSG_ERROR([$ltp_msg])
+fi
+
+case $php_cv_ltp_version in
+  ""|invalid[)]
+ltp_msg="You must have one of the following versions of LTP: 
$ltp_version_list (found: $ltp_version)."
+AC_MSG_ERROR([$ltp_msg])
+LTP="exit 0;"
+;;
+esac
+
+if test "$LTP_GENHTML" = ""; then
+   AC_MSG_ERROR([Could not find genhtml from the LTP package])
+fi
+
+PHP_SUBST(LTP)
+PHP_SUBST(LTP_GENHTML)
+  ])
+
+  PHP_PROG_LTP
+  AC_CHECK_LIB(gcov, __gcov_open, [
+PHP_ADD_LIBRARY(gcov)
+AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
+CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
+PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.gcov,$abs_srcdir)
+  ], [
+AC_MSG_ERROR([Problem with enabling gcov. Please check config.log for 
details.])
+  ])
+fi
 
 PHP_ARG_ENABLE(debug, whether to include debugging symbols,
 [  --enable-debug  Compile with debugging symbols], no, no)

http://cvs.php.net/co.php/php-src/Makefile.gcov?r=1.1&p=1
Index: php-src/Makefile.gcov
+++ php-src/Makefile.gcov
.php_cov_info.ltpdata:
@mkdir -p .cov/; \
find . -name \*.gcda -o -name \*.gcno | sed -e 's/^\.\/\.cov\/.*//' | 
xargs --replace cp {} .cov/; \
find . -name \*.gcda -o -name \*.gcno | sed -e 's/^\.\/\.cov\/.*//' | 
sed -e 's/^\.\///' | xargs --max-args=1 dirname | sed -e 's/\/.*//' | xargs 
--replace ln -s `pwd`/{} `pwd`/.cov > /dev/null 2>&1; \
$(LTP) --directory .cov --output-file=.php_cov_info.ltpdata --capture; \

cov: .php_cov_info.ltpdata

cov-html: cov 
@$(LTP_GENHTML) -o cov_html/ .php_cov_info.ltpdata -t "PHP Code 
Coverage" -s;

cov-clean:
find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;
rm -f .cov/*  # This is done first, since we are symlinked inside..
rm -Rf .cov   # Now remove the directory
rm -f .php_cov_info.ltpdata
rm -Rf cov_html

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS

2005-10-19 Thread Antony Dovgal
tony2001Wed Oct 19 19:11:14 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcNEWS 
  Log:
  BFN
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.501&r2=1.1760.2.502&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.501 php-src/NEWS:1.1760.2.502
--- php-src/NEWS:1.1760.2.501   Sat Oct 15 03:33:01 2005
+++ php-src/NEWSWed Oct 19 19:11:12 2005
@@ -35,6 +35,7 @@
   (Dmitry, Alex)
 - Fixed bug #33383 (crash when retrieving empty LOBs). (Tony)
 - Fixed bug #32179 (xmlrpc_encode() segfaults with recursive references). 
(Tony)
+- Fixed bug #29983 (PHP does not explicitly set mime type & charset). (Ilia)
 
 05 Sep 2005, PHP 5.0.5
 - Upgraded PCRE library to version 5.0. (Andrei)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /main SAPI.c /sapi/cli php_cli.c

2005-10-19 Thread Antony Dovgal
tony2001Wed Oct 19 19:08:16 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/main   SAPI.c 
/php-src/sapi/cli   php_cli.c 
  Log:
  MFH: 
  fixed bug #29983 (PHP does not explicitly set mime type & charset)
  + call sapi_deactivate() when called with -m switch
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.187.2.3&r2=1.187.2.4&ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.187.2.3 php-src/main/SAPI.c:1.187.2.4
--- php-src/main/SAPI.c:1.187.2.3   Tue Feb 22 09:46:15 2005
+++ php-src/main/SAPI.c Wed Oct 19 19:08:07 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.187.2.3 2005/02/22 14:46:15 sniper Exp $ */
+/* $Id: SAPI.c,v 1.187.2.4 2005/10/19 23:08:07 tony2001 Exp $ */
 
 #include 
 #include 
@@ -749,6 +749,12 @@
/* Success-oriented.  We set headers_sent to 1 here to avoid an 
infinite loop
 * in case of an error situation.
 */
+   if (SG(sapi_headers).send_default_content_type && 
sapi_module.send_headers) {
+   sapi_header_struct default_header;
+   sapi_get_default_content_type_header(&default_header TSRMLS_CC);
+   sapi_add_header_ex(default_header.header, 
default_header.header_len, 0, 0 TSRMLS_CC);
+   }
+
SG(headers_sent) = 1;
 
if (sapi_module.send_headers) {
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.113.2.3&r2=1.113.2.4&ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.113.2.3 
php-src/sapi/cli/php_cli.c:1.113.2.4
--- php-src/sapi/cli/php_cli.c:1.113.2.3Thu Oct  6 16:36:45 2005
+++ php-src/sapi/cli/php_cli.c  Wed Oct 19 19:08:14 2005
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.113.2.3 2005/10/06 20:36:45 johannes Exp $ */
+/* $Id: php_cli.c,v 1.113.2.4 2005/10/19 23:08:14 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -689,6 +689,7 @@
php_printf("\n");
php_end_ob_buffers(1 TSRMLS_CC);
exit_status=0;
+   sapi_deactivate(TSRMLS_C);
zend_ini_deactivate(TSRMLS_C);
goto out_err;
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) /sapi/cli php_cli.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 17:57:46 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/cli   php_cli.c 
  Log:
  MFH: Fixed -m memory leak
  
  
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.129.2.2&r2=1.129.2.3&ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.129.2.2 
php-src/sapi/cli/php_cli.c:1.129.2.3
--- php-src/sapi/cli/php_cli.c:1.129.2.2Tue Oct 11 14:58:59 2005
+++ php-src/sapi/cli/php_cli.c  Wed Oct 19 17:57:45 2005
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.129.2.2 2005/10/11 18:58:59 sniper Exp $ */
+/* $Id: php_cli.c,v 1.129.2.3 2005/10/19 21:57:45 iliaa Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -721,6 +721,7 @@
php_printf("\n");
php_end_ob_buffers(1 TSRMLS_CC);
exit_status=0;
+   sapi_deactivate(TSRMLS_C);
zend_ini_deactivate(TSRMLS_C);
goto out_err;
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /sapi/cli php_cli.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 17:57:36 2005 EDT

  Modified files:  
/php-src/sapi/cli   php_cli.c 
  Log:
  Fixed -m memory leak
  
  
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.132&r2=1.133&ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.132 php-src/sapi/cli/php_cli.c:1.133
--- php-src/sapi/cli/php_cli.c:1.132Tue Oct 11 14:58:27 2005
+++ php-src/sapi/cli/php_cli.c  Wed Oct 19 17:57:35 2005
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.132 2005/10/11 18:58:27 sniper Exp $ */
+/* $Id: php_cli.c,v 1.133 2005/10/19 21:57:35 iliaa Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -728,6 +728,7 @@
php_printf("\n");
php_end_ob_buffers(1 TSRMLS_CC);
exit_status=0;
+   sapi_deactivate(TSRMLS_C);
zend_ini_deactivate(TSRMLS_C);
goto out_err;
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c timelib.c timelib_structs.h tm2unixtime.c /ext/date/lib/resource parse_date.re /ext/date/tests bug20382-2.phpt bug33414-1.phpt bug33414-2.phpt bug33

2005-10-19 Thread Derick Rethans
derick  Wed Oct 19 17:11:15 2005 EDT

  Modified files:  
/php-src/ext/date/lib   parse_date.c timelib.c timelib_structs.h 
tm2unixtime.c 
/php-src/ext/date/lib/resource  parse_date.re 
/php-src/ext/date/tests bug20382-2.phpt bug33414-1.phpt 
bug33414-2.phpt bug33415-1.phpt 
bug33415-2.phpt 
  Log:
  - MF51: Fixed bug #34874 and #33546 (Problems with lone daynames).
  
  http://cvs.php.net/diff.php/php-src/ext/date/lib/parse_date.c?r1=1.36&r2=1.37&ty=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.36 
php-src/ext/date/lib/parse_date.c:1.37
--- php-src/ext/date/lib/parse_date.c:1.36  Sat Oct  8 10:30:06 2005
+++ php-src/ext/date/lib/parse_date.c   Wed Oct 19 17:11:14 2005
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.10.dev on Sat Oct  8 16:29:08 2005 */
+/* Generated by re2c 0.9.10.dev on Wed Oct 19 22:39:08 2005 */
 #line 1 "resource/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.36 2005/10/08 14:30:06 derick Exp $ */
+/* $Id: parse_date.c,v 1.37 2005/10/19 21:11:14 derick Exp $ */
 
 #include "timelib.h"
 
@@ -102,7 +102,7 @@
 #define TIMELIB_UNHAVE_TIME() { s->time->have_time = 0; s->time->h = 0; 
s->time->i = 0; s->time->s = 0; s->time->f = 0; }
 #define TIMELIB_HAVE_DATE() { if (s->time->have_date) { return TIMELIB_ERROR; 
} else { s->time->have_date = 1; } }
 #define TIMELIB_UNHAVE_DATE() { s->time->have_date = 0; s->time->d = 0; 
s->time->m = 0; s->time->y = 0; }
-#define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; }
+#define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; 
s->time->relative.weekday_behavior = 0; }
 #define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_weekday_relative = 1; }
 #define TIMELIB_HAVE_TZ() { s->cur = cursor; if (s->time->have_zone) { return 
TIMELIB_ERROR; } else { s->time.have_zone = 1; } }
 
@@ -224,8 +224,8 @@
{ "twelfth",  0, 12 },
{ "last", 0, -1 },
{ "previous", 0, -1 },
-   { "this", 0,  0 },
-   { NULL,   0,  0 }
+   { "this", 1,  0 },
+   { NULL,   1,  0 }
 };
 
 /* The month table. */
@@ -441,7 +441,7 @@
return 0;
 }
 
-static timelib_sll timelib_lookup_relative_text(char **ptr)
+static timelib_sll timelib_lookup_relative_text(char **ptr, int *behavior)
 {
char *word;
char *begin = *ptr, *end;
@@ -458,6 +458,7 @@
for (tp = timelib_reltext_lookup; tp->name; tp++) {
if (strcasecmp(word, tp->name) == 0) {
value = tp->value;
+   *behavior = tp->type;
}
}
 
@@ -465,12 +466,12 @@
return value;
 }
 
-static timelib_sll timelib_get_relative_text(char **ptr)
+static timelib_sll timelib_get_relative_text(char **ptr, int *behavior)
 {
while (**ptr == ' ' || **ptr == '-' || **ptr == '/') {
++*ptr;
}
-   return timelib_lookup_relative_text(ptr);
+   return timelib_lookup_relative_text(ptr, behavior);
 }
 
 static long timelib_lookup_month(char **ptr)
@@ -536,7 +537,7 @@
return value;
 }
 
-static void timelib_set_relative(char **ptr, timelib_sll amount, Scanner *s)
+static void timelib_set_relative(char **ptr, timelib_sll amount, int behavior, 
Scanner *s)
 {
const timelib_relunit* relunit;
 
@@ -554,6 +555,7 @@
TIMELIB_UNHAVE_TIME();
s->time->relative.d += (amount > 0 ? amount - 1 : 
amount) * 7;
s->time->relative.weekday = relunit->multiplier;
+   s->time->relative.weekday_behavior = behavior;
break;
}
 }
@@ -693,7 +695,7 @@
 std:
s->tok = cursor;
s->len = 0;
-#line 800 "resource/parse_date.re"
+#line 802 "resource/parse_date.re"
 
 
 {
@@ -732,7 +734,7 @@
  0,   0,   0,   0,   0,   0,   0,   0, 
};
 
-#line 736 ""
+#line 738 ""
 {
YYCTYPE yych;
unsigned int yyaccept;
@@ -817,7 +819,7 @@
 yy3:
YYDEBUG(3, *YYCURSOR);
 
-#line 1296 "resource/parse_date.re"
+#line 1300 "resource/parse_date.re"
 {
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -827,7 +829,7 @@
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 824 ""
+#line 826 ""
 yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -937,13 +939,13 @@
 yy8:
YYDEBUG(8, *YYCURSOR);
 
-#line 1362 "resource/parse_date.re"
+#line 1366 "resource/parse_date.re"
 {
 /* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */
s->errors++;
goto std;
}
-#line 929 ""
+#line 931 ""
 yy9:
YYDEB

[PHP-CVS] cvs: php-src(PHP_5_1) /ext/date/lib parse_date.c timelib.c timelib_structs.h tm2unixtime.c /ext/date/lib/resource parse_date.re /ext/date/tests bug20382-2.phpt bug33414-1.phpt bug33414-2.p

2005-10-19 Thread Derick Rethans
derick  Wed Oct 19 17:08:38 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/date/lib   parse_date.c timelib.c timelib_structs.h 
tm2unixtime.c 
/php-src/ext/date/lib/resource  parse_date.re 
/php-src/ext/date/tests bug20382-2.phpt bug33414-1.phpt 
bug33414-2.phpt bug33415-1.phpt 
bug33415-2.phpt 
  Log:
  - Fixed bug #34874 and #33546 (Problems with lone daynames).
  
  http://cvs.php.net/diff.php/php-src/ext/date/lib/parse_date.c?r1=1.29.2.7&r2=1.29.2.8&ty=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.7 
php-src/ext/date/lib/parse_date.c:1.29.2.8
--- php-src/ext/date/lib/parse_date.c:1.29.2.7  Sat Oct  8 10:31:14 2005
+++ php-src/ext/date/lib/parse_date.c   Wed Oct 19 17:08:21 2005
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.10.dev on Sat Oct  8 16:20:36 2005 */
+/* Generated by re2c 0.9.10.dev on Wed Oct 19 15:42:32 2005 */
 #line 1 "resource/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.7 2005/10/08 14:31:14 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.8 2005/10/19 21:08:21 derick Exp $ */
 
 #include "timelib.h"
 
@@ -102,7 +102,7 @@
 #define TIMELIB_UNHAVE_TIME() { s->time->have_time = 0; s->time->h = 0; 
s->time->i = 0; s->time->s = 0; s->time->f = 0; }
 #define TIMELIB_HAVE_DATE() { if (s->time->have_date) { return TIMELIB_ERROR; 
} else { s->time->have_date = 1; } }
 #define TIMELIB_UNHAVE_DATE() { s->time->have_date = 0; s->time->d = 0; 
s->time->m = 0; s->time->y = 0; }
-#define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; }
+#define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; 
s->time->relative.weekday_behavior = 0; }
 #define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_weekday_relative = 1; }
 #define TIMELIB_HAVE_TZ() { s->cur = cursor; if (s->time->have_zone) { return 
TIMELIB_ERROR; } else { s->time.have_zone = 1; } }
 
@@ -224,8 +224,8 @@
{ "twelfth",  0, 12 },
{ "last", 0, -1 },
{ "previous", 0, -1 },
-   { "this", 0,  0 },
-   { NULL,   0,  0 }
+   { "this", 1,  0 },
+   { NULL,   1,  0 }
 };
 
 /* The month table. */
@@ -441,7 +441,7 @@
return 0;
 }
 
-static timelib_sll timelib_lookup_relative_text(char **ptr)
+static timelib_sll timelib_lookup_relative_text(char **ptr, int *behavior)
 {
char *word;
char *begin = *ptr, *end;
@@ -458,6 +458,7 @@
for (tp = timelib_reltext_lookup; tp->name; tp++) {
if (strcasecmp(word, tp->name) == 0) {
value = tp->value;
+   *behavior = tp->type;
}
}
 
@@ -465,12 +466,12 @@
return value;
 }
 
-static timelib_sll timelib_get_relative_text(char **ptr)
+static timelib_sll timelib_get_relative_text(char **ptr, int *behavior)
 {
while (**ptr == ' ' || **ptr == '-' || **ptr == '/') {
++*ptr;
}
-   return timelib_lookup_relative_text(ptr);
+   return timelib_lookup_relative_text(ptr, behavior);
 }
 
 static long timelib_lookup_month(char **ptr)
@@ -536,7 +537,7 @@
return value;
 }
 
-static void timelib_set_relative(char **ptr, timelib_sll amount, Scanner *s)
+static void timelib_set_relative(char **ptr, timelib_sll amount, int behavior, 
Scanner *s)
 {
const timelib_relunit* relunit;
 
@@ -554,6 +555,7 @@
TIMELIB_UNHAVE_TIME();
s->time->relative.d += (amount > 0 ? amount - 1 : 
amount) * 7;
s->time->relative.weekday = relunit->multiplier;
+   s->time->relative.weekday_behavior = behavior;
break;
}
 }
@@ -693,7 +695,7 @@
 std:
s->tok = cursor;
s->len = 0;
-#line 800 "resource/parse_date.re"
+#line 802 "resource/parse_date.re"
 
 
 {
@@ -732,7 +734,7 @@
  0,   0,   0,   0,   0,   0,   0,   0, 
};
 
-#line 736 ""
+#line 738 ""
 {
YYCTYPE yych;
unsigned int yyaccept;
@@ -817,7 +819,7 @@
 yy3:
YYDEBUG(3, *YYCURSOR);
 
-#line 1296 "resource/parse_date.re"
+#line 1300 "resource/parse_date.re"
 {
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -827,7 +829,7 @@
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 824 ""
+#line 826 ""
 yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -937,13 +939,13 @@
 yy8:
YYDEBUG(8, *YYCURSOR);
 
-#line 1362 "resource/parse_date.re"
+#line 1366 "resource/parse_date.re"
 {
 /* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */
s->errors++;
goto std;
}
-#line 929 "

[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /main SAPI.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 16:36:25 2005 EDT

  Modified files:  (Branch: PHP_4_4)
/php-src/main   SAPI.c 
/php-srcNEWS 
  Log:
  MFH: Fixed bug #29983 (PHP does not explicitly set mime type & charset).
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.155.2.24&r2=1.155.2.24.2.1&ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.155.2.24 php-src/main/SAPI.c:1.155.2.24.2.1
--- php-src/main/SAPI.c:1.155.2.24  Tue Feb 22 09:46:24 2005
+++ php-src/main/SAPI.c Wed Oct 19 16:36:19 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.155.2.24 2005/02/22 14:46:24 sniper Exp $ */
+/* $Id: SAPI.c,v 1.155.2.24.2.1 2005/10/19 20:36:19 iliaa Exp $ */
 
 #include 
 #include 
@@ -745,6 +745,12 @@
/* Success-oriented.  We set headers_sent to 1 here to avoid an 
infinite loop
 * in case of an error situation.
 */
+   if (SG(sapi_headers).send_default_content_type && 
sapi_module.send_headers) {
+   sapi_header_struct default_header;
+   sapi_get_default_content_type_header(&default_header TSRMLS_CC);
+   sapi_add_header_ex(default_header.header, 
default_header.header_len, 0, 0 TSRMLS_CC);
+   }
+
SG(headers_sent) = 1;
 
if (sapi_module.send_headers) {
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.58&r2=1.1247.2.920.2.59&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.58 php-src/NEWS:1.1247.2.920.2.59
--- php-src/NEWS:1.1247.2.920.2.58  Mon Oct 17 11:43:12 2005
+++ php-src/NEWSWed Oct 19 16:36:22 2005
@@ -10,6 +10,7 @@
   transfer). (Ilia)
 - Fixed bug #34704 (Infinite recursion due to corrupt JPEG). (Marcus)
 - Fixed bug #33383 (crash when retrieving empty LOBs). (Tony)
+- Fixed bug #29983 (PHP does not explicitly set mime type & charset). (Ilia)

 07 Oct 2005, Version 4.4.1RC1
 - Added missing safe_mode checks for image* functions and cURL. (Ilia)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /main SAPI.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 16:33:34 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/main   SAPI.c 
/php-srcNEWS 
  Log:
  MFH: Fixed bug #29983 (PHP does not explicitly set mime type & charset).
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.202&r2=1.202.2.1&ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202 php-src/main/SAPI.c:1.202.2.1
--- php-src/main/SAPI.c:1.202   Wed Aug  3 10:08:25 2005
+++ php-src/main/SAPI.c Wed Oct 19 16:33:33 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.202 2005/08/03 14:08:25 sniper Exp $ */
+/* $Id: SAPI.c,v 1.202.2.1 2005/10/19 20:33:33 iliaa Exp $ */
 
 #include 
 #include 
@@ -772,6 +772,12 @@
/* Success-oriented.  We set headers_sent to 1 here to avoid an 
infinite loop
 * in case of an error situation.
 */
+   if (SG(sapi_headers).send_default_content_type && 
sapi_module.send_headers) {
+   sapi_header_struct default_header;
+   sapi_get_default_content_type_header(&default_header TSRMLS_CC);
+   sapi_add_header_ex(default_header.header, 
default_header.header_len, 0, 0 TSRMLS_CC);
+   }
+
SG(headers_sent) = 1;
 
if (sapi_module.send_headers) {
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.142&r2=1.2027.2.143&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.142 php-src/NEWS:1.2027.2.143
--- php-src/NEWS:1.2027.2.142   Wed Oct 19 10:11:56 2005
+++ php-src/NEWSWed Oct 19 16:33:33 2005
@@ -7,6 +7,7 @@
 - Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip 
   files). (Derick)
 - Fixed bug #34623 (Crash in pdo_mysql on longtext fields). (Ilia)
+- Fixed bug #29983 (PHP does not explicitly set mime type & charset). (Ilia)
 
 17 Oct 2005, PHP 5.1 Release Candidate 3
 - Fixed bug #34873 (Segmentation Fault on foreach in object). (Dmitry)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /main SAPI.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 16:30:42 2005 EDT

  Modified files:  
/php-src/main   SAPI.c 
  Log:
  Fixed bug #29983 (PHP does not explicitly set mime type & charset).
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.203&r2=1.204&ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.203 php-src/main/SAPI.c:1.204
--- php-src/main/SAPI.c:1.203   Thu Aug 11 19:36:02 2005
+++ php-src/main/SAPI.c Wed Oct 19 16:30:38 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.203 2005/08/11 23:36:02 andrei Exp $ */
+/* $Id: SAPI.c,v 1.204 2005/10/19 20:30:38 iliaa Exp $ */
 
 #include 
 #include 
@@ -794,6 +794,12 @@
/* Success-oriented.  We set headers_sent to 1 here to avoid an 
infinite loop
 * in case of an error situation.
 */
+   if (SG(sapi_headers).send_default_content_type && 
sapi_module.send_headers) {
+   sapi_header_struct default_header;
+   sapi_get_default_content_type_header(&default_header TSRMLS_CC);
+   sapi_add_header_ex(default_header.header, 
default_header.header_len, 0, 0 TSRMLS_CC);
+   }
+
SG(headers_sent) = 1;
 
if (sapi_module.send_headers) {


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard string.c

2005-10-19 Thread Rolland Santimano
rolland Wed Oct 19 15:10:21 2005 EDT

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  - Unicode impl of str[c]spn()
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.497&r2=1.498&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.497 php-src/ext/standard/string.c:1.498
--- php-src/ext/standard/string.c:1.497 Mon Oct 17 15:50:13 2005
+++ php-src/ext/standard/string.c   Wed Oct 19 15:10:13 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.497 2005/10/17 19:50:13 rolland Exp $ */
+/* $Id: string.c,v 1.498 2005/10/19 19:10:13 rolland Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -209,14 +209,16 @@
 
 static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior)
 {
-   char *s11, *s22;
-   int len1, len2;
-   long start, len;
+   void *s1, *s2;
+   int32_t len1, len2;
+   zend_uchar type1, type2;
+   long start, len; /* For UNICODE, these are codepoint units */

start = 0;
len = 0;
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ll", &s11, 
&len1,
-   &s22, &len2, &start, &len) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "TT|ll",
+ &s1, &len1, &type1, 
&s2, &len2, &type2,
+ &start, &len) == 
FAILURE) {
return;
}

@@ -246,18 +248,40 @@
len = len1 - start;
}
 
-   if (behavior == STR_STRSPN) {
-   RETURN_LONG(php_strspn(s11 + start /*str1_start*/,
-   s22 /*str2_start*/,
-   s11 + start + len /*str1_end*/,
-   s22 + len2 /*str2_end*/));
-   } else if (behavior == STR_STRCSPN) {
-   RETURN_LONG(php_strcspn(s11 + start /*str1_start*/,
-   s22 /*str2_start*/,
-   s11 + start + len /*str1_end*/,
-   s22 + len2 /*str2_end*/));
+   if (type1 == IS_UNICODE) {
+   UChar *u_start, *u_end;
+   int32_t i = 0;
+
+   U16_FWD_N((UChar*)s1, i, len1, start);
+   u_start = (UChar *)s1 + i;
+   U16_FWD_N((UChar *)s1, i, len1, len);
+   u_end = (UChar *)s1 + i;
+
+   if (behavior == STR_STRSPN) {
+   RETURN_LONG(php_u_strspn(u_start /*str1_start*/,
+(UChar 
*)s2 /*str2_start*/,
+u_end 
/*str1_end*/,
+(UChar 
*)s2 + len2 /*str2_end*/));
+   } else if (behavior == STR_STRCSPN) {
+   RETURN_LONG(php_u_strcspn(u_start /*str1_start*/,
+ 
(UChar *)s2 /*str2_start*/,
+ u_end 
/*str1_end*/,
+ 
(UChar *)s2 + len2 /*str2_end*/));
+   }
+   } else {
+   if (behavior == STR_STRSPN) {
+   RETURN_LONG(php_strspn((char *)s1 + start 
/*str1_start*/,
+  (char *)s2 
/*str2_start*/,
+  (char *)s1 + 
start + len /*str1_end*/,
+  (char *)s2 + 
len2 /*str2_end*/));
+   } else if (behavior == STR_STRCSPN) {
+   RETURN_LONG(php_strcspn((char *)s1 + start 
/*str1_start*/,
+   (char 
*)s2 /*str2_start*/,
+   (char 
*)s1 + start + len /*str1_end*/,
+   (char 
*)s2 + len2 /*str2_end*/));
+   }
}
-   
+
 }
 
 /* {{{ proto int strspn(string str, string mask [, start [, len]])
@@ -1901,6 +1925,25 @@
 }
 /* }}} */
 
+/* {{{ php_u_strspn
+ */
+PHPAPI int32_t php_u_strspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end)
+{
+   int32_t len1 = s1_end - s1;
+   int32_t len2 = s2_end - s2;
+   int32_t i, codepts;
+   UChar32 ch;
+
+   for (i = 0, codepts = 0 ; i < len1 ; codepts++) {
+   U16_NEXT(s1, i, len1, ch);
+   if (u_memchr32(s2, ch, len2) == NULL) {
+   

Re: [PHP-CVS] cvs: php-src /ext/standard uniqid.c

2005-10-19 Thread Marcus Boerger
Hello Ilia,

  why did you change this, the E_ERROR was there to make clear it does not
work and can never work

Wednesday, October 19, 2005, 3:41:37 PM, you wrote:

> iliaa   Wed Oct 19 09:41:37 2005 EDT

>   Modified files:  
> /php-src/ext/standard   uniqid.c 
>   Log:
>   Change E_ERROR to E_WARNING when more_entropy flag is off on Cygwin.
>   
>   
> http://cvs.php.net/diff.php/php-src/ext/standard/uniqid.c?r1=1.42&r2=1.43&ty=u
> Index: php-src/ext/standard/uniqid.c
> diff -u php-src/ext/standard/uniqid.c:1.42 php-src/ext/standard/uniqid.c:1.43
> --- php-src/ext/standard/uniqid.c:1.42  Tue Aug 23 08:53:30 2005
> +++ php-src/ext/standard/uniqid.c   Wed Oct 19 09:41:36 2005
> @@ -16,7 +16,7 @@
> +--+
>   */
>  
> -/* $Id: uniqid.c,v 1.42 2005/08/23 12:53:30 dmitry Exp $ */
> +/* $Id: uniqid.c,v 1.43 2005/10/19 13:41:36 iliaa Exp $ */
>  
>  #include "php.h"
>  
> @@ -61,8 +61,8 @@
>  #if HAVE_USLEEP && !defined(PHP_WIN32)
> if (!more_entropy) {
>  #if defined(__CYGWIN__)
> -   php_error_docref(NULL TSRMLS_CC, E_ERROR, "You must use 'more 
> entropy' under CYGWIN.");
> -   return;
> +   php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must use 
> 'more entropy' under CYGWIN.");
> +   RETURN_FALSE;
>  #else
> usleep(1);
>  #endif




Best regards,
 Marcus

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/pdo_mysql mysql_statement.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 10:11:57 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/pdo_mysql  mysql_statement.c 
/php-srcNEWS 
  Log:
  MFH: Fixed bug #34623 (Crash in pdo_mysql on longtext fields).
  
  
http://cvs.php.net/diff.php/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.48.2.3&r2=1.48.2.4&ty=u
Index: php-src/ext/pdo_mysql/mysql_statement.c
diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.3 
php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.4
--- php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.3Thu Sep 29 15:56:35 2005
+++ php-src/ext/pdo_mysql/mysql_statement.c Wed Oct 19 10:11:56 2005
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: mysql_statement.c,v 1.48.2.3 2005/09/29 19:56:35 helly Exp $ */
+/* $Id: mysql_statement.c,v 1.48.2.4 2005/10/19 14:11:56 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -71,6 +71,8 @@
return 1;
 }
 
+#define PDO_MYSQL_MAX_BUFFER 1024*1024 /* 1 megabyte */
+
 static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
 {
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
@@ -141,6 +143,10 @@

S->bound_result[i].buffer_length =

S->fields[i].max_length? S->fields[i].max_length:

S->fields[i].length;
+   /* work-around for 
longtext and alike */
+   if 
(S->bound_result[i].buffer_length > PDO_MYSQL_MAX_BUFFER) {
+   
S->bound_result[i].buffer_length = PDO_MYSQL_MAX_BUFFER;
+   }
}
 #if 0
printf("%d: max_length=%d length=%d 
buffer_length=%d type=%d\n",
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.141&r2=1.2027.2.142&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.141 php-src/NEWS:1.2027.2.142
--- php-src/NEWS:1.2027.2.141   Wed Oct 19 07:18:14 2005
+++ php-src/NEWSWed Oct 19 10:11:56 2005
@@ -4,7 +4,9 @@
 - Fixed bug #34905 (Digest authentication does not work with Apache 1). (Ilia)
 - Fixed bug #34902 (mysqli::character_set_name() - undefined method). (Tony)
 - Fixed bug #34899 (Fixed sqlite extension compile failure). (Ilia)
-- Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip 
files). (Derick)
+- Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip 
+  files). (Derick)
+- Fixed bug #34623 (Crash in pdo_mysql on longtext fields). (Ilia)
 
 17 Oct 2005, PHP 5.1 Release Candidate 3
 - Fixed bug #34873 (Segmentation Fault on foreach in object). (Dmitry)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pdo_mysql mysql_statement.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 10:11:27 2005 EDT

  Modified files:  
/php-src/ext/pdo_mysql  mysql_statement.c 
  Log:
  Fixed bug #34623 (Crash in pdo_mysql on longtext fields).
  
  
http://cvs.php.net/diff.php/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.50&r2=1.51&ty=u
Index: php-src/ext/pdo_mysql/mysql_statement.c
diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.50 
php-src/ext/pdo_mysql/mysql_statement.c:1.51
--- php-src/ext/pdo_mysql/mysql_statement.c:1.50Thu Sep  1 10:31:34 2005
+++ php-src/ext/pdo_mysql/mysql_statement.c Wed Oct 19 10:11:25 2005
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: mysql_statement.c,v 1.50 2005/09/01 14:31:34 gschlossnagle Exp $ */
+/* $Id: mysql_statement.c,v 1.51 2005/10/19 14:11:25 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -71,6 +71,8 @@
return 1;
 }
 
+#define PDO_MYSQL_MAX_BUFFER 1024*1024 /* 1 megabyte */
+
 static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
 {
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
@@ -141,6 +143,10 @@

S->bound_result[i].buffer_length =

S->fields[i].max_length? S->fields[i].max_length:

S->fields[i].length;
+   /* work-around for 
longtext and alike */
+   if 
(S->bound_result[i].buffer_length > PDO_MYSQL_MAX_BUFFER) {
+   
S->bound_result[i].buffer_length = PDO_MYSQL_MAX_BUFFER;
+   }
}
S->bound_result[i].buffer = 
emalloc(S->bound_result[i].buffer_length);
S->bound_result[i].is_null = 
&S->out_null[i];

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard uniqid.c

2005-10-19 Thread Antony Dovgal
tony2001Wed Oct 19 09:47:29 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   uniqid.c 
  Log:
  backport Ilia's last patch to 5.0
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/uniqid.c?r1=1.39&r2=1.39.2.1&ty=u
Index: php-src/ext/standard/uniqid.c
diff -u php-src/ext/standard/uniqid.c:1.39 
php-src/ext/standard/uniqid.c:1.39.2.1
--- php-src/ext/standard/uniqid.c:1.39  Thu Jan  8 03:17:34 2004
+++ php-src/ext/standard/uniqid.c   Wed Oct 19 09:47:25 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: uniqid.c,v 1.39 2004/01/08 08:17:34 andi Exp $ */
+/* $Id: uniqid.c,v 1.39.2.1 2005/10/19 13:47:25 tony2001 Exp $ */
 
 #include "php.h"
 
@@ -62,8 +62,8 @@
 #if HAVE_USLEEP && !defined(PHP_WIN32)
if (!more_entropy) {
 #if defined(__CYGWIN__)
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, "You must use 'more 
entropy' under CYGWIN.");
-   return;
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must use 'more 
entropy' under CYGWIN.");
+   RETURN_FALSE;
 #else
usleep(1);
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/standard uniqid.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 09:42:36 2005 EDT

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/standard   uniqid.c 
  Log:
  MFH: Change E_ERROR to E_WARNING when more_entropy flag is off on Cygwin.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/uniqid.c?r1=1.31.8.4&r2=1.31.8.4.8.1&ty=u
Index: php-src/ext/standard/uniqid.c
diff -u php-src/ext/standard/uniqid.c:1.31.8.4 
php-src/ext/standard/uniqid.c:1.31.8.4.8.1
--- php-src/ext/standard/uniqid.c:1.31.8.4  Tue Dec 31 11:35:35 2002
+++ php-src/ext/standard/uniqid.c   Wed Oct 19 09:42:36 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: uniqid.c,v 1.31.8.4 2002/12/31 16:35:35 sebastian Exp $ */
+/* $Id: uniqid.c,v 1.31.8.4.8.1 2005/10/19 13:42:36 iliaa Exp $ */
 
 #include "php.h"
 
@@ -67,8 +67,8 @@
 #if HAVE_USLEEP && !defined(PHP_WIN32)
if (!more_entropy) {
 #if defined(__CYGWIN__)
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, "You must use 'more 
entropy' under CYGWIN.");
-   return;
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must use 'more 
entropy' under CYGWIN.");
+   RETURN_FALSE;
 #else
usleep(1);
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/standard uniqid.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 09:41:44 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard   uniqid.c 
  Log:
  MFH: Change E_ERROR to E_WARNING when more_entropy flag is off on Cygwin.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/uniqid.c?r1=1.41&r2=1.41.2.1&ty=u
Index: php-src/ext/standard/uniqid.c
diff -u php-src/ext/standard/uniqid.c:1.41 
php-src/ext/standard/uniqid.c:1.41.2.1
--- php-src/ext/standard/uniqid.c:1.41  Wed Aug  3 10:08:14 2005
+++ php-src/ext/standard/uniqid.c   Wed Oct 19 09:41:44 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: uniqid.c,v 1.41 2005/08/03 14:08:14 sniper Exp $ */
+/* $Id: uniqid.c,v 1.41.2.1 2005/10/19 13:41:44 iliaa Exp $ */
 
 #include "php.h"
 
@@ -61,8 +61,8 @@
 #if HAVE_USLEEP && !defined(PHP_WIN32)
if (!more_entropy) {
 #if defined(__CYGWIN__)
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, "You must use 'more 
entropy' under CYGWIN.");
-   return;
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must use 'more 
entropy' under CYGWIN.");
+   RETURN_FALSE;
 #else
usleep(1);
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard uniqid.c

2005-10-19 Thread Ilia Alshanetsky
iliaa   Wed Oct 19 09:41:37 2005 EDT

  Modified files:  
/php-src/ext/standard   uniqid.c 
  Log:
  Change E_ERROR to E_WARNING when more_entropy flag is off on Cygwin.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/uniqid.c?r1=1.42&r2=1.43&ty=u
Index: php-src/ext/standard/uniqid.c
diff -u php-src/ext/standard/uniqid.c:1.42 php-src/ext/standard/uniqid.c:1.43
--- php-src/ext/standard/uniqid.c:1.42  Tue Aug 23 08:53:30 2005
+++ php-src/ext/standard/uniqid.c   Wed Oct 19 09:41:36 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: uniqid.c,v 1.42 2005/08/23 12:53:30 dmitry Exp $ */
+/* $Id: uniqid.c,v 1.43 2005/10/19 13:41:36 iliaa Exp $ */
 
 #include "php.h"
 
@@ -61,8 +61,8 @@
 #if HAVE_USLEEP && !defined(PHP_WIN32)
if (!more_entropy) {
 #if defined(__CYGWIN__)
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, "You must use 'more 
entropy' under CYGWIN.");
-   return;
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must use 'more 
entropy' under CYGWIN.");
+   RETURN_FALSE;
 #else
usleep(1);
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/date php_date.c /ext/date/tests date_default_timezone_get-1.phpt date_default_timezone_get-2.phpt date_default_timezone_set-1.phpt

2005-10-19 Thread Jani Taskinen
sniper  Wed Oct 19 07:18:51 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/date   php_date.c 
/php-src/ext/date/tests date_default_timezone_get-1.phpt 
date_default_timezone_get-2.phpt 
date_default_timezone_set-1.phpt 
  Log:
  MFH: Fixed error messages and tests
  http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.43.2.18&r2=1.43.2.19&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.18 
php-src/ext/date/php_date.c:1.43.2.19
--- php-src/ext/date/php_date.c:1.43.2.18   Wed Oct 19 03:22:20 2005
+++ php-src/ext/date/php_date.c Wed Oct 19 07:18:51 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.18 2005/10/19 07:22:20 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.19 2005/10/19 11:18:51 sniper Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -226,6 +226,11 @@
 #define DATE_FORMAT_RFC1123  "D, d M Y H:i:s T"
 #define DATE_FORMAT_RFC2822  "D, d M Y H:i:s O"
 
+#define DATE_TZ_ERRMSG \
+   "It is not safe to rely on the system's timezone settings. Please use " 
\
+   "the date.timezone setting, the TZ environment variable or the " \
+   "date_default_timezone_set() function. "
+
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(date)
 {
@@ -326,7 +331,7 @@
tzid = "UTC";
}

-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to 
rely on the system's timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We 
select '%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) 
(ta->tm_gmtoff / 3600), ta->tm_isdst ? "DST" : "no DST");
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG "We 
selected '%s' for '%s/%.1f/%s' instead", tzid, ta->tm_zone, (float) 
(ta->tm_gmtoff / 3600), ta->tm_isdst ? "DST" : "no DST");
return tzid;
}
 #endif
@@ -345,7 +350,7 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the system's timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We select '%s' for '%.1f/no DST' 
instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/no DST' instead", tzid, ((tzi.Bias + 
tzi.StandardBias) / -60.0));
break;
 
/* DST in effect */
@@ -359,14 +364,14 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the system's timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We select '%s' for '%.1f/DST' instead.", 
tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/DST' instead", tzid, ((tzi.Bias + 
tzi.DaylightBias) / -60.0));
break;
}
return tzid;
}
 #endif
/* Fallback to UTC */
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "It is not safe to rely on 
the system's timezone settings, please use the date.timezone setting, the TZ 
environment variable or the date_default_timezone_set() function. We have to 
select 'UTC' because your platform doesn't provide functionality for the 
guessing algorithm");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We had to 
select 'UTC' because your platform doesn't provide functionality for the 
guessing algorithm");
return "UTC";
 }
 
@@ -378,7 +383,7 @@
tz = guess_timezone(TSRMLS_C);
tzi = php_date_parse_tzfile(tz, DATE_TIMEZONEDB TSRMLS_CC);
if (! tzi) {
-   php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Timezone setting 
(date.timezone) or TZ environment variable contains an unknown timezone.");
+   php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Timezone setting 
(date.timezone) or TZ environment variable contains an unknown timezone");
tzi = php_date_parse_tzfile("UTC", DATE_TIMEZONEDB TSRMLS_CC);
 
if (! tzi) {
@@ -746,7 +751,7 @@
now->h = hou;
break;
default:
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "You should 
be using t

[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS

2005-10-19 Thread Antony Dovgal
tony2001Wed Oct 19 07:18:16 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
  Log:
  fix news entry
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.140&r2=1.2027.2.141&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.140 php-src/NEWS:1.2027.2.141
--- php-src/NEWS:1.2027.2.140   Tue Oct 18 19:15:28 2005
+++ php-src/NEWSWed Oct 19 07:18:14 2005
@@ -3,7 +3,7 @@
 ?? Oct 2005, PHP 5.1 Release Candidate 4
 - Fixed bug #34905 (Digest authentication does not work with Apache 1). (Ilia)
 - Fixed bug #34902 (mysqli::character_set_name() - undefined method). (Tony)
-- Fixed bug #34899 (Fixed sqlite extension compile failure). ?(Ilia)
+- Fixed bug #34899 (Fixed sqlite extension compile failure). (Ilia)
 - Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip 
files). (Derick)
 
 17 Oct 2005, PHP 5.1 Release Candidate 3

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests date_default_timezone_get-1.phpt date_default_timezone_get-2.phpt date_default_timezone_set-1.phpt

2005-10-19 Thread Jani Taskinen
sniper  Wed Oct 19 07:18:16 2005 EDT

  Modified files:  
/php-src/ext/date   php_date.c 
/php-src/ext/date/tests date_default_timezone_get-1.phpt 
date_default_timezone_get-2.phpt 
date_default_timezone_set-1.phpt 
  Log:
  - Fixed error messages and tests
  http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.64&r2=1.65&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.64 php-src/ext/date/php_date.c:1.65
--- php-src/ext/date/php_date.c:1.64Wed Oct 19 03:21:35 2005
+++ php-src/ext/date/php_date.c Wed Oct 19 07:18:13 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.64 2005/10/19 07:21:35 derick Exp $ */
+/* $Id: php_date.c,v 1.65 2005/10/19 11:18:13 sniper Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -228,6 +228,11 @@
 #define DATE_FORMAT_RFC1123  "D, d M Y H:i:s T"
 #define DATE_FORMAT_RFC2822  "D, d M Y H:i:s O"
 
+#define DATE_TZ_ERRMSG \
+   "It is not safe to rely on the system's timezone settings. Please use " 
\
+   "the date.timezone setting, the TZ environment variable or the " \
+   "date_default_timezone_set() function. "
+
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(date)
 {
@@ -328,7 +333,7 @@
tzid = "UTC";
}

-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to 
rely on the system's timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We 
select '%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) 
(ta->tm_gmtoff / 3600), ta->tm_isdst ? "DST" : "no DST");
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG "We 
selected '%s' for '%s/%.1f/%s' instead", tzid, ta->tm_zone, (float) 
(ta->tm_gmtoff / 3600), ta->tm_isdst ? "DST" : "no DST");
return tzid;
}
 #endif
@@ -347,7 +352,7 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the system's timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We select '%s' for '%.1f/no DST' 
instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/no DST' instead", tzid, ((tzi.Bias + 
tzi.StandardBias) / -60.0));
break;
 
/* DST in effect */
@@ -361,14 +366,14 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the system's timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We select '%s' for '%.1f/DST' instead.", 
tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/DST' instead", tzid, ((tzi.Bias + 
tzi.DaylightBias) / -60.0));
break;
}
return tzid;
}
 #endif
/* Fallback to UTC */
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "It is not safe to rely on 
the system's timezone settings, please use the date.timezone setting, the TZ 
environment variable or the date_default_timezone_set() function. We have to 
select 'UTC' because your platform doesn't provide functionality for the 
guessing algorithm");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We had to 
select 'UTC' because your platform doesn't provide functionality for the 
guessing algorithm");
return "UTC";
 }
 
@@ -380,7 +385,7 @@
tz = guess_timezone(TSRMLS_C);
tzi = php_date_parse_tzfile(tz, DATE_TIMEZONEDB TSRMLS_CC);
if (! tzi) {
-   php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Timezone setting 
(date.timezone) or TZ environment variable contains an unknown timezone.");
+   php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Timezone setting 
(date.timezone) or TZ environment variable contains an unknown timezone");
tzi = php_date_parse_tzfile("UTC", DATE_TIMEZONEDB TSRMLS_CC);
 
if (! tzi) {
@@ -860,7 +865,7 @@
now->h = hou;
break;
default:
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "You should 
be using the time() function instead.");
+   php_

Re: [PHP-CVS] cvs: php-src /ext/date php_date.c

2005-10-19 Thread Jani Taskinen


When you 'improve' the texts, try keeping the tests from failing too.

--Jani


On Wed, 19 Oct 2005, Derick Rethans wrote:



derick  Wed Oct 19 03:21:35 2005 EDT

 Modified files:
   /php-src/ext/datephp_date.c
 Log:
 - Improve error messages a bit.


http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.63&r2=1.64&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.63 php-src/ext/date/php_date.c:1.64
--- php-src/ext/date/php_date.c:1.63Sat Oct 15 14:14:40 2005
+++ php-src/ext/date/php_date.c Wed Oct 19 03:21:35 2005
@@ -16,7 +16,7 @@
   +--+
 */

-/* $Id: php_date.c,v 1.63 2005/10/15 18:14:40 derick Exp $ */
+/* $Id: php_date.c,v 1.64 2005/10/19 07:21:35 derick Exp $ */

#include "php.h"
#include "php_streams.h"
@@ -328,7 +328,7 @@
tzid = "UTC";
}

-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the systems timezone 
settings, please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() 
function. We use '%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) (ta->tm_gmtoff / 3600), 
ta->tm_isdst ? "DST" : "no DST");
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the system's timezone 
settings, please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() 
function. We select '%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) (ta->tm_gmtoff / 3600), 
ta->tm_isdst ? "DST" : "no DST");
return tzid;
}
#endif
@@ -347,7 +347,7 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is 
not safe to rely on the systems timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We use '%s' for 
'%.1f/no DST' instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is 
not safe to rely on the system's timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We select '%s' 
for '%.1f/no DST' instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
break;

/* DST in effect */
@@ -361,13 +361,14 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is 
not safe to rely on the systems timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We use '%s' for 
'%.1f/DST' instead.", tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is 
not safe to rely on the system's timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We select '%s' 
for '%.1f/DST' instead.", tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
break;
}
return tzid;
}
#endif
/* Fallback to UTC */
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "It is not safe to rely on the 
system's timezone settings, please use the date.timezone setting, the TZ environment 
variable or the date_default_timezone_set() function. We have to select 'UTC' because 
your platform doesn't provide functionality for the guessing algorithm");
return "UTC";
}





--
Give me your money at @ 
Donating money may make me happier and friendlier for a limited period!
Death to all 4 letter abbreviations starting with P!

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard/tests/array array_sum.phpt

2005-10-19 Thread Antony Dovgal
tony2001Wed Oct 19 06:39:41 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard/tests/array   array_sum.phpt 
  Log:
  fix test (it fails on 64-bit hosts because of too low memory_limit)
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/tests/array/array_sum.phpt?r1=1.4&r2=1.4.2.1&ty=u
Index: php-src/ext/standard/tests/array/array_sum.phpt
diff -u php-src/ext/standard/tests/array/array_sum.phpt:1.4 
php-src/ext/standard/tests/array/array_sum.phpt:1.4.2.1
--- php-src/ext/standard/tests/array/array_sum.phpt:1.4 Sun Feb 22 21:09:48 2004
+++ php-src/ext/standard/tests/array/array_sum.phpt Wed Oct 19 06:39:38 2005
@@ -1,7 +1,7 @@
 --TEST--
 Test array_sum()
 --INI--
-memory_limit=16M
+memory_limit=64M
 --FILE--
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/soap soap.c

2005-10-19 Thread Dmitry Stogov
dmitry  Wed Oct 19 03:55:05 2005 EDT

  Modified files:  
/php-src/ext/soap   soap.c 
  Log:
  Fixed memory leak in ZTS mode
  
  
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.164&r2=1.165&ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.164 php-src/ext/soap/soap.c:1.165
--- php-src/ext/soap/soap.c:1.164   Sun Oct  9 07:31:51 2005
+++ php-src/ext/soap/soap.c Wed Oct 19 03:55:05 2005
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: soap.c,v 1.164 2005/10/09 11:31:51 dmitry Exp $ */
+/* $Id: soap.c,v 1.165 2005/10/19 07:55:05 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -403,14 +403,16 @@
 #endif
 PHP_INI_END()
 
-static void php_soap_init_globals(zend_soap_globals *soap_globals)
+static HashTable defEnc, defEncIndex, defEncNs;
+
+static void php_soap_prepare_globals()
 {
int i;
encodePtr enc;
 
-   zend_hash_init(&soap_globals->defEnc, 0, NULL, NULL, 1);
-   zend_hash_init(&soap_globals->defEncIndex, 0, NULL, NULL, 1);
-   zend_hash_init(&soap_globals->defEncNs, 0, NULL, NULL, 1);
+   zend_hash_init(&defEnc, 0, NULL, NULL, 1);
+   zend_hash_init(&defEncIndex, 0, NULL, NULL, 1);
+   zend_hash_init(&defEncNs, 0, NULL, NULL, 1);
 
i = 0;
do {
@@ -422,27 +424,33 @@
char *ns_type;
ns_type = 
emalloc(strlen(defaultEncoding[i].details.ns) + 
strlen(defaultEncoding[i].details.type_str) + 2);
sprintf(ns_type, "%s:%s", 
defaultEncoding[i].details.ns, defaultEncoding[i].details.type_str);
-   zend_hash_add(&soap_globals->defEnc, ns_type, 
strlen(ns_type) + 1, &enc, sizeof(encodePtr), NULL);
+   zend_hash_add(&defEnc, ns_type, strlen(ns_type) 
+ 1, &enc, sizeof(encodePtr), NULL);
efree(ns_type);
} else {
-   zend_hash_add(&soap_globals->defEnc, 
defaultEncoding[i].details.type_str, 
strlen(defaultEncoding[i].details.type_str) + 1, &enc, sizeof(encodePtr), NULL);
+   zend_hash_add(&defEnc, 
defaultEncoding[i].details.type_str, 
strlen(defaultEncoding[i].details.type_str) + 1, &enc, sizeof(encodePtr), NULL);
}
}
/* Index everything by number */
-   if (!zend_hash_index_exists(&soap_globals->defEncIndex, 
defaultEncoding[i].details.type)) {
-   zend_hash_index_update(&soap_globals->defEncIndex, 
defaultEncoding[i].details.type, &enc, sizeof(encodePtr), NULL);
+   if (!zend_hash_index_exists(&defEncIndex, 
defaultEncoding[i].details.type)) {
+   zend_hash_index_update(&defEncIndex, 
defaultEncoding[i].details.type, &enc, sizeof(encodePtr), NULL);
}
i++;
} while (defaultEncoding[i].details.type != END_KNOWN_TYPES);
 
/* hash by namespace */
-   zend_hash_add(&soap_globals->defEncNs, XSD_1999_NAMESPACE, 
sizeof(XSD_1999_NAMESPACE), XSD_NS_PREFIX, sizeof(XSD_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, XSD_NAMESPACE, 
sizeof(XSD_NAMESPACE), XSD_NS_PREFIX, sizeof(XSD_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, XSI_NAMESPACE, 
sizeof(XSI_NAMESPACE), XSI_NS_PREFIX, sizeof(XSI_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, XML_NAMESPACE, 
sizeof(XML_NAMESPACE), XML_NS_PREFIX, sizeof(XML_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, SOAP_1_1_ENC_NAMESPACE, 
sizeof(SOAP_1_1_ENC_NAMESPACE), SOAP_1_1_ENC_NS_PREFIX, 
sizeof(SOAP_1_1_ENC_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, SOAP_1_2_ENC_NAMESPACE, 
sizeof(SOAP_1_2_ENC_NAMESPACE), SOAP_1_2_ENC_NS_PREFIX, 
sizeof(SOAP_1_2_ENC_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, XSD_1999_NAMESPACE, 
sizeof(XSD_1999_NAMESPACE), XSD_NS_PREFIX, sizeof(XSD_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, XSD_NAMESPACE, sizeof(XSD_NAMESPACE), 
XSD_NS_PREFIX, sizeof(XSD_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, XSI_NAMESPACE, sizeof(XSI_NAMESPACE), 
XSI_NS_PREFIX, sizeof(XSI_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, XML_NAMESPACE, sizeof(XML_NAMESPACE), 
XML_NS_PREFIX, sizeof(XML_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, SOAP_1_1_ENC_NAMESPACE, 
sizeof(SOAP_1_1_ENC_NAMESPACE), SOAP_1_1_ENC_NS_PREFIX, 
sizeof(SOAP_1_1_ENC_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, SOAP_1_2_ENC_NAMESPACE, 
sizeof(SOAP_1_2_ENC_NAMESPACE), SOAP_1_2_ENC_NS_PREFIX, 
sizeof(SOAP_1_2_ENC_NS_PREFIX), NULL);
+}
 
+static void php_soap_init_globals(zend_soap_globals *soap_globals TSRMLS_DC)
+{
+   soap_globals->defEnc = defEnc;
+   soap_globals->defEncIndex = defEncI

[PHP-CVS] cvs: php-src(PHP_5_1) /ext/soap soap.c

2005-10-19 Thread Dmitry Stogov
dmitry  Wed Oct 19 03:54:54 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/soap   soap.c 
  Log:
  Fixed memory leak in ZTS mode
  
  
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.156.2.6&r2=1.156.2.7&ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.156.2.6 php-src/ext/soap/soap.c:1.156.2.7
--- php-src/ext/soap/soap.c:1.156.2.6   Wed Oct  5 03:02:30 2005
+++ php-src/ext/soap/soap.c Wed Oct 19 03:54:53 2005
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: soap.c,v 1.156.2.6 2005/10/05 07:02:30 dmitry Exp $ */
+/* $Id: soap.c,v 1.156.2.7 2005/10/19 07:54:53 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -403,14 +403,16 @@
 #endif
 PHP_INI_END()
 
-static void php_soap_init_globals(zend_soap_globals *soap_globals)
+static HashTable defEnc, defEncIndex, defEncNs;
+
+static void php_soap_prepare_globals()
 {
int i;
encodePtr enc;
 
-   zend_hash_init(&soap_globals->defEnc, 0, NULL, NULL, 1);
-   zend_hash_init(&soap_globals->defEncIndex, 0, NULL, NULL, 1);
-   zend_hash_init(&soap_globals->defEncNs, 0, NULL, NULL, 1);
+   zend_hash_init(&defEnc, 0, NULL, NULL, 1);
+   zend_hash_init(&defEncIndex, 0, NULL, NULL, 1);
+   zend_hash_init(&defEncNs, 0, NULL, NULL, 1);
 
i = 0;
do {
@@ -422,27 +424,33 @@
char *ns_type;
ns_type = 
emalloc(strlen(defaultEncoding[i].details.ns) + 
strlen(defaultEncoding[i].details.type_str) + 2);
sprintf(ns_type, "%s:%s", 
defaultEncoding[i].details.ns, defaultEncoding[i].details.type_str);
-   zend_hash_add(&soap_globals->defEnc, ns_type, 
strlen(ns_type) + 1, &enc, sizeof(encodePtr), NULL);
+   zend_hash_add(&defEnc, ns_type, strlen(ns_type) 
+ 1, &enc, sizeof(encodePtr), NULL);
efree(ns_type);
} else {
-   zend_hash_add(&soap_globals->defEnc, 
defaultEncoding[i].details.type_str, 
strlen(defaultEncoding[i].details.type_str) + 1, &enc, sizeof(encodePtr), NULL);
+   zend_hash_add(&defEnc, 
defaultEncoding[i].details.type_str, 
strlen(defaultEncoding[i].details.type_str) + 1, &enc, sizeof(encodePtr), NULL);
}
}
/* Index everything by number */
-   if (!zend_hash_index_exists(&soap_globals->defEncIndex, 
defaultEncoding[i].details.type)) {
-   zend_hash_index_update(&soap_globals->defEncIndex, 
defaultEncoding[i].details.type, &enc, sizeof(encodePtr), NULL);
+   if (!zend_hash_index_exists(&defEncIndex, 
defaultEncoding[i].details.type)) {
+   zend_hash_index_update(&defEncIndex, 
defaultEncoding[i].details.type, &enc, sizeof(encodePtr), NULL);
}
i++;
} while (defaultEncoding[i].details.type != END_KNOWN_TYPES);
 
/* hash by namespace */
-   zend_hash_add(&soap_globals->defEncNs, XSD_1999_NAMESPACE, 
sizeof(XSD_1999_NAMESPACE), XSD_NS_PREFIX, sizeof(XSD_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, XSD_NAMESPACE, 
sizeof(XSD_NAMESPACE), XSD_NS_PREFIX, sizeof(XSD_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, XSI_NAMESPACE, 
sizeof(XSI_NAMESPACE), XSI_NS_PREFIX, sizeof(XSI_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, XML_NAMESPACE, 
sizeof(XML_NAMESPACE), XML_NS_PREFIX, sizeof(XML_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, SOAP_1_1_ENC_NAMESPACE, 
sizeof(SOAP_1_1_ENC_NAMESPACE), SOAP_1_1_ENC_NS_PREFIX, 
sizeof(SOAP_1_1_ENC_NS_PREFIX), NULL);
-   zend_hash_add(&soap_globals->defEncNs, SOAP_1_2_ENC_NAMESPACE, 
sizeof(SOAP_1_2_ENC_NAMESPACE), SOAP_1_2_ENC_NS_PREFIX, 
sizeof(SOAP_1_2_ENC_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, XSD_1999_NAMESPACE, 
sizeof(XSD_1999_NAMESPACE), XSD_NS_PREFIX, sizeof(XSD_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, XSD_NAMESPACE, sizeof(XSD_NAMESPACE), 
XSD_NS_PREFIX, sizeof(XSD_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, XSI_NAMESPACE, sizeof(XSI_NAMESPACE), 
XSI_NS_PREFIX, sizeof(XSI_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, XML_NAMESPACE, sizeof(XML_NAMESPACE), 
XML_NS_PREFIX, sizeof(XML_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, SOAP_1_1_ENC_NAMESPACE, 
sizeof(SOAP_1_1_ENC_NAMESPACE), SOAP_1_1_ENC_NS_PREFIX, 
sizeof(SOAP_1_1_ENC_NS_PREFIX), NULL);
+   zend_hash_add(&defEncNs, SOAP_1_2_ENC_NAMESPACE, 
sizeof(SOAP_1_2_ENC_NAMESPACE), SOAP_1_2_ENC_NS_PREFIX, 
sizeof(SOAP_1_2_ENC_NS_PREFIX), NULL);
+}
 
+static void php_soap_init_globals(zend_soap_globals *soap_globals TSRMLS_DC)
+{
+   soap_globals->defEnc = defEnc;
+ 

[PHP-CVS] cvs: php-src(PHP_5_1) /ext/date php_date.c

2005-10-19 Thread Derick Rethans
derick  Wed Oct 19 03:22:21 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Improved error messages a bit.
  
  
http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.43.2.17&r2=1.43.2.18&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.17 
php-src/ext/date/php_date.c:1.43.2.18
--- php-src/ext/date/php_date.c:1.43.2.17   Sat Oct 15 14:12:29 2005
+++ php-src/ext/date/php_date.c Wed Oct 19 03:22:20 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.17 2005/10/15 18:12:29 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.18 2005/10/19 07:22:20 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -326,7 +326,7 @@
tzid = "UTC";
}

-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to 
rely on the systems timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We use 
'%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) (ta->tm_gmtoff / 
3600), ta->tm_isdst ? "DST" : "no DST");
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to 
rely on the system's timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We 
select '%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) 
(ta->tm_gmtoff / 3600), ta->tm_isdst ? "DST" : "no DST");
return tzid;
}
 #endif
@@ -345,7 +345,7 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the systems timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We use '%s' for '%.1f/no DST' instead.", 
tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the system's timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We select '%s' for '%.1f/no DST' 
instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
break;
 
/* DST in effect */
@@ -359,13 +359,14 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the systems timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We use '%s' for '%.1f/DST' instead.", 
tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the system's timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We select '%s' for '%.1f/DST' instead.", 
tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
break;
}
return tzid;
}
 #endif
/* Fallback to UTC */
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "It is not safe to rely on 
the system's timezone settings, please use the date.timezone setting, the TZ 
environment variable or the date_default_timezone_set() function. We have to 
select 'UTC' because your platform doesn't provide functionality for the 
guessing algorithm");
return "UTC";
 }
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2005-10-19 Thread Derick Rethans
derick  Wed Oct 19 03:21:35 2005 EDT

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Improve error messages a bit.
  
  
http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.63&r2=1.64&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.63 php-src/ext/date/php_date.c:1.64
--- php-src/ext/date/php_date.c:1.63Sat Oct 15 14:14:40 2005
+++ php-src/ext/date/php_date.c Wed Oct 19 03:21:35 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.63 2005/10/15 18:14:40 derick Exp $ */
+/* $Id: php_date.c,v 1.64 2005/10/19 07:21:35 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -328,7 +328,7 @@
tzid = "UTC";
}

-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to 
rely on the systems timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We use 
'%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) (ta->tm_gmtoff / 
3600), ta->tm_isdst ? "DST" : "no DST");
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to 
rely on the system's timezone settings, please use the date.timezone setting, 
the TZ environment variable or the date_default_timezone_set() function. We 
select '%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) 
(ta->tm_gmtoff / 3600), ta->tm_isdst ? "DST" : "no DST");
return tzid;
}
 #endif
@@ -347,7 +347,7 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the systems timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We use '%s' for '%.1f/no DST' instead.", 
tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the system's timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We select '%s' for '%.1f/no DST' 
instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
break;
 
/* DST in effect */
@@ -361,13 +361,14 @@
if (! tzid) {
tzid = "UTC";
}
-   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the systems timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We use '%s' for '%.1f/DST' instead.", 
tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
+   php_error_docref(NULL TSRMLS_CC, E_STRICT, "It 
is not safe to rely on the system's timezone settings, please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. We select '%s' for '%.1f/DST' instead.", 
tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
break;
}
return tzid;
}
 #endif
/* Fallback to UTC */
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "It is not safe to rely on 
the system's timezone settings, please use the date.timezone setting, the TZ 
environment variable or the date_default_timezone_set() function. We have to 
select 'UTC' because your platform doesn't provide functionality for the 
guessing algorithm");
return "UTC";
 }
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php