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

2007-06-04 Thread Ilia Alshanetsky
iliaa   Mon Jun  4 23:52:34 2007 UTC

  Modified files:  
/php-src/ext/json   json.c 
  Log:
  
  MFB: Fixed bug #41567 (json_encode() double conversion is inconsistent with
  PHP).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.25&r2=1.26&diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.25 php-src/ext/json/json.c:1.26
--- php-src/ext/json/json.c:1.25Mon Apr 23 10:48:13 2007
+++ php-src/ext/json/json.c Mon Jun  4 23:52:34 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.25 2007/04/23 10:48:13 tony2001 Exp $ */
+/* $Id: json.c,v 1.26 2007/06/04 23:52:34 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -363,7 +363,7 @@
 double dbl = Z_DVAL_P(val);
 
 if (!zend_isinf(dbl) && !zend_isnan(dbl)) {
-len = spprintf(&d, 0, "%.9g", dbl);
+   len = spprintf(&d, 0, "%.*g", (int) EG(precision), dbl);
 if (d) {
 if (dbl > LONG_MAX && !memchr(d, '.', len)) {
 smart_str_append_unsigned(buf, (unsigned 
long)Z_DVAL_P(val));

-- 
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/json json.c /ext/json/tests bug41567.phpt

2007-06-04 Thread Ilia Alshanetsky
iliaa   Mon Jun  4 23:51:33 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/json/tests bug41567.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/json   json.c 
  Log:
  
  Fixed bug #41567 (json_encode() double conversion is inconsistent with PHP). 
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.756&r2=1.2027.2.547.2.757&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.756 php-src/NEWS:1.2027.2.547.2.757
--- php-src/NEWS:1.2027.2.547.2.756 Mon Jun  4 15:39:26 2007
+++ php-src/NEWSMon Jun  4 23:51:32 2007
@@ -11,6 +11,8 @@
   GD_RELEASE_VERSION, GD_EXTRA_VERSION and GD_VERSION_STRING. (Pierre)
 - Fixed bug #41576 (configure failure when using --without-apxs or some
   other SAPIs disabling options). (Jani)
+- Fixed bug #41567 (json_encode() double conversion is inconsistent with
+  PHP). (Lucas, Ilia)
 - Fixed bug #41555 (configure failure: regression caused by fix for #41265).
   (Jani)
 - Fixed bug #41518 (file_exists() warns of open_basedir restriction on 
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.15&r2=1.9.2.16&diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.9.2.15 php-src/ext/json/json.c:1.9.2.16
--- php-src/ext/json/json.c:1.9.2.15Fri May 25 13:24:50 2007
+++ php-src/ext/json/json.c Mon Jun  4 23:51:32 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.9.2.15 2007/05/25 13:24:50 bjori Exp $ */
+/* $Id: json.c,v 1.9.2.16 2007/06/04 23:51:32 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -354,7 +354,7 @@
 double dbl = Z_DVAL_P(val);
 
 if (!zend_isinf(dbl) && !zend_isnan(dbl)) {
-   len = spprintf(&d, 0, "%.9g", dbl);
+   len = spprintf(&d, 0, "%.*g", (int) EG(precision), dbl);
if (d) {
if (dbl > LONG_MAX && !memchr(d, '.', len)) {
smart_str_append_unsigned(buf, 
(unsigned long)Z_DVAL_P(val));

http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug41567.phpt?view=markup&rev=1.1
Index: php-src/ext/json/tests/bug41567.phpt
+++ php-src/ext/json/tests/bug41567.phpt

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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/gd gd.c /ext/gd/libgd gd.h

2007-06-04 Thread Marcus Boerger
Hello Pierre-Alain,

  it is [DOC] - we all seem to make that mistake and get it wrong somehow.
  Should we simply allow more than just [DOC] ?

Sunday, June 3, 2007, 7:46:18 PM, you wrote:

> pajoye  Sun Jun  3 17:46:18 2007 UTC

>   Modified files:  (Branch: PHP_5_2)
> /php-srcNEWS 
> /php-src/ext/gd gd.c 
> /php-src/ext/gd/libgd   gd.h 
>   Log:
>   - MFH: @DOC add constants GD_MAJOR_VERSION, GD_MINOR_VERSION, 
> GD_RELEASE_VERSION
> GD_EXTRA_VERSION and GD_VERSION_STRING
>   
>   
> http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.750&r2=1.2027.2.547.2.751&diff_format=u
> Index: php-src/NEWS
> diff -u php-src/NEWS:1.2027.2.547.2.750 php-src/NEWS:1.2027.2.547.2.751
> --- php-src/NEWS:1.2027.2.547.2.750 Sun Jun  3 16:19:14 2007
> +++ php-src/NEWSSun Jun  3 17:46:17 2007
> @@ -2,6 +2,8 @@
> 
> |||
>  ?? ??? 2007, PHP 5.2.4
>  - Improved fix for MOPB-02-2007. (Ilia)
> +- Added GD version constants GD_MAJOR_VERSION, GD_MINOR_VERSION
> +  GD_RELEASE_VERSION, GD_EXTRA_VERSION and GD_VERSION_STRING (Pierre)
>  - Fixed bug #41518 (file_exists() warns of open_basedir restriction on 
>non-existent file). (Tony)
>  - Fixed bug #39330 (apache2handler does not call shutdown actions before 
> http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.27&r2=1.312.2.20.2.28&diff_format=u
> Index: php-src/ext/gd/gd.c
> diff -u php-src/ext/gd/gd.c:1.312.2.20.2.27 
> php-src/ext/gd/gd.c:1.312.2.20.2.28
> --- php-src/ext/gd/gd.c:1.312.2.20.2.27 Sat Jun  2 15:38:09 2007
> +++ php-src/ext/gd/gd.c Sun Jun  3 17:46:18 2007
> @@ -18,7 +18,7 @@
> +--+
>   */
>  
> -/* $Id: gd.c,v 1.312.2.20.2.27 2007/06/02 15:38:09 pajoye Exp $ */
> +/* $Id: gd.c,v 1.312.2.20.2.28 2007/06/03 17:46:18 pajoye Exp $ */
>  
>  /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
> Cold Spring Harbor Labs. */
> @@ -1288,6 +1288,7 @@
> REGISTER_LONG_CONSTANT("IMG_EFFECT_NORMAL", gdEffectNormal, CONST_CS 
> | CONST_PERSISTENT);
> REGISTER_LONG_CONSTANT("IMG_EFFECT_OVERLAY", gdEffectOverlay, 
> CONST_CS | CONST_PERSISTENT);
> REGISTER_LONG_CONSTANT("GD_BUNDLED", 1, CONST_CS | CONST_PERSISTENT);
> +
> /* Section Filters */
> REGISTER_LONG_CONSTANT("IMG_FILTER_NEGATE", IMAGE_FILTER_NEGATE, 
> CONST_CS | CONST_PERSISTENT);
> REGISTER_LONG_CONSTANT("IMG_FILTER_GRAYSCALE",
> IMAGE_FILTER_GRAYSCALE, CONST_CS | CONST_PERSISTENT);
> @@ -1305,6 +1306,18 @@
> REGISTER_LONG_CONSTANT("GD_BUNDLED", 0, CONST_CS | CONST_PERSISTENT);
>  #endif
>  
> +#ifdef GD_VERSION_STRING
> +   REGISTER_STRING_CONSTANT("GD_VERSION", GD_VERSION_STRING, CONST_CS | 
> CONST_PERSISTENT);
> +#endif
> +
> +#if defined(GD_MAJOR_VERSION) && defined(GD_MINOR_VERSION) &&
> defined(GD_RELEASE_VERSION) && defined(GD_EXTRA_VERSION)
> +   REGISTER_LONG_CONSTANT("GD_MAJOR_VERSION", GD_MAJOR_VERSION, CONST_CS 
> | CONST_PERSISTENT);
> +   REGISTER_LONG_CONSTANT("GD_MINOR_VERSION", GD_MINOR_VERSION, CONST_CS 
> | CONST_PERSISTENT);
> +   REGISTER_LONG_CONSTANT("GD_RELEASE_VERSION", GD_RELEASE_VERSION, 
> CONST_CS | CONST_PERSISTENT);
> +   REGISTER_STRING_CONSTANT("GD_EXTRA_VERSION", GD_EXTRA_VERSION, 
> CONST_CS | CONST_PERSISTENT);
> +#endif
> +
> +
>  #ifdef HAVE_GD_PNG
>  
>  /*
> http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.h?r1=1.26.2.3.2.4&r2=1.26.2.3.2.5&diff_format=u
> Index: php-src/ext/gd/libgd/gd.h
> diff -u php-src/ext/gd/libgd/gd.h:1.26.2.3.2.4
> php-src/ext/gd/libgd/gd.h:1.26.2.3.2.5
> --- php-src/ext/gd/libgd/gd.h:1.26.2.3.2.4  Mon Apr 23 15:17:47 2007
> +++ php-src/ext/gd/libgd/gd.h   Sun Jun  3 17:46:18 2007
> @@ -11,6 +11,12 @@
>  
>  #include "php_compat.h"
>  
> +#define GD_MAJOR_VERSION 2
> +#define GD_MINOR_VERSION 0
> +#define GD_RELEASE_VERSION 35
> +#define GD_EXTRA_VERSION ""
> +#define GD_VERSION_STRING "2.0.35"
> +
>  #ifdef NETWARE
>  /* default fontpath for netware systems */
>  #define DEFAULT_FONTPATH "sys:/java/nwgfx/lib/x11/fonts/ttf;."




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_2) /ext/pdo_mysql .cvsignore /ext/pdo_oci .cvsignore /ext/pdo_pgsql .cvsignore

