[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2007-10-24 Thread changelog
changelog   Thu Oct 25 01:31:22 2007 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2848r2=1.2849diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2848 php-src/ChangeLog:1.2849
--- php-src/ChangeLog:1.2848Wed Oct 24 01:31:22 2007
+++ php-src/ChangeLog   Thu Oct 25 01:31:21 2007
@@ -1,3 +1,16 @@
+2007-10-24  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/xmlwriter/php_xmlwriter.c
+  ext/xmlwriter/php_xmlwriter.c:
+  
+  MFB: Fixed bug #43099 (XMLWriter::endElement() does not check # of 
params)
+
+* (PHP_5_3)
+  ext/xmlwriter/php_xmlwriter.c:
+  Fixed bug #43099 (XMLWriter::endElement() does not check # of params)
+
 2007-10-23  Ilia Alshanetsky  [EMAIL PROTECTED]
 
 * (PHP_5_3)


Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_debug.h

2007-10-24 Thread Andrey Hristov
 Hallo Marcus,
Marcus Boerger wrote:
 Hello Andrey,
 
   basically you cannot use any define. And when you want to be platform
 agnostic/independent then you must assume all posix/c-api functions are
 defines.

I already suspected this when I wrote the code but gcc had no probs with
it. The windows error came as surprise to me, but anyway lesson learnt.

 marcus
 
 Tuesday, October 23, 2007, 12:10:18 PM, you wrote:
 
 andrey  Tue Oct 23 10:10:18 2007 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/mysqlndmysqlnd.c mysqlnd_debug.h 
   Log:
   Fix build failure on Windows. Seems free can't be used even as method
 name of a structure. The MS compiler (the
 preprocessor most probably) changes it to _free_dbg
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.2r2=1.5.2.3diff_format=u
 Index: php-src/ext/mysqlnd/mysqlnd.c
 diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2
 php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3
 --- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2   Fri Oct  5 21:23:56 2007
 +++ php-src/ext/mysqlnd/mysqlnd.c   Tue Oct 23 10:10:18 2007
 @@ -18,7 +18,7 @@
+--+
  */
  
 -/* $Id: mysqlnd.c,v 1.5.2.2 2007/10/05 21:23:56 andrey Exp $ */
 +/* $Id: mysqlnd.c,v 1.5.2.3 2007/10/23 10:10:18 andrey Exp $ */
  #include php.h
  #include mysqlnd.h
  #include mysqlnd_wireprotocol.h
 @@ -2032,7 +2032,7 @@
 DBG_ENTER(RSHUTDOWN);
 if (dbg) {
 dbg-m-close(dbg);
 -   dbg-m-free(dbg);
 +   dbg-m-free_handle(dbg);
 MYSQLND_G(dbg) = NULL;
 }
  #endif
 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.h?r1=1.1.2.2r2=1.1.2.3diff_format=u
 Index: php-src/ext/mysqlnd/mysqlnd_debug.h
 diff -u php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2
 php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.3
 --- php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2 Fri Oct  5 21:23:56 2007
 +++ php-src/ext/mysqlnd/mysqlnd_debug.h Tue Oct 23 10:10:18 2007
 @@ -18,7 +18,7 @@
+--+
  */
  
 -/* $Id: mysqlnd_debug.h,v 1.1.2.2 2007/10/05 21:23:56 andrey Exp $ */
 +/* $Id: mysqlnd_debug.h,v 1.1.2.3 2007/10/23 10:10:18 andrey Exp $ */
  
  #ifndef MYSQLND_DEBUG_H
  #define MYSQLND_DEBUG_H
 @@ -39,7 +39,7 @@
 char * func_name, 
 uint func_name_len);
 enum_func_status (*func_leave)(MYSQLND_DEBUG *self, unsigned int 
 line, const char * const file);
 enum_func_status (*close)(MYSQLND_DEBUG *self);
 -   enum_func_status (*free)(MYSQLND_DEBUG *self);
 +   enum_func_status (*free_handle)(MYSQLND_DEBUG *self);
  };
  
  struct st_mysqlnd_debug
 
 
 
 
 Best regards,
  Marcus
 

Grüße,
Andrey

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xmlwriter php_xmlwriter.c

2007-10-24 Thread Ilia Alshanetsky
iliaa   Wed Oct 24 22:49:02 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlwriter  php_xmlwriter.c 
  Log:
  Fixed bug #43099 (XMLWriter::endElement() does not check # of params)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.20.2.12.2.15.2.1r2=1.20.2.12.2.15.2.2diff_format=u