2007-06-04 Thread Nuno Lopes
nlopess Mon Jun  4 18:13:53 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_mysql  .cvsignore 
/php-src/ext/pdo_oci.cvsignore 
/php-src/ext/pdo_pgsql  .cvsignore 
  Log:
  ignore *.gcno
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/.cvsignore?r1=1.2&r2=1.2.4.1&diff_format=u
Index: php-src/ext/pdo_mysql/.cvsignore
diff -u php-src/ext/pdo_mysql/.cvsignore:1.2 
php-src/ext/pdo_mysql/.cvsignore:1.2.4.1
--- php-src/ext/pdo_mysql/.cvsignore:1.2Tue Jun 14 13:26:09 2005
+++ php-src/ext/pdo_mysql/.cvsignoreMon Jun  4 18:13:53 2007
@@ -1,4 +1,5 @@
 .deps
+*.gcno
 *.lo
 *.la
 .*.swp
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_oci/.cvsignore?r1=1.3&r2=1.3.4.1&diff_format=u
Index: php-src/ext/pdo_oci/.cvsignore
diff -u php-src/ext/pdo_oci/.cvsignore:1.3 
php-src/ext/pdo_oci/.cvsignore:1.3.4.1
--- php-src/ext/pdo_oci/.cvsignore:1.3  Tue Jun 14 13:26:09 2005
+++ php-src/ext/pdo_oci/.cvsignore  Mon Jun  4 18:13:53 2007
@@ -1,4 +1,5 @@
 .deps
+*.gcno
 *.lo
 *.la
 .*.swp
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/.cvsignore?r1=1.2&r2=1.2.4.1&diff_format=u
Index: php-src/ext/pdo_pgsql/.cvsignore
diff -u php-src/ext/pdo_pgsql/.cvsignore:1.2 
php-src/ext/pdo_pgsql/.cvsignore:1.2.4.1
--- php-src/ext/pdo_pgsql/.cvsignore:1.2Tue Jun 14 13:26:09 2005
+++ php-src/ext/pdo_pgsql/.cvsignoreMon Jun  4 18:13:53 2007
@@ -1,4 +1,5 @@
 .deps
+*.gcno
 *.lo
 *.la
 .*.swp

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



[PHP-CVS] cvs: php-src /ext/filter .cvsignore /ext/pdo .cvsignore /ext/pdo_mysql .cvsignore /ext/pdo_oci .cvsignore /ext/pdo_pgsql .cvsignore /ext/pdo_sqlite .cvsignore /ext/unicode .cvsignore

2007-06-04 Thread Nuno Lopes
nlopess Mon Jun  4 18:11:38 2007 UTC

  Modified files:  
/php-src/ext/filter .cvsignore 
/php-src/ext/pdo.cvsignore 
/php-src/ext/pdo_mysql  .cvsignore 
/php-src/ext/pdo_oci.cvsignore 
/php-src/ext/pdo_pgsql  .cvsignore 
/php-src/ext/pdo_sqlite .cvsignore 
/php-src/ext/unicode.cvsignore 
/php-src/ext/xmlreader  .cvsignore 
/php-src/ext/xmlwriter  .cvsignore 
/php-src/ext/zip.cvsignore 
/php-src/ext/zip/lib.cvsignore 
  Log:
  ignore *.gcno
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/.cvsignore?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/filter/.cvsignore
diff -u php-src/ext/filter/.cvsignore:1.1 php-src/ext/filter/.cvsignore:1.2
--- php-src/ext/filter/.cvsignore:1.1   Tue Sep  6 18:46:37 2005
+++ php-src/ext/filter/.cvsignore   Mon Jun  4 18:11:38 2007
@@ -1,3 +1,4 @@
+*.gcno
 .deps
 Makefile
 *.lo
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/.cvsignore?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/pdo/.cvsignore
diff -u php-src/ext/pdo/.cvsignore:1.5 php-src/ext/pdo/.cvsignore:1.6
--- php-src/ext/pdo/.cvsignore:1.5  Wed Apr 25 07:47:15 2007
+++ php-src/ext/pdo/.cvsignore  Mon Jun  4 18:11:38 2007
@@ -1,4 +1,5 @@
 .deps