Index: php-src/ext/xmlwriter/php_xmlwriter.c
diff -u php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.15.2.1 
php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.15.2.2
--- php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.15.2.1Thu Sep 27 
18:00:46 2007
+++ php-src/ext/xmlwriter/php_xmlwriter.c   Wed Oct 24 22:49:02 2007
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: php_xmlwriter.c,v 1.20.2.12.2.15.2.1 2007/09/27 18:00:46 dmitry Exp $ 
*/
+/* $Id: php_xmlwriter.c,v 1.20.2.12.2.15.2.2 2007/10/24 22:49:02 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -464,6 +464,9 @@

if (this) {
XMLWRITER_FROM_OBJECT(intern, this);
+   if (ZEND_NUM_ARGS()) {
+   WRONG_PARAM_COUNT;
+   }
} else 
 #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_2) / NEWS /ext/xmlwriter php_xmlwriter.c

2007-10-24 Thread Ilia Alshanetsky
iliaa   Wed Oct 24 22:50:20 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/xmlwriter  php_xmlwriter.c 
/php-srcNEWS 
  Log:
  
  MFB: Fixed bug #43099 (XMLWriter::endElement() does not check # of params)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.20.2.12.2.15r2=1.20.2.12.2.16diff_format=u
Index: php-src/ext/xmlwriter/php_xmlwriter.c
diff -u php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.15 
php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.16
--- php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.15Mon May 14 
09:23:49 2007
+++ php-src/ext/xmlwriter/php_xmlwriter.c   Wed Oct 24 22:50:19 2007
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: php_xmlwriter.c,v 1.20.2.12.2.15 2007/05/14 09:23:49 pajoye Exp $ */
+/* $Id: php_xmlwriter.c,v 1.20.2.12.2.16 2007/10/24 22:50:19 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -464,6 +464,9 @@

if (this) {
XMLWRITER_FROM_OBJECT(intern, this);
+   if (ZEND_NUM_ARGS()) {
+   WRONG_PARAM_COUNT;
+   }
} else 
 #endif
{
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.985r2=1.2027.2.547.2.986diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.985 php-src/NEWS:1.2027.2.547.2.986
--- php-src/NEWS:1.2027.2.547.2.985 Mon Oct 22 22:43:44 2007
+++ php-src/NEWSWed Oct 24 22:50:19 2007
@@ -37,6 +37,8 @@
 - Fixed htmlentities/htmlspecialchars not to accept partial multibyte
   sequences. (Stas)
 
+- Fixed bug #43099 (XMLWriter::endElement() does not check # of params).
+  (Ilia)
 - Fixed bug #43020 (Warning message is missing with shuffle() and more
   than one argument). (Scott)
 - Fixed bug #4294 (Move *timeout initialization from RINIT to connect time).

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



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

2007-10-24 Thread Ilia Alshanetsky
iliaa   Wed Oct 24 22:50:30 2007 UTC

  Modified files:  
/php-src/ext/xmlwriter  php_xmlwriter.c 
  Log:
  
  MFB: Fixed bug #43099 (XMLWriter::endElement() does not check # of params)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.49r2=1.50diff_format=u
Index: php-src/ext/xmlwriter/php_xmlwriter.c
diff -u php-src/ext/xmlwriter/php_xmlwriter.c:1.49 
php-src/ext/xmlwriter/php_xmlwriter.c:1.50
--- php-src/ext/xmlwriter/php_xmlwriter.c:1.49  Thu Sep 27 18:28:43 2007
+++ php-src/ext/xmlwriter/php_xmlwriter.c   Wed Oct 24 22:50:30 2007
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: php_xmlwriter.c,v 1.49 2007/09/27 18:28:43 dmitry Exp $ */
+/* $Id: php_xmlwriter.c,v 1.50 2007/10/24 22:50:30 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -468,6 +468,9 @@

if (this) {
XMLWRITER_FROM_OBJECT(intern, this);
+   if (ZEND_NUM_ARGS()) {
+   WRONG_PARAM_COUNT;
+   }
} else 
 #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_3) / NEWS /sapi/cgi cgi_main.c

2007-10-24 Thread Dmitry Stogov
dmitry  Thu Oct 25 05:39:06 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Added CGI SAPI -T option, to measure execution time of script repeated 
several times.
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.32r2=1.2027.2.547.2.965.2.33diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.32 
php-src/NEWS:1.2027.2.547.2.965.2.33
--- php-src/NEWS:1.2027.2.547.2.965.2.32Tue Oct 23 09:55:10 2007
+++ php-src/NEWSThu Oct 25 05:39:05 2007
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.0
+- Added CGI SAPI -T option, to measure execution time of script repeated
+  several times. (Dmitry)
 - Added icon format support to getimagesize(). (Scott)
 - Added LDAP_OPT_NETWORK_TIMEOUT option for ldap_set_option() to allow
   setting network timeout (FR #42837). (Jani)
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.50.2.4r2=1.267.2.15.2.50.2.5diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.4 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.5
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.4 Mon Oct  1 12:40:54 2007
+++ php-src/sapi/cgi/cgi_main.c Thu Oct 25 05:39:06 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.4 2007/10/01 12:40:54 jani Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.5 2007/10/25 05:39:06 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -137,6 +137,7 @@
{'?', 0, usage},/* help alias (both '?' and 'usage') */
{'v', 0, version},
{'z', 1, zend-extension},
+   {'T', 1, timing},
{'-', 0, NULL} /* end of args */
 };
 
@@ -758,7 +759,8 @@
  -s   Display colour syntax 
highlighted source.\n
  -v   Version number\n
  -w   Display source with 