+*.gcno
 *.lo
 *.la
 .*.swp
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/.cvsignore?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/pdo_mysql/.cvsignore
diff -u php-src/ext/pdo_mysql/.cvsignore:1.2 
php-src/ext/pdo_mysql/.cvsignore:1.3
--- php-src/ext/pdo_mysql/.cvsignore:1.2Tue Jun 14 13:26:09 2005
+++ php-src/ext/pdo_mysql/.cvsignoreMon Jun  4 18:11:38 2007
@@ -1,4 +1,5 @@
 .deps
+*.gcno
 *.lo
 *.la
 .*.swp
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_oci/.cvsignore?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/pdo_oci/.cvsignore
diff -u php-src/ext/pdo_oci/.cvsignore:1.3 php-src/ext/pdo_oci/.cvsignore:1.4
--- php-src/ext/pdo_oci/.cvsignore:1.3  Tue Jun 14 13:26:09 2005
+++ php-src/ext/pdo_oci/.cvsignore  Mon Jun  4 18:11:38 2007
@@ -1,4 +1,5 @@
 .deps
+*.gcno
 *.lo
 *.la
 .*.swp
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/.cvsignore?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/pdo_pgsql/.cvsignore
diff -u php-src/ext/pdo_pgsql/.cvsignore:1.2 
php-src/ext/pdo_pgsql/.cvsignore:1.3
--- php-src/ext/pdo_pgsql/.cvsignore:1.2Tue Jun 14 13:26:09 2005
+++ php-src/ext/pdo_pgsql/.cvsignoreMon Jun  4 18:11:38 2007
@@ -1,3 +1,4 @@
+*.gcno
 .deps
 *.lo
 *.la
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/.cvsignore?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/pdo_sqlite/.cvsignore
diff -u php-src/ext/pdo_sqlite/.cvsignore:1.5 
php-src/ext/pdo_sqlite/.cvsignore:1.6
--- php-src/ext/pdo_sqlite/.cvsignore:1.5   Sat Sep 24 14:22:02 2005
+++ php-src/ext/pdo_sqlite/.cvsignore   Mon Jun  4 18:11:38 2007
@@ -1,3 +1,4 @@
+*.gcno
 .deps
 *.lo
 *.la
http://cvs.php.net/viewvc.cgi/php-src/ext/unicode/.cvsignore?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/unicode/.cvsignore
diff -u php-src/ext/unicode/.cvsignore:1.1 php-src/ext/unicode/.cvsignore:1.2
--- php-src/ext/unicode/.cvsignore:1.1  Thu Aug 11 23:36:01 2005
+++ php-src/ext/unicode/.cvsignore  Mon Jun  4 18:11:38 2007
@@ -1,3 +1,4 @@
+*.gcno
 *.lo
 *.la
 .deps
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlreader/.cvsignore?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/xmlreader/.cvsignore
diff -u php-src/ext/xmlreader/.cvsignore:1.1 
php-src/ext/xmlreader/.cvsignore:1.2
--- php-src/ext/xmlreader/.cvsignore:1.1Mon Apr 19 18:55:02 2004
+++ php-src/ext/xmlreader/.cvsignoreMon Jun  4 18:11:38 2007
@@ -1,4 +1,5 @@
 #*#
+*.gcno
 *.dsw
 *.la
 *.lo
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/.cvsignore?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/xmlwriter/.cvsignore
diff -u php-src/ext/xmlwriter/.cvsignore:1.1 
php-src/ext/xmlwriter/.cvsignore:1.2
--- php-src/ext/xmlwriter/.cvsignore:1.1Tue Jul 13 17:01:30 2004
+++ php-src/ext/xmlwriter/.cvsignoreMon Jun  4 18:11:38 2007
@@ -1,4 +1,5 @@
 #*#
+*.gcno
 *.dsw
 *.la
 *.lo
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/.cvsignore?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/zip/.cvsignore
diff -u php-src/ext/zip/.cvsignore:1.8 php-src/ext/zip/.cvsignore:1.9
--- php-src/ext/zip/.cvsignore:1.8  Fri Nov  3 16:12:18 2006
+++ php-src/ext/zip/.cvsignore  Mon Jun  4 18:11:38 2007
@@ -1,2 +1,3 @@
 *.lo
 .libs
+*.gcno
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/.cvsignore?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/zip/lib/.cvsignore
diff -u php-src/ext/zip/lib/.cvsignore:1.1 php-src/ext/zip/lib/.cvsignore:1.2
--- php-src/ext/zip/lib/.cvsignore:1.1  Sun Sep 10 14:02:14 2006
+++ php-src/ext/zip/lib/.cvsignore  Mon Jun  4 18:11:38 2007
@@ -1 +1,2 @@
 *.lo
+*.gcno

-- 
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) /ext/standard/tests/general_functions bug41518.phpt

2007-06-04 Thread Antony Dovgal
tony2001Mon Jun  4 17:18:51 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/general_functions   bug41518.phpt 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41518.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug41518.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.3
--- php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.2  Fri Jun 
 1 13:35:23 2007
+++ php-src/ext/standard/tests/general_functions/bug41518.phpt  Mon Jun  4 
17:18:51 2007
@@ -20,6 +20,8 @@
 var_dump(file_exists($tmp_file)); //exists
 var_dump(file_exists($tmp_file."nosuchfile")); //doesn't exist
 
[EMAIL PROTECTED]($tmp_file);
+
 echo "Done\n";
 ?>
 --EXPECTF--

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



[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions bug41518.phpt

2007-06-04 Thread Antony Dovgal
tony2001Mon Jun  4 17:18:28 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/general_functions   bug41518.phpt 
  Log:
  clean up temp file
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41518.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug41518.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1 
php-src/ext/standard/tests/general_functions/bug41518.phpt:1.2
--- php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1  Fri Jun 
 1 13:33:48 2007
+++ php-src/ext/standard/tests/general_functions/bug41518.phpt  Mon Jun  4 
17:18:28 2007
@@ -20,6 +20,8 @@
 var_dump(file_exists($tmp_file)); //exists
 var_dump(file_exists($tmp_file."nosuchfile")); //doesn't exist
 
[EMAIL PROTECTED]($tmp_file);
+
 echo "Done\n";
 ?>
 --EXPECTF--

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file fileinode_variation.phpt

2007-06-04 Thread Zoe Slattery
zoe Mon Jun  4 17:00:44 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filefileinode_variation.phpt 
  Log:
  missing ?> in skipif section
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fileinode_variation.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/file/fileinode_variation.phpt
diff -u php-src/ext/standard/tests/file/fileinode_variation.phpt:1.2 
php-src/ext/standard/tests/file/fileinode_variation.phpt:1.3
--- php-src/ext/standard/tests/file/fileinode_variation.phpt:1.2Fri May 
25 13:50:05 2007
+++ php-src/ext/standard/tests/file/fileinode_variation.phptMon Jun  4 
17:00:44 2007
@@ -5,6 +5,7 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip no fnmatch() on Windows');
 }
+?>
 --FILE--
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2007-06-04 Thread Antony Dovgal
tony2001Mon Jun  4 15:38:12 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cgi   cgi_main.c 
  Log:
  MFH: add missing open_basedir checks to CGI
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.40&r2=1.267.2.15.2.41&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.40 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.41
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.40 Mon May 28 08:11:59 2007
+++ php-src/sapi/cgi/cgi_main.c Mon Jun  4 15:38:12 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.40 2007/05/28 08:11:59 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.41 2007/06/04 15:38:12 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -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;
}
 

-- 
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

2007-06-04 Thread Antony Dovgal
tony2001Mon Jun  4 15:39:26 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  news entry
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.755&r2=1.2027.2.547.2.756&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.755 php-src/NEWS:1.2027.2.547.2.756
--- php-src/NEWS:1.2027.2.547.2.755 Sun Jun  3 21:21:56 2007
+++ php-src/NEWSMon Jun  4 15:39:26 2007
@@ -4,6 +4,8 @@
 - Improved fix for MOPB-03-2007. (Ilia)
 - Corrected fix for CVE-2007-2872. (Ilia)
 - Added GD version constants GD_MAJOR_VERSION, GD_MINOR_VERSION