stripped comments and whitespace.\n
- -z fileLoad Zend extension 
file.\n,
+ -z fileLoad Zend extension 
file.\n
+-T count   Measure execution time of script 
repeated count times.\n,
prog, prog);
 }
 /* }}} */
@@ -1257,6 +1259,9 @@
char *bindpath = NULL;
int fcgi_fd = 0;
fcgi_request request;
+   int repeats = 1;
+   int benchmark = 0;
+   struct timeval start, end;
 #ifndef PHP_WIN32
int status = 0;
 #endif
@@ -1533,6 +1538,11 @@
zend_first_try {
while ((c = php_getopt(argc, argv, OPTIONS, php_optarg, 
php_optind, 1, 2)) != -1) {
switch (c) {
+   case 'T':
+   benchmark = 1;
+   repeats = atoi(php_optarg);
+   gettimeofday(start, NULL);
+   break;
case 'h':
case '?':
fcgi_shutdown();
@@ -1907,8 +1917,18 @@
}
}
 
-   if (!fastcgi)
+   if (!fastcgi) {
+   if (benchmark) {
+   repeats--;
+   if (repeats  0) {
+   script_file = NULL;
+   php_optind = orig_optind;
+   php_optarg = orig_optarg;
+   continue;
+   }
+   }
break;
+   }
 
/* only fastcgi will get here */
requests++;
@@ -1938,6 +1958,21 @@
} zend_end_try();
 
 out:
+   if (benchmark) {
+   int sec;
+   int usec;
+
+   gettimeofday(end, NULL);
+   sec = (int)(end.tv_sec - start.tv_sec);
+   if (end.tv_usec = start.tv_usec) {
+   usec = (int)(end.tv_usec - start.tv_usec);
+   } else {
+   sec -= 1;
+   usec = (int)(end.tv_usec + 100 - start.tv_usec);
+   }
+   fprintf(stderr, \nElapsed time: %d.%06d sec\n, sec, usec);
+   }
+
SG(server_context) = NULL;
php_module_shutdown(TSRMLS_C);
sapi_shutdown();

-- 
PHP CVS Mailing List 

[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2007-10-24 Thread Dmitry Stogov
dmitry  Thu Oct 25 05:39:24 2007 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Added CGI SAPI -T option, to measure execution time of script repeated 
several times.
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.340r2=1.341diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.340 php-src/sapi/cgi/cgi_main.c:1.341
--- php-src/sapi/cgi/cgi_main.c:1.340   Mon Oct  1 12:32:39 2007
+++ php-src/sapi/cgi/cgi_main.c Thu Oct 25 05:39:24 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.340 2007/10/01 12:32:39 jani Exp $ */
+/* $Id: cgi_main.c,v 1.341 2007/10/25 05:39:24 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -137,6 +137,7 @@
{'?', 0, usage},/* help alias (both '?' and 'usage') */
{'v', 0, version},
{'z', 1, zend-extension},
+   {'T', 1, timing},
{'-', 0, NULL} /* end of args */
 };
 
@@ -767,7 +768,8 @@
  -s   Display colour syntax 
highlighted source.\n
  -v   Version number\n
  -w   Display source with 
stripped comments and whitespace.\n
- -z fileLoad Zend extension 
file.\n,
+ -z fileLoad Zend extension 
file.\n
+-T count   Measure execution time of script 
repeated count times.\n,
prog, prog);
 }
 /* }}} */
@@ -1266,6 +1268,9 @@
char *bindpath = NULL;
int fcgi_fd = 0;
fcgi_request request;
+   int repeats = 1;
+   int benchmark = 0;
+   struct timeval start, end;
 #ifndef PHP_WIN32
int status = 0;
 #endif
@@ -1543,6 +1548,11 @@
zend_first_try {
while ((c = php_getopt(argc, argv, OPTIONS, php_optarg, 
php_optind, 1, 2)) != -1) {
switch (c) {
+   case 'T':
+   benchmark = 1;
+   repeats = atoi(php_optarg);
+   gettimeofday(start, NULL);
+   break;
case 'h':
case '?':
fcgi_shutdown();
@@ -1912,8 +1922,18 @@
}
}
 
-   if (!fastcgi)
+   if (!fastcgi) {
+   if (benchmark) {
+   repeats--;
+   if (repeats  0) {
+   script_file = NULL;
+   php_optind = orig_optind;
+   php_optarg = orig_optarg;
+   continue;
+   }
+   }
break;
+   }
 
/* only fastcgi will get here */
requests++;
@@ -1943,6 +1963,21 @@
} zend_end_try();
 
 out:
+   if (benchmark) {
+   int sec;
+   int usec;
+
+   gettimeofday(end, NULL);
+   sec = (int)(end.tv_sec - start.tv_sec);
+   if (end.tv_usec = start.tv_usec) {
+   usec = (int)(end.tv_usec - start.tv_usec);
+   } else {
+   sec -= 1;
+   usec = (int)(end.tv_usec + 100 - start.tv_usec);
+   }
+   fprintf(stderr, \nElapsed time: %d.%06d sec\n, sec, usec);
+   }
+
SG(server_context) = NULL;
php_module_shutdown(TSRMLS_C);
sapi_shutdown();

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