+- Added missing open_basedir checks to CGI. (anight at eyelinkmedia dot com, 
+  Tony)
 - Fixed crash in ZipArchive::addEmptyDir when a directory already
   exists (pecl bug #11216) (Pierre)
   GD_RELEASE_VERSION, GD_EXTRA_VERSION and GD_VERSION_STRING. (Pierre)

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



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

2007-06-04 Thread Antony Dovgal
tony2001Mon Jun  4 15:37:38 2007 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  add missing open_basedir checks to CGI
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.324&r2=1.325&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.324 php-src/sapi/cgi/cgi_main.c:1.325
--- php-src/sapi/cgi/cgi_main.c:1.324   Tue May 29 00:01:14 2007
+++ php-src/sapi/cgi/cgi_main.c Mon Jun  4 15:37:38 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.324 2007/05/29 00:01:14 iliaa Exp $ */
+/* $Id: cgi_main.c,v 1.325 2007/06/04 15:37:38 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1603,7 +1603,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
@@ -1623,9 +1625,21 @@
if (fastcgi) {
goto fastcgi_request_done;
}
+
+   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;
}
 

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



[PHP-CVS] cvs: CVSROOT / avail

2007-06-04 Thread Philip Olson
philip  Mon Jun  4 14:55:08 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give Mikko Koppanen (mkoppanen) phpdoc karma
  
  http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1276&r2=1.1277&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1276 CVSROOT/avail:1.1277
--- CVSROOT/avail:1.1276Mon Jun  4 05:12:53 2007
+++ CVSROOT/avail   Mon Jun  4 14:55:07 2007
@@ -40,7 +40,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief97!
 
7,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodiv!
 e,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,ti
x,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhit!
 
ama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,lsmith,tessus,gavinfo,rant,colder,ramsey,arkadius,bjori,erinet,omar,sixd,oliver,rquadling,timo,shadda,joeaccord,ezyang,ljbuesch,knut,asonge,gwynne|phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-!
 fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-
kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
+avail|jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,le

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

2007-06-04 Thread Antony Dovgal
tony2001Mon Jun  4 09:47:54 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cli   getopt.c php_cli.c php_cli_readline.c 
  Log:
  fix folding
  
  http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/getopt.c?r1=1.8.2.1.2.5&r2=1.8.2.1.2.6&diff_format=u
Index: php-src/sapi/cli/getopt.c
diff -u php-src/sapi/cli/getopt.c:1.8.2.1.2.5 
php-src/sapi/cli/getopt.c:1.8.2.1.2.6
--- php-src/sapi/cli/getopt.c:1.8.2.1.2.5   Mon Apr 23 11:05:16 2007
+++ php-src/sapi/cli/getopt.c   Mon Jun  4 09:47:54 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: getopt.c,v 1.8.2.1.2.5 2007/04/23 11:05:16 tony2001 Exp $ */
+/* $Id: getopt.c,v 1.8.2.1.2.6 2007/06/04 09:47:54 tony2001 Exp $ */
 
 #include 
 #include 
@@ -28,7 +28,7 @@
 #define OPTERRARG (3)
 
 
-static int php_opt_error(int argc, char * const *argv, int oint, int optchr, 
int err, int show_err)
+static int php_opt_error(int argc, char * const *argv, int oint, int optchr, 
int err, int show_err) /* {{{ */
 {
if (show_err)
{
@@ -51,8 +51,9 @@
}
return('?');
 }
+/* }}} */
 
-int php_getopt(int argc, char* const *argv, const opt_struct opts[], char 
**optarg, int *optind, int show_err)
+int php_getopt(int argc, char* const *argv, const opt_struct opts[], char 
**optarg, int *optind, int show_err) /* {{{ */
 {
static int optchr = 0;
static int dash = 0; /* have already seen the - */
@@ -162,3 +163,13 @@
assert(0);
return(0);  /* never reached */
 }
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.20&r2=1.129.2.13.2.21&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.20 
php-src/sapi/cli/php_cli.c:1.129.2.13.2.21
--- php-src/sapi/cli/php_cli.c:1.129.2.13.2.20  Sun May  6 12:57:50 2007
+++ php-src/sapi/cli/php_cli.c  Mon Jun  4 09:47:54 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.129.2.13.2.20 2007/05/06 12:57:50 johannes Exp $ */
+/* $Id: php_cli.c,v 1.129.2.13.2.21 2007/06/04 09:47:54 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -164,13 +164,14 @@
{'-', 0, NULL} /* end of args */
 };
 
-static int print_module_info(zend_module_entry *module TSRMLS_DC)
+static int print_module_info(zend_module_entry *module TSRMLS_DC) /* {{{ */
 {
php_printf("%s\n", module->name);
return ZEND_HASH_APPLY_KEEP;
 }
+/* }}} */
 
-static int module_name_cmp(const void *a, const void *b TSRMLS_DC)
+static int module_name_cmp(const void *a, const void *b TSRMLS_DC) /* {{{ */
 {
Bucket *f = *((Bucket **) a);
Bucket *s = *((Bucket **) b);
@@ -178,8 +179,9 @@
return strcasecmp(((zend_module_entry *)f->pData)->name,
  ((zend_module_entry *)s->pData)->name);
 }
+/* }}} */
 
-static void print_modules(TSRMLS_D)
+static void print_modules(TSRMLS_D) /* {{{ */
 {
HashTable sorted_registry;
zend_module_entry tmp;
@@ -190,21 +192,23 @@
zend_hash_apply(&sorted_registry, (apply_func_t) print_module_info 
TSRMLS_CC);
zend_hash_destroy(&sorted_registry);
 }
+/* }}} */
 
-static int print_extension_info(zend_extension *ext, void *arg TSRMLS_DC)
+static int print_extension_info(zend_extension *ext, void *arg TSRMLS_DC) /* 
{{{ */
 {
php_printf("%s\n", ext->name);
return ZEND_HASH_APPLY_KEEP;
 }
+/* }}} */
 
-static int extension_name_cmp(const zend_llist_element **f,
- const 
zend_llist_element **s TSRMLS_DC)
+static int extension_name_cmp(const zend_llist_element **f, const 
zend_llist_element **s TSRMLS_DC) /* {{{ */
 {
return strcmp(((zend_extension *)(*f)->data)->name,
  ((zend_extension *)(*s)->data)->name);
 }
+/* }}} */
 
-static void print_extensions(TSRMLS_D)
+static void print_extensions(TSRMLS_D) /* {{{ */
 {
zend_llist sorted_exts;
 
@@ -214,12 +218,13 @@
zend_llist_apply(&sorted_exts, (llist_apply_func_t) 
print_extension_info TSRMLS_CC);
zend_llist_destroy(&sorted_exts);
 }
+/* }}} */
 
 #ifndef STDOUT_FILENO
 #define STDOUT_FILENO 1
 #endif
 
-static inline size_t sapi_cli_single_write(const char *str, uint str_length)
+static inline size_t sapi_cli_single_write(const char *str, uint str_length) 
/* {{{ */
 {
 #ifdef PHP_WRITE_STDOUT
long ret;
@@ -236,8 +241,9 @@
return ret;
 #endif
 }
+/* }}} */
 
-static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC)
+static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) /* 
{{{ */
 {
const char *ptr = str;
uint remaining = str_length;
@@ -266,9 +272,9 @@
 

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

2007-06-04 Thread Antony Dovgal
tony2001Mon Jun  4 07:56:39 2007 UTC

  Modified files:  
/php-src/main   php_variables.c 
  Log:
  no register_globals in HEAD
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_variables.c?r1=1.140&r2=1.141&diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.140 php-src/main/php_variables.c:1.141
--- php-src/main/php_variables.c:1.140  Sun Jun  3 16:53:37 2007
+++ php-src/main/php_variables.cMon Jun  4 07:56:39 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_variables.c,v 1.140 2007/06/03 16:53:37 sniper Exp $ */
+/* $Id: php_variables.c,v 1.141 2007/06/04 07:56:39 tony2001 Exp $ */
 
 #include 
 #include "php.h"
@@ -136,11 +136,7 @@
HashTable *ht;
/* too many levels of nesting */
 
-   if (track_vars_array) {
-   ht = Z_ARRVAL_P(track_vars_array);
-   } else if (PG(register_globals)) {
-   ht = EG(active_symbol_table);
-   }
+   ht = Z_ARRVAL_P(track_vars_array);
 
zend_hash_del(ht, var, var_len + 1);
zval_dtor(val);

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