[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard basic_functions.c lcg.c php_ext_syslog.h syslog.c

2007-05-16 Thread Rasmus Lerdorf
rasmus  Thu May 17 06:38:13 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   basic_functions.c lcg.c php_ext_syslog.h 
syslog.c 
  Log:
  Get rid of a useless RINIT and an empty RSHUTDOWN on non-Windows
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.50&r2=1.725.2.31.2.51&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.50 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.51
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.50  Thu May 10 
16:28:11 2007
+++ php-src/ext/standard/basic_functions.c  Thu May 17 06:38:13 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.50 2007/05/10 16:28:11 tony2001 Exp $ 
*/
+/* $Id: basic_functions.c,v 1.725.2.31.2.51 2007/05/17 06:38:13 rasmus Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -4130,8 +4130,6 @@
 #endif
BG(user_shutdown_function_names) = NULL;
 
-   PHP_RINIT(lcg)(INIT_FUNC_ARGS_PASSTHRU);
-
PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU);
 #ifdef HAVE_SYSLOG_H
PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU);
@@ -4186,9 +4184,11 @@
 */

PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+#ifdef PHP_WIN32
 #ifdef HAVE_SYSLOG_H
PHP_RSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 #endif
+#endif
PHP_RSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
PHP_RSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
PHP_RSHUTDOWN(streams)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/lcg.c?r1=1.41.2.1.2.1&r2=1.41.2.1.2.2&diff_format=u
Index: php-src/ext/standard/lcg.c
diff -u php-src/ext/standard/lcg.c:1.41.2.1.2.1 
php-src/ext/standard/lcg.c:1.41.2.1.2.2
--- php-src/ext/standard/lcg.c:1.41.2.1.2.1 Mon Jan  1 09:36:08 2007
+++ php-src/ext/standard/lcg.c  Thu May 17 06:38:13 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: lcg.c,v 1.41.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: lcg.c,v 1.41.2.1.2.2 2007/05/17 06:38:13 rasmus Exp $ */
 
 #include "php.h"
 #include "php_lcg.h"
@@ -106,14 +106,6 @@
return SUCCESS;
 }
 
-PHP_RINIT_FUNCTION(lcg)
-{
-   if (!LCG(seeded)) {
-   lcg_seed(TSRMLS_C);
-   }
-   return SUCCESS;
-}
-
 /* {{{ proto float lcg_value()
Returns a value from the combined linear congruential generator */
 PHP_FUNCTION(lcg_value)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_ext_syslog.h?r1=1.12.2.2.2.1&r2=1.12.2.2.2.2&diff_format=u
Index: php-src/ext/standard/php_ext_syslog.h
diff -u php-src/ext/standard/php_ext_syslog.h:1.12.2.2.2.1 
php-src/ext/standard/php_ext_syslog.h:1.12.2.2.2.2
--- php-src/ext/standard/php_ext_syslog.h:1.12.2.2.2.1  Mon Jan  1 09:36:08 2007
+++ php-src/ext/standard/php_ext_syslog.h   Thu May 17 06:38:13 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_ext_syslog.h,v 1.12.2.2.2.1 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: php_ext_syslog.h,v 1.12.2.2.2.2 2007/05/17 06:38:13 rasmus Exp $ */
 
 #ifndef PHP_EXT_SYSLOG_H
 #define PHP_EXT_SYSLOG_H
@@ -27,7 +27,9 @@
 
 PHP_MINIT_FUNCTION(syslog);
 PHP_RINIT_FUNCTION(syslog);
+#ifdef PHP_WIN32
 PHP_RSHUTDOWN_FUNCTION(syslog);
+#endif
 PHP_MSHUTDOWN_FUNCTION(syslog);
 
 PHP_FUNCTION(openlog);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/syslog.c?r1=1.49.2.3.2.1&r2=1.49.2.3.2.2&diff_format=u
Index: php-src/ext/standard/syslog.c
diff -u php-src/ext/standard/syslog.c:1.49.2.3.2.1 
php-src/ext/standard/syslog.c:1.49.2.3.2.2
--- php-src/ext/standard/syslog.c:1.49.2.3.2.1  Mon Jan  1 09:36:09 2007
+++ php-src/ext/standard/syslog.c   Thu May 17 06:38:13 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: syslog.c,v 1.49.2.3.2.1 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: syslog.c,v 1.49.2.3.2.2 2007/05/17 06:38:13 rasmus Exp $ */
 
 #include "php.h"
 
@@ -114,13 +114,13 @@
 }
 
 
+#ifdef PHP_WIN32
 PHP_RSHUTDOWN_FUNCTION(syslog)
 {
-#ifdef PHP_WIN32
closelog();
-#endif
return SUCCESS;
 }
+#endif
 
 PHP_MSHUTDOWN_FUNCTION(syslog)
 {

-- 
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/gd/tests libgd00086.phpt

2007-05-16 Thread Pierre-Alain Joye
pajoye  Wed May 16 22:55:27 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/gd/tests   libgd00086.phpt 
  Log:
  - fix title
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.712&r2=1.2027.2.547.2.713&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.712 php-src/NEWS:1.2027.2.547.2.713
--- php-src/NEWS:1.2027.2.547.2.712 Wed May 16 22:19:07 2007
+++ php-src/NEWSWed May 16 22:55:26 2007
@@ -8,8 +8,8 @@
   altered at run time. (Scott)
 - Allow SOAP extension's handler() to work even when
   always_populate_raw_post_data is off. (Ilia)
-- Fixed possible infinite loop in imagepng (libgd #86) (by Xavier Roche)
-  (Pierre)
+- Fixed possible infinite loop in imagecreatefrompng (libgd #86) 
+  (by Xavier Roche) (Pierre)
 - Fixed ext/filter Email Validation Vulnerability (MOPB-24 by Stefan Esser)
   (Ilia)
 - Fixed altering $this via argument named "this". (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/libgd00086.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/gd/tests/libgd00086.phpt
diff -u php-src/ext/gd/tests/libgd00086.phpt:1.1.2.2 
php-src/ext/gd/tests/libgd00086.phpt:1.1.2.3
--- php-src/ext/gd/tests/libgd00086.phpt:1.1.2.2Wed May 16 22:19:08 2007
+++ php-src/ext/gd/tests/libgd00086.phptWed May 16 22:55:27 2007
@@ -1,5 +1,5 @@
 --TEST--
-Bug #39780 (PNG image with CRC/data error raises a fatal error)
+libgd #86 (Possible infinite loop in imagecreatefrompng)
 --SKIPIF--
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/gd/tests libgd00086.phpt

2007-05-16 Thread Pierre-Alain Joye
pajoye  Wed May 16 22:54:33 2007 UTC

  Modified files:  
/php-src/ext/gd/tests   libgd00086.phpt 
  Log:
  - fix title
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/libgd00086.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/libgd00086.phpt
diff -u php-src/ext/gd/tests/libgd00086.phpt:1.1 
php-src/ext/gd/tests/libgd00086.phpt:1.2
--- php-src/ext/gd/tests/libgd00086.phpt:1.1Wed May 16 22:16:22 2007
+++ php-src/ext/gd/tests/libgd00086.phptWed May 16 22:54:33 2007
@@ -1,5 +1,5 @@
 --TEST--
-Bug #39780 (PNG image with CRC/data error raises a fatal error)
+libgd #86 (Possible infinite loop in imagecreatefrompng)
 --SKIPIF--
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /ext/gd/libgd gd_png.c

2007-05-16 Thread Pierre-Alain Joye
pajoye  Wed May 16 22:54:11 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-srcNEWS 
/php-src/ext/gd/libgd   gd_png.c 
  Log:
  - MFH: libgd #86: Fixed possible infinite loop in libgd/gd_png.c, fix test
  (Reported by Xavier Roche)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.227&r2=1.1247.2.920.2.228&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.227 php-src/NEWS:1.1247.2.920.2.228
--- php-src/NEWS:1.1247.2.920.2.227 Tue May  8 18:00:37 2007
+++ php-src/NEWSWed May 16 22:54:11 2007
@@ -4,6 +4,8 @@
 - Fixed bug #38798 (OpenSSL init corrected in php5 but not in php4). (Tony)

 04 May 2007, Version 4.4.7
+- Fixed libgd #86 (Fixed possible infinite loop in imagecreatefrompng) 
+  (Reported by Xavier Roche) (Pierre)
 - Fixed MOPB-33-2007 (PHP mail() Message ASCIIZ Byte Truncation). (Ilia)
 - Fixed MOPB-32-2007 (Double free inside session_decode()). (Ilia)
 - Fixed MOPB-26-2007 (mb_parse_str() can be used to activate
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_png.c?r1=1.4.2.7&r2=1.4.2.7.4.1&diff_format=u
Index: php-src/ext/gd/libgd/gd_png.c
diff -u php-src/ext/gd/libgd/gd_png.c:1.4.2.7 
php-src/ext/gd/libgd/gd_png.c:1.4.2.7.4.1
--- php-src/ext/gd/libgd/gd_png.c:1.4.2.7   Mon Mar 29 18:21:00 2004
+++ php-src/ext/gd/libgd/gd_png.c   Wed May 16 22:54:11 2007
@@ -71,7 +71,11 @@
 
 static void gdPngReadData (png_structp png_ptr, png_bytep data, png_size_t 
length)
 {
-   gdGetBuf(data, length, (gdIOCtx *) png_get_io_ptr(png_ptr));
+   int check;
+   check = gdGetBuf(data, length, (gdIOCtx *) png_get_io_ptr(png_ptr));
+   if (check != length) {
+   png_error(png_ptr, "Read Error: truncated data");
+   }
 }
 
 static void gdPngWriteData (png_structp png_ptr, png_bytep data, png_size_t 
length)

-- 
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/gd/tests bug39780.phpt

2007-05-16 Thread Pierre-Alain Joye
pajoye  Wed May 16 22:21:41 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd/tests   bug39780.phpt 
  Log:
  - MFH: libgd #86: Fixed possible infinite loop in libgd/gd_png.c, fix test
 (Reported by Xavier Roche)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39780.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/gd/tests/bug39780.phpt
diff -u php-src/ext/gd/tests/bug39780.phpt:1.1.2.2 
php-src/ext/gd/tests/bug39780.phpt:1.1.2.3
--- php-src/ext/gd/tests/bug39780.phpt:1.1.2.2  Sun Dec 10 01:38:01 2006
+++ php-src/ext/gd/tests/bug39780.phpt  Wed May 16 22:21:41 2007
@@ -13,9 +13,9 @@
 ?>
 --EXPECTF--
 
-Warning: imagecreatefrompng(): gd-png:  fatal libpng error: IDAT: CRC error in 
%s on line %d
+Warning: imagecreatefrompng(): gd-png:  fatal libpng error: Read Error: 
truncated data in /home/pierre/cvs/php_5_2/ext/gd/tests/bug39780.php on line 3
 
-Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in 
%s on line %d
+Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in 
/home/pierre/cvs/php_5_2/ext/gd/tests/bug39780.php on line 3
 
-Warning: imagecreatefrompng(): '%s' is not a valid PNG file in %s on line %d
+Warning: imagecreatefrompng(): 
'/home/pierre/cvs/php_5_2/ext/gd/tests/bug39780.png' is not a valid PNG file in 
/home/pierre/cvs/php_5_2/ext/gd/tests/bug39780.php on line 3
 bool(false)

-- 
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/gd/libgd gd_png.c /ext/gd/tests libgd00086.phpt libgd00086.png

2007-05-16 Thread Pierre-Alain Joye
pajoye  Wed May 16 22:19:08 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/gd/tests   libgd00086.phpt libgd00086.png 

  Modified files:  
/php-srcNEWS 
/php-src/ext/gd/libgd   gd_png.c 
  Log:
  - MFH: libgd #86: Fixed possible infinite loop in libgd/gd_png.c
(Reported by Xavier Roche)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.711&r2=1.2027.2.547.2.712&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.711 php-src/NEWS:1.2027.2.547.2.712
--- php-src/NEWS:1.2027.2.547.2.711 Wed May 16 21:22:12 2007
+++ php-src/NEWSWed May 16 22:19:07 2007
@@ -8,6 +8,8 @@
   altered at run time. (Scott)
 - Allow SOAP extension's handler() to work even when
   always_populate_raw_post_data is off. (Ilia)
+- Fixed possible infinite loop in imagepng (libgd #86) (by Xavier Roche)
+  (Pierre)
 - Fixed ext/filter Email Validation Vulnerability (MOPB-24 by Stefan Esser)
   (Ilia)
 - Fixed altering $this via argument named "this". (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_png.c?r1=1.17.4.2.2.4&r2=1.17.4.2.2.5&diff_format=u
Index: php-src/ext/gd/libgd/gd_png.c
diff -u php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.4 
php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.5
--- php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.4  Sun Dec 10 01:38:01 2006
+++ php-src/ext/gd/libgd/gd_png.c   Wed May 16 22:19:08 2007
@@ -71,7 +71,11 @@
 
 static void gdPngReadData (png_structp png_ptr, png_bytep data, png_size_t 
length)
 {
-   gdGetBuf(data, length, (gdIOCtx *) png_get_io_ptr(png_ptr));
+   int check;
+   check = gdGetBuf(data, length, (gdIOCtx *) png_get_io_ptr(png_ptr));
+   if (check != length) {
+   png_error(png_ptr, "Read Error: truncated data");
+   }
 }
 
 static void gdPngWriteData (png_structp png_ptr, png_bytep data, png_size_t 
length)

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/libgd00086.phpt?view=markup&rev=1.1
Index: php-src/ext/gd/tests/libgd00086.phpt
+++ php-src/ext/gd/tests/libgd00086.phpt
--TEST--
Bug #39780 (PNG image with CRC/data error raises a fatal error)
--SKIPIF--

--FILE--

--EXPECTF--

Warning: imagecreatefrompng(): gd-png:  fatal libpng error: Read Error: 
truncated data in %s on line %d

Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in 
%s on line %d

Warning: imagecreatefrompng(): '%s' is not a valid PNG file in %s on line %d
bool(false)

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



[PHP-CVS] cvs: php-src /ext/gd/libgd gd_png.c /ext/gd/tests libgd00086.phpt libgd00086.png

2007-05-16 Thread Pierre-Alain Joye
pajoye  Wed May 16 22:16:22 2007 UTC

  Added files: 
/php-src/ext/gd/tests   libgd00086.png libgd00086.phpt 

  Modified files:  
/php-src/ext/gd/libgd   gd_png.c 
  Log:
  - libgd #86: Fixed possible infinite loop in libgd/gd_png.c
(Reported by Xavier Roche)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_png.c?r1=1.23&r2=1.24&diff_format=u
Index: php-src/ext/gd/libgd/gd_png.c
diff -u php-src/ext/gd/libgd/gd_png.c:1.23 php-src/ext/gd/libgd/gd_png.c:1.24
--- php-src/ext/gd/libgd/gd_png.c:1.23  Sun Dec 10 01:28:01 2006
+++ php-src/ext/gd/libgd/gd_png.c   Wed May 16 22:16:21 2007
@@ -71,7 +71,11 @@
 
 static void gdPngReadData (png_structp png_ptr, png_bytep data, png_size_t 
length)
 {
-   gdGetBuf(data, length, (gdIOCtx *) png_get_io_ptr(png_ptr));
+   int check;
+   check = gdGetBuf(data, length, (gdIOCtx *) png_get_io_ptr(png_ptr));
+   if (check != length) {
+   png_error(png_ptr, "Read Error: truncated data");
+   }
 }
 
 static void gdPngWriteData (png_structp png_ptr, png_bytep data, png_size_t 
length)

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/libgd00086.phpt?view=markup&rev=1.1
Index: php-src/ext/gd/tests/libgd00086.phpt
+++ php-src/ext/gd/tests/libgd00086.phpt
--TEST--
Bug #39780 (PNG image with CRC/data error raises a fatal error)
--SKIPIF--

--FILE--

--EXPECTF--

Warning: imagecreatefrompng(): gd-png:  fatal libpng error: Read Error: 
truncated data in %s on line %d

Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in 
%s on line %d

Warning: imagecreatefrompng(): '%s' is not a valid PNG file in %s on line %d
bool(false)

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



[PHP-CVS] cvs: CVSROOT / avail

2007-05-16 Thread Pierre-Alain Joye
pajoye  Wed May 16 21:53:38 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - give Philip peclweb karma
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1270&r2=1.1271&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1270 CVSROOT/avail:1.1271
--- CVSROOT/avail:1.1270Tue May 15 20:59:58 2007
+++ CVSROOT/avail   Wed May 16 21:53:38 2007
@@ -82,7 +82,7 @@
 
avail|noihex,mfalgas,ereza,ebi,ait,jabro,eduardcapell,oriolm,yagooar,jeprubio,marctm|phpdoc-ca
 
 # access to the pecl website etc
-avail|dufuz,pajoye,wez,pollita,tal,cox,mj,helly,john,iliaa,edink,jan,derick,jon,cellog|peclweb,pecl
+avail|dufuz,pajoye,wez,pollita,tal,cox,mj,helly,john,iliaa,edink,jan,derick,jon,cellog,philip|peclweb,pecl
 
 # access to the newly cut pecl4win website
 avail|edink,derick|pecl4win

-- 
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-05-16 Thread Michael Wallner
mikeWed May 16 21:22:12 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - BFN
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.710&r2=1.2027.2.547.2.711&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.710 php-src/NEWS:1.2027.2.547.2.711
--- php-src/NEWS:1.2027.2.547.2.710 Wed May 16 21:04:45 2007
+++ php-src/NEWSWed May 16 21:22:12 2007
@@ -21,6 +21,8 @@
 - Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in 
   "Status:" header). (anight at eyelinkmedia dot com, Dmitry)
 - Fixed bug #41374 (wholetext concats values of wrong nodes). (Rob)
+- Fixed bug #41358 (configure cannot determine libcurl's SSL lib as of v7.16.2)
+  (Mike)
 - Fixed bug #41353 (crash in openssl_pkcs12_read() on invalid input). (Ilia)
 - Fixed bug #41351 (Invalid opcode with foreach ($a[] as $b)). (Dmitry, Tony)
 - Fixed bug #41347 (checkdnsrr() segfaults on empty hostname). (Scott)

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



[PHP-CVS] cvs: php-src /ext/curl config.m4

2007-05-16 Thread Michael Wallner
mikeWed May 16 21:19:53 2007 UTC

  Modified files:  
/php-src/ext/curl   config.m4 
  Log:
  MFB: r1.28.2.3.2.4
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/config.m4?r1=1.35&r2=1.36&diff_format=u
Index: php-src/ext/curl/config.m4
diff -u php-src/ext/curl/config.m4:1.35 php-src/ext/curl/config.m4:1.36
--- php-src/ext/curl/config.m4:1.35 Fri Sep 15 15:42:39 2006
+++ php-src/ext/curl/config.m4  Wed May 16 21:19:53 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.35 2006/09/15 15:42:39 tony2001 Exp $ 
+dnl $Id: config.m4,v 1.36 2007/05/16 21:19:53 mike Exp $ 
 dnl
 
 PHP_ARG_WITH(curl, for cURL support,
@@ -52,33 +52,64 @@
   AC_MSG_CHECKING([for SSL support in libcurl])
   CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
   if test "$CURL_SSL" = "SSL"; then
-AC_MSG_RESULT([yes])
-AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with  SSL support])
-
-AC_MSG_CHECKING([for SSL library used])
-CURL_SSL_FLAVOUR=
-for i in $CURL_LIBS; do
-  if test "$i" = "-lssl"; then
-CURL_SSL_FLAVOUR="openssl"
-AC_MSG_RESULT([openssl])
-AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
-AC_CHECK_HEADERS([openssl/crypto.h])
-break
-  elif test "$i" = "-lgnutls"; then
-CURL_SSL_FLAVOUR="gnutls"
-AC_MSG_RESULT([gnutls])
-AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
-AC_CHECK_HEADERS([gcrypt.h])
-break
-  fi
-done
-if test -z "$CURL_SSL_FLAVOUR"; then
-  AC_MSG_RESULT([unknown!])
-  AC_MSG_WARN([Could not determine the type of SSL library used!])
-  AC_MSG_WARN([Building will fail in ZTS mode!])
-fi
+   AC_MSG_RESULT([yes])
+   AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with  SSL support])
+   
+   save_CFLAGS="$CFLAGS"
+   CFLAGS="`$CURL_CONFIG --cflags`"
+   save_LDFLAGS="$LDFALGS"
+   LDFLAGS="`$CURL_CONFIG --libs` -Wl,--rpath -Wl,$CURL_DIR/$PHP_LIBDIR"
+   
+   AC_CHECK_HEADER([openssl/crypto.h], [
+AC_MSG_CHECKING([for openssl support in libcurl])
+AC_TRY_RUN([
+ #include 
+ int main(int argc, char *argv[]) {
+  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+  if (data && data->ssl_version && *data->ssl_version) {
+   const char *ptr = data->ssl_version;
+   while(*ptr == ' ') ++ptr;
+   return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
+  }
+  return 1;
+ }
+],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
+], [
+ AC_MSG_RESULT([no])
+], [
+ AC_MSG_RESULT([no])
+])
+   ])
+   
+   AC_CHECK_HEADER([gcrypt.h], [
+AC_MSG_CHECKING([for gnutls support in libcurl])
+AC_TRY_RUN([
+ #include 
+ int main(int argc, char *argv[]) {
+  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+  if (data && data->ssl_version && *data->ssl_version) {
+   const char *ptr = data->ssl_version;
+   while(*ptr == ' ') ++ptr;
+   return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
+  }
+  return 1;
+ }
+], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
+], [
+ AC_MSG_RESULT([no])
+], [
+ AC_MSG_RESULT([no])
+])
+   ])
+   
+   CFLAGS="$save_CFLAGS"
+   LDFLAGS="$save_LDFLAGS"
   else
-AC_MSG_RESULT([no])
+   AC_MSG_RESULT([no])
   fi
 
   PHP_ADD_INCLUDE($CURL_DIR/include)



-- 
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/curl config.m4

2007-05-16 Thread Michael Wallner
mikeWed May 16 21:18:41 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/curl   config.m4 
  Log:
  - fixed bug #41358: configure cannot determine libcurl's SSL lib as of v7.16.2
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/config.m4?r1=1.28.2.3.2.3&r2=1.28.2.3.2.4&diff_format=u
Index: php-src/ext/curl/config.m4
diff -u php-src/ext/curl/config.m4:1.28.2.3.2.3 
php-src/ext/curl/config.m4:1.28.2.3.2.4
--- php-src/ext/curl/config.m4:1.28.2.3.2.3 Fri Sep 15 15:42:53 2006
+++ php-src/ext/curl/config.m4  Wed May 16 21:18:41 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.28.2.3.2.3 2006/09/15 15:42:53 tony2001 Exp $ 
+dnl $Id: config.m4,v 1.28.2.3.2.4 2007/05/16 21:18:41 mike Exp $ 
 dnl
 
 PHP_ARG_WITH(curl, for cURL support,
@@ -52,33 +52,64 @@
   AC_MSG_CHECKING([for SSL support in libcurl])
   CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
   if test "$CURL_SSL" = "SSL"; then
-AC_MSG_RESULT([yes])
-AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with  SSL support])
-
-AC_MSG_CHECKING([for SSL library used])
-CURL_SSL_FLAVOUR=
-for i in $CURL_LIBS; do
-  if test "$i" = "-lssl"; then
-CURL_SSL_FLAVOUR="openssl"
-AC_MSG_RESULT([openssl])
-AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
-AC_CHECK_HEADERS([openssl/crypto.h])
-break
-  elif test "$i" = "-lgnutls"; then
-CURL_SSL_FLAVOUR="gnutls"
-AC_MSG_RESULT([gnutls])
-AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
-AC_CHECK_HEADERS([gcrypt.h])
-break
-  fi
-done
-if test -z "$CURL_SSL_FLAVOUR"; then
-  AC_MSG_RESULT([unknown!])
-  AC_MSG_WARN([Could not determine the type of SSL library used!])
-  AC_MSG_WARN([Building will fail in ZTS mode!])
-fi
+   AC_MSG_RESULT([yes])
+   AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with  SSL support])
+   
+   save_CFLAGS="$CFLAGS"
+   CFLAGS="`$CURL_CONFIG --cflags`"
+   save_LDFLAGS="$LDFALGS"
+   LDFLAGS="`$CURL_CONFIG --libs` -Wl,--rpath -Wl,$CURL_DIR/$PHP_LIBDIR"
+   
+   AC_CHECK_HEADER([openssl/crypto.h], [
+AC_MSG_CHECKING([for openssl support in libcurl])
+AC_TRY_RUN([
+ #include 
+ int main(int argc, char *argv[]) {
+  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+  if (data && data->ssl_version && *data->ssl_version) {
+   const char *ptr = data->ssl_version;
+   while(*ptr == ' ') ++ptr;
+   return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
+  }
+  return 1;
+ }
+],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
+], [
+ AC_MSG_RESULT([no])
+], [
+ AC_MSG_RESULT([no])
+])
+   ])
+   
+   AC_CHECK_HEADER([gcrypt.h], [
+AC_MSG_CHECKING([for gnutls support in libcurl])
+AC_TRY_RUN([
+ #include 
+ int main(int argc, char *argv[]) {
+  curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+  if (data && data->ssl_version && *data->ssl_version) {
+   const char *ptr = data->ssl_version;
+   while(*ptr == ' ') ++ptr;
+   return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
+  }
+  return 1;
+ }
+], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
+], [
+ AC_MSG_RESULT([no])
+], [
+ AC_MSG_RESULT([no])
+])
+   ])
+   
+   CFLAGS="$save_CFLAGS"
+   LDFLAGS="$save_LDFLAGS"
   else
-AC_MSG_RESULT([no])
+   AC_MSG_RESULT([no])
   fi
 
   PHP_ADD_INCLUDE($CURL_DIR/include)

-- 
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/array range.phpt

2007-05-16 Thread Zoe Slattery
zoe Wed May 16 21:10:57 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/array   range.phpt 
  Log:
  Updated range() test
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/range.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/array/range.phpt
diff -u php-src/ext/standard/tests/array/range.phpt:1.3 
php-src/ext/standard/tests/array/range.phpt:1.4
--- php-src/ext/standard/tests/array/range.phpt:1.3 Mon May  7 22:33:38 2007
+++ php-src/ext/standard/tests/array/range.phpt Wed May 16 21:10:57 2007
@@ -1,35 +1,115 @@
 --TEST--
-range()
---INI--
-precision=14
+Test range() function
 --FILE--
  high) && (step = 0) ) --";
+var_dump( range(2, 1, 0) );
+var_dump( range("b", "a", 0) );
+
+echo "\n\n-- Testing ( (low < high) && (high-low < step) ) --";
+var_dump( range(1.0, 7.0, 6.5) );
+
+echo "\n\n-- Testing ( (low > high) && (low-high < step) ) --";
+var_dump( range(7.0, 1.0, 6.5) );
+
+echo "\n-- Testing Invalid number of arguments --";
+var_dump( range() );  // No.of args = 0
+var_dump( range(1) );  // No.of args < expected
+var_dump( range(1,2,3,4) );  // No.of args > expected
+var_dump( range(-1, -2, 2) );  
+var_dump( range("a", "j", "z") );
+
+echo "\n-- Testing Invalid steps --";
+$step_arr = array( "string", NULL, FALSE, "", "\0" );
+
+foreach( $step_arr as $step ) {
+  var_dump( range( 1, 5, $step ) );
+}
+
+echo "\nDone";
 ?>
---EXPECT--
-array(100) {
+--EXPECTF--
+*** Testing range() function on basic operations ***
+
+-- Integers as Low and High --
+-- An array of elements from low to high --
+array(10) {
   [0]=>
   int(1)
   [1]=>
@@ -50,390 +130,35 @@
   int(9)
   [9]=>
   int(10)
-  [10]=>
-  int(11)
-  [11]=>
-  int(12)
-  [12]=>
-  int(13)
-  [13]=>
-  int(14)
-  [14]=>
-  int(15)
-  [15]=>
-  int(16)
-  [16]=>
-  int(17)
-  [17]=>
-  int(18)
-  [18]=>
-  int(19)
-  [19]=>
-  int(20)
-  [20]=>
-  int(21)
-  [21]=>
-  int(22)
-  [22]=>
-  int(23)
-  [23]=>
-  int(24)
-  [24]=>
-  int(25)
-  [25]=>
-  int(26)
-  [26]=>
-  int(27)
-  [27]=>
-  int(28)
-  [28]=>
-  int(29)
-  [29]=>
-  int(30)
-  [30]=>
-  int(31)
-  [31]=>
-  int(32)
-  [32]=>
-  int(33)
-  [33]=>
-  int(34)
-  [34]=>
-  int(35)
-  [35]=>
-  int(36)
-  [36]=>
-  int(37)
-  [37]=>
-  int(38)
-  [38]=>
-  int(39)
-  [39]=>
-  int(40)
-  [40]=>
-  int(41)
-  [41]=>
-  int(42)
-  [42]=>
-  int(43)
-  [43]=>
-  int(44)
-  [44]=>
-  int(45)
-  [45]=>
-  int(46)
-  [46]=>
-  int(47)
-  [47]=>
-  int(48)
-  [48]=>
-  int(49)
-  [49]=>
-  int(50)
-  [50]=>
-  int(51)
-  [51]=>
-  int(52)
-  [52]=>
-  int(53)
-  [53]=>
-  int(54)
-  [54]=>
-  int(55)
-  [55]=>
-  int(56)
-  [56]=>
-  int(57)
-  [57]=>
-  int(58)
-  [58]=>
-  int(59)
-  [59]=>
-  int(60)
-  [60]=>
-  int(61)
-  [61]=>
-  int(62)
-  [62]=>
-  int(63)
-  [63]=>
-  int(64)
-  [64]=>
-  int(65)
-  [65]=>
-  int(66)
-  [66]=>
-  int(67)
-  [67]=>
-  int(68)
-  [68]=>
-  int(69)
-  [69]=>
-  int(70)
-  [70]=>
-  int(71)
-  [71]=>
-  int(72)
-  [72]=>
-  int(73)
-  [73]=>
-  int(74)
-  [74]=>
-  int(75)
-  [75]=>
-  int(76)
-  [76]=>
-  int(77)
-  [77]=>
-  int(78)
-  [78]=>
-  int(79)
-  [79]=>
-  int(80)
-  [80]=>
-  int(81)
-  [81]=>
-  int(82)
-  [82]=>
-  int(83)
-  [83]=>
-  int(84)
-  [84]=>
-  int(85)
-  [85]=>
-  int(86)
-  [86]=>
-  int(87)
-  [87]=>
-  int(88)
-  [88]=>
-  int(89)
-  [89]=>
-  int(90)
-  [90]=>
-  int(91)
-  [91]=>
-  int(92)
-  [92]=>
-  int(93)
-  [93]=>
-  int(94)
-  [94]=>
-  int(95)
-  [95]=>
-  int(96)
-  [96]=>
-  int(97)
-  [97]=>
-  int(98)
-  [98]=>
-  int(99)
-  [99]=>
-  int(100)
-}
-array(100) {
-  [0]=>
-  int(100)
-  [1]=>
-  int(99)
-  [2]=>
-  int(98)
-  [3]=>
-  int(97)
-  [4]=>
-  int(96)
-  [5]=>
-  int(95)
-  [6]=>
-  int(94)
-  [7]=>
-  int(93)
-  [8]=>
-  int(92)
-  [9]=>
-  int(91)
-  [10]=>
-  int(90)
-  [11]=>
-  int(89)
-  [12]=>
-  int(88)
-  [13]=>
-  int(87)
-  [14]=>
-  int(86)
-  [15]=>
-  int(85)
-  [16]=>
-  int(84)
-  [17]=>
-  int(83)
-  [18]=>
-  int(82)
-  [19]=>
-  int(81)
-  [20]=>
-  int(80)
-  [21]=>
-  int(79)
-  [22]=>
-  int(78)
-  [23]=>
-  int(77)
-  [24]=>
-  int(76)
-  [25]=>
-  int(75)
-  [26]=>
-  int(74)
-  [27]=>
-  int(73)
-  [28]=>
-  int(72)
-  [29]=>
-  int(71)
-  [30]=>
-  int(70)
-  [31]=>
-  int(69)
-  [32]=>
-  int(68)
-  [33]=>
-  int(67)
-  [34]=>
-  int(66)
-  [35]=>
-  int(65)
-  [36]=>
-  int(64)
-  [37]=>
-  int(63)
-  [38]=>
-  int(62)
-  [39]=>
-  int(61)
-  [40]=>
-  int(60)
-  [41]=>
-  int(59)
-  [42]=>
-  int(58)
-  [43]=>
-  int(57)
-  [44]=>
-  int(56)
-  [45]=>
-  int(55)
-  [46]=>
-  int(54)
-  [47]=>
-  int(53)
-  [48]=>
-  int(52)
-  [49]=>
-  int(51)
-  [50]=>
-  int(50)
-  [51]=>
-  int(49)
-  [52]=>
-  int(48)
-  [53]=>
-  int(47)
-  [54]=>
-  int(46)
-  [55]=>
-  int(45)
-  [56]=>
-  int(44)
-  [57]=>
-  int(43)
-  [58]=>
-  int(42)
-  [59]=>
-  int(41)
-  [60]=>
-  int(40)
-  [61]=>
-  int(39)
-  [62]=>
-  int(38)
-  [63]=>
-  int(37)
-  [64]=>
-  int(36)
-  [65]=>
-  int(35)
-  [66]=>
-  int(

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

2007-05-16 Thread Zoe Slattery
zoe Wed May 16 21:07:33 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/array   range.phpt 
  Log:
  Updated range() test
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/range.phpt?r1=1.1.6.1&r2=1.1.6.2&diff_format=u
Index: php-src/ext/standard/tests/array/range.phpt
diff -u php-src/ext/standard/tests/array/range.phpt:1.1.6.1 
php-src/ext/standard/tests/array/range.phpt:1.1.6.2
--- php-src/ext/standard/tests/array/range.phpt:1.1.6.1 Mon May  7 22:30:16 2007
+++ php-src/ext/standard/tests/array/range.phpt Wed May 16 21:07:33 2007
@@ -1,35 +1,117 @@
 --TEST--
-range()
+Test range() function
 --INI--
 precision=14
 --FILE--
  high) && (step = 0) ) --";
+var_dump( range(2, 1, 0) );
+var_dump( range("b", "a", 0) );
+
+echo "\n\n-- Testing ( (low < high) && (high-low < step) ) --";
+var_dump( range(1.0, 7.0, 6.5) );
+
+echo "\n\n-- Testing ( (low > high) && (low-high < step) ) --";
+var_dump( range(7.0, 1.0, 6.5) );
+
+echo "\n-- Testing Invalid number of arguments --";
+var_dump( range() );  // No.of args = 0
+var_dump( range(1) );  // No.of args < expected
+var_dump( range(1,2,3,4) );  // No.of args > expected
+var_dump( range(-1, -2, 2) );  
+var_dump( range("a", "j", "z") );
+
+echo "\n-- Testing Invalid steps --";
+$step_arr = array( "string", NULL, FALSE, "", "\0" );
+
+foreach( $step_arr as $step ) {
+  var_dump( range( 1, 5, $step ) );
+}
+
+echo "\nDone";
 ?>
---EXPECT--
-array(100) {
+--EXPECTF--
+*** Testing range() function on basic operations ***
+
+-- Integers as Low and High --
+-- An array of elements from low to high --
+array(10) {
   [0]=>
   int(1)
   [1]=>
@@ -50,390 +132,35 @@
   int(9)
   [9]=>
   int(10)
-  [10]=>
-  int(11)
-  [11]=>
-  int(12)
-  [12]=>
-  int(13)
-  [13]=>
-  int(14)
-  [14]=>
-  int(15)
-  [15]=>
-  int(16)
-  [16]=>
-  int(17)
-  [17]=>
-  int(18)
-  [18]=>
-  int(19)
-  [19]=>
-  int(20)
-  [20]=>
-  int(21)
-  [21]=>
-  int(22)
-  [22]=>
-  int(23)
-  [23]=>
-  int(24)
-  [24]=>
-  int(25)
-  [25]=>
-  int(26)
-  [26]=>
-  int(27)
-  [27]=>
-  int(28)
-  [28]=>
-  int(29)
-  [29]=>
-  int(30)
-  [30]=>
-  int(31)
-  [31]=>
-  int(32)
-  [32]=>
-  int(33)
-  [33]=>
-  int(34)
-  [34]=>
-  int(35)
-  [35]=>
-  int(36)
-  [36]=>
-  int(37)
-  [37]=>
-  int(38)
-  [38]=>
-  int(39)
-  [39]=>
-  int(40)
-  [40]=>
-  int(41)
-  [41]=>
-  int(42)
-  [42]=>
-  int(43)
-  [43]=>
-  int(44)
-  [44]=>
-  int(45)
-  [45]=>
-  int(46)
-  [46]=>
-  int(47)
-  [47]=>
-  int(48)
-  [48]=>
-  int(49)
-  [49]=>
-  int(50)
-  [50]=>
-  int(51)
-  [51]=>
-  int(52)
-  [52]=>
-  int(53)
-  [53]=>
-  int(54)
-  [54]=>
-  int(55)
-  [55]=>
-  int(56)
-  [56]=>
-  int(57)
-  [57]=>
-  int(58)
-  [58]=>
-  int(59)
-  [59]=>
-  int(60)
-  [60]=>
-  int(61)
-  [61]=>
-  int(62)
-  [62]=>
-  int(63)
-  [63]=>
-  int(64)
-  [64]=>
-  int(65)
-  [65]=>
-  int(66)
-  [66]=>
-  int(67)
-  [67]=>
-  int(68)
-  [68]=>
-  int(69)
-  [69]=>
-  int(70)
-  [70]=>
-  int(71)
-  [71]=>
-  int(72)
-  [72]=>
-  int(73)
-  [73]=>
-  int(74)
-  [74]=>
-  int(75)
-  [75]=>
-  int(76)
-  [76]=>
-  int(77)
-  [77]=>
-  int(78)
-  [78]=>
-  int(79)
-  [79]=>
-  int(80)
-  [80]=>
-  int(81)
-  [81]=>
-  int(82)
-  [82]=>
-  int(83)
-  [83]=>
-  int(84)
-  [84]=>
-  int(85)
-  [85]=>
-  int(86)
-  [86]=>
-  int(87)
-  [87]=>
-  int(88)
-  [88]=>
-  int(89)
-  [89]=>
-  int(90)
-  [90]=>
-  int(91)
-  [91]=>
-  int(92)
-  [92]=>
-  int(93)
-  [93]=>
-  int(94)
-  [94]=>
-  int(95)
-  [95]=>
-  int(96)
-  [96]=>
-  int(97)
-  [97]=>
-  int(98)
-  [98]=>
-  int(99)
-  [99]=>
-  int(100)
-}
-array(100) {
-  [0]=>
-  int(100)
-  [1]=>
-  int(99)
-  [2]=>
-  int(98)
-  [3]=>
-  int(97)
-  [4]=>
-  int(96)
-  [5]=>
-  int(95)
-  [6]=>
-  int(94)
-  [7]=>
-  int(93)
-  [8]=>
-  int(92)
-  [9]=>
-  int(91)
-  [10]=>
-  int(90)
-  [11]=>
-  int(89)
-  [12]=>
-  int(88)
-  [13]=>
-  int(87)
-  [14]=>
-  int(86)
-  [15]=>
-  int(85)
-  [16]=>
-  int(84)
-  [17]=>
-  int(83)
-  [18]=>
-  int(82)
-  [19]=>
-  int(81)
-  [20]=>
-  int(80)
-  [21]=>
-  int(79)
-  [22]=>
-  int(78)
-  [23]=>
-  int(77)
-  [24]=>
-  int(76)
-  [25]=>
-  int(75)
-  [26]=>
-  int(74)
-  [27]=>
-  int(73)
-  [28]=>
-  int(72)
-  [29]=>
-  int(71)
-  [30]=>
-  int(70)
-  [31]=>
-  int(69)
-  [32]=>
-  int(68)
-  [33]=>
-  int(67)
-  [34]=>
-  int(66)
-  [35]=>
-  int(65)
-  [36]=>
-  int(64)
-  [37]=>
-  int(63)
-  [38]=>
-  int(62)
-  [39]=>
-  int(61)
-  [40]=>
-  int(60)
-  [41]=>
-  int(59)
-  [42]=>
-  int(58)
-  [43]=>
-  int(57)
-  [44]=>
-  int(56)
-  [45]=>
-  int(55)
-  [46]=>
-  int(54)
-  [47]=>
-  int(53)
-  [48]=>
-  int(52)
-  [49]=>
-  int(51)
-  [50]=>
-  int(50)
-  [51]=>
-  int(49)
-  [52]=>
-  int(48)
-  [53]=>
-  int(47)
-  [54]=>
-  int(46)
-  [55]=>
-  int(45)
-  [56]=>
-  int(44)
-  [57]=>
-  int(43)
-  [58]=>
-  int(42)
-  [59]=>
-  int(41)
-  [60]=>
-  int(40)
-  [61]=>
-  int(39)
-  [62]=>
-  int(38)
-  [63]=>
-  int(37)
-  [64]=>
-  int(36)
-  [6

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo/tests pdo_034.phpt

2007-05-16 Thread Ilia Alshanetsky
iliaa   Wed May 16 21:03:46 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo/tests  pdo_034.phpt 
  Log:
  Make test work in sqlite
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/pdo_034.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/pdo/tests/pdo_034.phpt
diff -u php-src/ext/pdo/tests/pdo_034.phpt:1.1.2.1 
php-src/ext/pdo/tests/pdo_034.phpt:1.1.2.2
--- php-src/ext/pdo/tests/pdo_034.phpt:1.1.2.1  Wed May 16 19:33:57 2007
+++ php-src/ext/pdo/tests/pdo_034.phpt  Wed May 16 21:03:46 2007
@@ -60,5 +60,5 @@
 
 Warning: PDOStatement::fetch(): SQLSTATE[HY000]: General error: 
PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain extactly 2 
columns. in %s/tests/pdo_034.php on line %d
 
-Warning: PDOStatement::fetch(): SQLSTATE[HY000]: General error in 
%s/tests/pdo_034.php on line %d
+Warning: PDOStatement::fetch(): SQLSTATE[HY000]: General 
error%s/tests/pdo_034.php on line %d
 bool(false)

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



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

2007-05-16 Thread Ilia Alshanetsky
iliaa   Wed May 16 20:12:53 2007 UTC

  Modified files:  
/php-src/ext/pdopdo_stmt.c 
  Log:
  
  Fixed a typo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.174&r2=1.175&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.174 php-src/ext/pdo/pdo_stmt.c:1.175
--- php-src/ext/pdo/pdo_stmt.c:1.174Wed May 16 19:58:58 2007
+++ php-src/ext/pdo/pdo_stmt.c  Wed May 16 20:12:53 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_stmt.c,v 1.174 2007/05/16 19:58:58 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.175 2007/05/16 20:12:53 iliaa Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -1043,7 +1043,7 @@

if (Z_TYPE_P(val) == IS_STRING) 
{

zend_symtable_update(Z_ARRVAL_P(return_value), Z_STRVAL_P(val), Z_STRLEN_P(val) 
+ 1, &tmp, sizeof(zval *), NULL);
-   } else if (Z_TYPE_P(val) = 
IS_LONG) {
+   } else if (Z_TYPE_P(val) == 
IS_LONG) {

zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_P(val), tmp, 
sizeof(tmp), NULL);
} else {
convert_to_string(val);

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



Re: [PHP-CVS] cvs: php-src /ext/pdo pdo_dbh.c pdo_stmt.c php_pdo_driver.h

2007-05-16 Thread Antony Dovgal

On 16.05.2007 23:58, Ilia Alshanetsky wrote:

iliaa   Wed May 16 19:58:58 2007 UTC

  Modified files:  
/php-src/ext/pdo	pdo_dbh.c pdo_stmt.c php_pdo_driver.h 
  Log:
  
  MFB: PDO:FETCH_KEY_PAIR


I know it sounds weird, but there is no point in MFBing this patch.
PDO in HEAD is completely out of sync with 5_2, this patch won't help much.. 


--
Wbr, 
Antony Dovgal


--
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 pdo_stmt.c

2007-05-16 Thread Antony Dovgal
tony2001Wed May 16 20:04:32 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdopdo_stmt.c 
  Log:
  typofix
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.17&r2=1.118.2.38.2.18&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.17 
php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.18
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.17  Wed May 16 19:33:57 2007
+++ php-src/ext/pdo/pdo_stmt.c  Wed May 16 20:04:32 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.17 2007/05/16 19:33:57 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.18 2007/05/16 20:04:32 tony2001 Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -1041,7 +1041,7 @@

if (Z_TYPE_P(val) == IS_STRING) 
{

zend_symtable_update(Z_ARRVAL_P(return_value), Z_STRVAL_P(val), Z_STRLEN_P(val) 
+ 1, &tmp, sizeof(zval *), NULL);
-   } else if (Z_TYPE_P(val) = 
IS_LONG) {
+   } else if (Z_TYPE_P(val) == 
IS_LONG) {

zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_P(val), tmp, 
sizeof(tmp), NULL);
} else {
convert_to_string(val);

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



[PHP-CVS] cvs: php-src /ext/pdo pdo_dbh.c pdo_stmt.c php_pdo_driver.h

2007-05-16 Thread Ilia Alshanetsky
iliaa   Wed May 16 19:58:58 2007 UTC

  Modified files:  
/php-src/ext/pdopdo_dbh.c pdo_stmt.c php_pdo_driver.h 
  Log:
  
  MFB: PDO:FETCH_KEY_PAIR
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.139&r2=1.140&diff_format=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.139 php-src/ext/pdo/pdo_dbh.c:1.140
--- php-src/ext/pdo/pdo_dbh.c:1.139 Mon Jan  1 09:29:27 2007
+++ php-src/ext/pdo/pdo_dbh.c   Wed May 16 19:58:58 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_dbh.c,v 1.139 2007/01/01 09:29:27 sebastian Exp $ */
+/* $Id: pdo_dbh.c,v 1.140 2007/05/16 19:58:58 iliaa Exp $ */
 
 /* The PDO Database Handle Class */
 
@@ -1328,6 +1328,7 @@
REGISTER_PDO_CLASS_CONST_LONG("FETCH_FUNC", (long)PDO_FETCH_FUNC);
REGISTER_PDO_CLASS_CONST_LONG("FETCH_GROUP",(long)PDO_FETCH_GROUP);
REGISTER_PDO_CLASS_CONST_LONG("FETCH_UNIQUE",(long)PDO_FETCH_UNIQUE);
+   
REGISTER_PDO_CLASS_CONST_LONG("FETCH_KEY_PAIR",(long)PDO_FETCH_KEY_PAIR);

REGISTER_PDO_CLASS_CONST_LONG("FETCH_CLASSTYPE",(long)PDO_FETCH_CLASSTYPE);
 #if PHP_MAJOR_VERSION > 5 || PHP_MINOR_VERSION >= 1

REGISTER_PDO_CLASS_CONST_LONG("FETCH_SERIALIZE",(long)PDO_FETCH_SERIALIZE);
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.173&r2=1.174&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.173 php-src/ext/pdo/pdo_stmt.c:1.174
--- php-src/ext/pdo/pdo_stmt.c:1.173Wed Mar  7 09:02:18 2007
+++ php-src/ext/pdo/pdo_stmt.c  Wed May 16 19:58:58 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_stmt.c,v 1.173 2007/03/07 09:02:18 tony2001 Exp $ */
+/* $Id: pdo_stmt.c,v 1.174 2007/05/16 19:58:58 iliaa Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -896,6 +896,21 @@
}
break;
 
+   case PDO_FETCH_KEY_PAIR:
+   if (stmt->column_count != 2) {
+   pdo_raise_impl_error(stmt->dbh, stmt, 
"HY000", "PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain 
extactly 2 columns." TSRMLS_CC);
+   return 0;
+   }
+
+   if (!return_all) {
+   ALLOC_HASHTABLE(return_value->value.ht);
+   zend_hash_init(return_value->value.ht, 
1, NULL, ZVAL_PTR_DTOR, 0);
+   Z_TYPE_P(return_value) = IS_ARRAY;
+   } else {
+   array_init(return_value);
+   }
+   break;
+
case PDO_FETCH_COLUMN:
if (stmt->fetch.column >= 0 && 
stmt->fetch.column < stmt->column_count) {
fetch_value(stmt, return_value, 
stmt->fetch.column, NULL TSRMLS_CC);
@@ -1019,6 +1034,25 @@
case PDO_FETCH_ASSOC:
add_assoc_zval(return_value, 
stmt->columns[i].name, val);
break;
+   
+   case PDO_FETCH_KEY_PAIR:
+   {
+   zval *tmp;
+   MAKE_STD_ZVAL(tmp);
+   fetch_value(stmt, tmp, ++i, 
NULL TSRMLS_CC);
+   
+   if (Z_TYPE_P(val) == IS_STRING) 
{
+   
zend_symtable_update(Z_ARRVAL_P(return_value), Z_STRVAL_P(val), Z_STRLEN_P(val) 
+ 1, &tmp, sizeof(zval *), NULL);
+   } else if (Z_TYPE_P(val) = 
IS_LONG) {
+   
zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_P(val), tmp, 
sizeof(tmp), NULL);
+   } else {
+   convert_to_string(val);
+   
zend_symtable_update(Z_ARRVAL_P(return_value), Z_STRVAL_P(val), Z_STRLEN_P(val) 
+ 1, &tmp, sizeof(zval *), NULL);
+   }
+   zval_dtor(val);
+   FREE_ZVAL(val);
+   }
+   break;
 
case PDO_FETCH_USE_DEFAULT:
case PDO_FETCH_BOTH:
http://cvs.php.net/viewvc.cgi/p

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

2007-05-16 Thread Ilia Alshanetsky
iliaa   Wed May 16 19:36:21 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  news
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.708&r2=1.2027.2.547.2.709&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.708 php-src/NEWS:1.2027.2.547.2.709
--- php-src/NEWS:1.2027.2.547.2.708 Wed May 16 13:17:50 2007
+++ php-src/NEWSWed May 16 19:36:21 2007
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 2007, PHP 5.2.3
+- Added PDO::FETCH_KEY_PAIR mode that will fetch a 2 column result set into 
+  an associated array.
 - Added function mysql_set_charset(). Allows connection encoding to be 
   altered at run time. (Scott)
 - Allow SOAP extension's handler() to work even when

-- 
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 pdo_dbh.c pdo_stmt.c php_pdo_driver.h /ext/pdo/tests pdo_034.phpt

2007-05-16 Thread Ilia Alshanetsky
iliaa   Wed May 16 19:33:57 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/pdo/tests  pdo_034.phpt 

  Modified files:  
/php-src/ext/pdopdo_dbh.c pdo_stmt.c php_pdo_driver.h 
  Log:
  [DOC] Added PDO::FETCH_KEY_PAIR mode that will fetch a 2 column result set 
  into an associated array.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.10&r2=1.82.2.31.2.11&diff_format=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.10 
php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.11
--- php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.10Sun Apr 29 14:47:34 2007
+++ php-src/ext/pdo/pdo_dbh.c   Wed May 16 19:33:57 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_dbh.c,v 1.82.2.31.2.10 2007/04/29 14:47:34 iliaa Exp $ */
+/* $Id: pdo_dbh.c,v 1.82.2.31.2.11 2007/05/16 19:33:57 iliaa Exp $ */
 
 /* The PDO Database Handle Class */
 
@@ -1313,6 +1313,7 @@
REGISTER_PDO_CLASS_CONST_LONG("FETCH_FUNC", (long)PDO_FETCH_FUNC);
REGISTER_PDO_CLASS_CONST_LONG("FETCH_GROUP",(long)PDO_FETCH_GROUP);
REGISTER_PDO_CLASS_CONST_LONG("FETCH_UNIQUE",(long)PDO_FETCH_UNIQUE);
+   
REGISTER_PDO_CLASS_CONST_LONG("FETCH_KEY_PAIR",(long)PDO_FETCH_KEY_PAIR);

REGISTER_PDO_CLASS_CONST_LONG("FETCH_CLASSTYPE",(long)PDO_FETCH_CLASSTYPE);
 #if PHP_MAJOR_VERSION > 5 || PHP_MINOR_VERSION >= 1

REGISTER_PDO_CLASS_CONST_LONG("FETCH_SERIALIZE",(long)PDO_FETCH_SERIALIZE);
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.16&r2=1.118.2.38.2.17&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.16 
php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.17
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.16  Tue Apr 17 17:00:16 2007
+++ php-src/ext/pdo/pdo_stmt.c  Wed May 16 19:33:57 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.16 2007/04/17 17:00:16 tony2001 Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.17 2007/05/16 19:33:57 iliaa Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -900,6 +900,15 @@
}
break;
 
+   case PDO_FETCH_KEY_PAIR:
+   if (stmt->column_count != 2) {
+   pdo_raise_impl_error(stmt->dbh, stmt, 
"HY000", "PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain 
extactly 2 columns." TSRMLS_CC);
+   return 0;
+   }
+
+   array_init(return_value);
+   break;
+
case PDO_FETCH_COLUMN:
if (stmt->fetch.column >= 0 && 
stmt->fetch.column < stmt->column_count) {
fetch_value(stmt, return_value, 
stmt->fetch.column, NULL TSRMLS_CC);
@@ -1023,6 +1032,25 @@
case PDO_FETCH_ASSOC:
add_assoc_zval(return_value, 
stmt->columns[i].name, val);
break;
+   
+   case PDO_FETCH_KEY_PAIR:
+   {
+   zval *tmp;
+   MAKE_STD_ZVAL(tmp);
+   fetch_value(stmt, tmp, ++i, 
NULL TSRMLS_CC);
+   
+   if (Z_TYPE_P(val) == IS_STRING) 
{
+   
zend_symtable_update(Z_ARRVAL_P(return_value), Z_STRVAL_P(val), Z_STRLEN_P(val) 
+ 1, &tmp, sizeof(zval *), NULL);
+   } else if (Z_TYPE_P(val) = 
IS_LONG) {
+   
zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_P(val), tmp, 
sizeof(tmp), NULL);
+   } else {
+   convert_to_string(val);
+   
zend_symtable_update(Z_ARRVAL_P(return_value), Z_STRVAL_P(val), Z_STRLEN_P(val) 
+ 1, &tmp, sizeof(zval *), NULL);
+   }
+   zval_dtor(val);
+   FREE_ZVAL(val);
+   }
+   break;
 
case PDO_FETCH_USE_DEFAULT:
case PDO_FETCH_BOTH:
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/php_pdo_driver.h?r1=1.66.2.11.2.4&r2=1.66.2.11.2.5&diff_format=u
Index: php-src

[PHP-CVS] cvs: CVSROOT /pear avail

2007-05-16 Thread David Coallier
davidc  Wed May 16 13:46:40 2007 UTC

  Modified files:  
/CVSROOT/pear   avail 
  Log:
  - Added marcelo araujo for Text_CAPTCHA_Numeral
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/pear/avail?r1=1.5&r2=1.6&diff_format=u
Index: CVSROOT/pear/avail
diff -u CVSROOT/pear/avail:1.5 CVSROOT/pear/avail:1.6
--- CVSROOT/pear/avail:1.5  Fri May 11 21:20:47 2007
+++ CVSROOT/pear/avail  Wed May 16 13:46:40 2007
@@ -131,6 +131,7 @@
 avail|ifeghali|pear/MDB2_Schema
 avail|janisto|pear/Validate,peardoc
 avail|tias|pear/PEAR_Frontend_Web,peardoc
+avail|msaraujo|pear/Text_CAPTCHA_Numeral
 
 avail|fernandoc,marcelo|peardoc/pt_BR
 # vim:set ft=conf sw=2 ts=2 et:

-- 
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/dbase dbf_head.c

2007-05-16 Thread Antony Dovgal
tony2001Wed May 16 13:17:50 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/dbase  dbf_head.c 
  Log:
  MFH: fix #41394 (dbase_create creates file with corrupted header)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.707&r2=1.2027.2.547.2.708&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.707 php-src/NEWS:1.2027.2.547.2.708
--- php-src/NEWS:1.2027.2.547.2.707 Wed May 16 12:54:30 2007
+++ php-src/NEWSWed May 16 13:17:50 2007
@@ -12,6 +12,7 @@
 - Fixed segfault in strripos(). (Tony, Joxean Koret)
 - Fixed bug #41403 (json_decode cannot decode floats if localeconv 
   decimal_point is not '.'). (Tony)
+- Fixed bug #41394 (dbase_create creates file with corrupted header). (Tony)
 - Fixed bug #41390 (Clarify error message with invalid protocol scheme).
   (Scott)
 - Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in 
http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbf_head.c?r1=1.14.4.1.2.5&r2=1.14.4.1.2.6&diff_format=u
Index: php-src/ext/dbase/dbf_head.c
diff -u php-src/ext/dbase/dbf_head.c:1.14.4.1.2.5 
php-src/ext/dbase/dbf_head.c:1.14.4.1.2.6
--- php-src/ext/dbase/dbf_head.c:1.14.4.1.2.5   Sat Feb 24 18:00:43 2007
+++ php-src/ext/dbase/dbf_head.cWed May 16 13:17:50 2007
@@ -184,7 +184,7 @@
/* build the on disk field info */
scp = dbf->db_fname; dcp = dbfield.dbf_name;
 
-   strlcpy(dbfield.dbf_name, dbf->db_fname, DBF_NAMELEN);
+   strlcpy(dbfield.dbf_name, dbf->db_fname, DBF_NAMELEN + 1);
 
dbfield.dbf_type = dbf->db_type;
switch (dbf->db_type) {
@@ -215,7 +215,7 @@
int fcnt;
 
if ((cp = db_cur_date(NULL))) {
-   strlcpy(dbh->db_date, cp, 8);
+   strlcpy(dbh->db_date, cp, 9);
free(cp);
}
put_dbf_head(dbh);

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



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

2007-05-16 Thread Antony Dovgal
tony2001Wed May 16 13:16:57 2007 UTC

  Modified files:  
/php-src/ext/dbase  dbf_head.c 
  Log:
  fix #41394 (dbase_create creates file with corrupted header)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbf_head.c?r1=1.19&r2=1.20&diff_format=u
Index: php-src/ext/dbase/dbf_head.c
diff -u php-src/ext/dbase/dbf_head.c:1.19 php-src/ext/dbase/dbf_head.c:1.20
--- php-src/ext/dbase/dbf_head.c:1.19   Sat Feb 24 16:25:53 2007
+++ php-src/ext/dbase/dbf_head.cWed May 16 13:16:56 2007
@@ -184,7 +184,7 @@
/* build the on disk field info */
scp = dbf->db_fname; dcp = dbfield.dbf_name;
 
-   strncpy(dbfield.dbf_name, dbf->db_fname, DBF_NAMELEN);
+   strlcpy(dbfield.dbf_name, dbf->db_fname, DBF_NAMELEN + 1);
 
dbfield.dbf_type = dbf->db_type;
switch (dbf->db_type) {
@@ -215,7 +215,7 @@
int fcnt;
 
if ((cp = db_cur_date(NULL))) {
-   strlcpy(dbh->db_date, cp, 8);
+   strlcpy(dbh->db_date, cp, 9);
free(cp);
}
put_dbf_head(dbh);

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

2007-05-16 Thread Antony Dovgal
tony2001Wed May 16 12:54:31 2007 UTC

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

  Modified files:  
/php-srcNEWS 
/php-src/ext/json   JSON_parser.c 
  Log:
  MFH: fix #41403 (json_decode cannot decode floats if localeconv decimal_point 
is not '.')
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.706&r2=1.2027.2.547.2.707&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.706 php-src/NEWS:1.2027.2.547.2.707
--- php-src/NEWS:1.2027.2.547.2.706 Tue May 15 13:04:43 2007
+++ php-src/NEWSWed May 16 12:54:30 2007
@@ -10,6 +10,8 @@
 - Fixed altering $this via argument named "this". (Dmitry)
 - Fixed PHP CLI to use the php.ini from the binary location. (Hannes)
 - Fixed segfault in strripos(). (Tony, Joxean Koret)
+- Fixed bug #41403 (json_decode cannot decode floats if localeconv 
+  decimal_point is not '.'). (Tony)
 - Fixed bug #41390 (Clarify error message with invalid protocol scheme).
   (Scott)
 - Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in 
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.1.2.6&r2=1.1.2.7&diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.1.2.6 
php-src/ext/json/JSON_parser.c:1.1.2.7
--- php-src/ext/json/JSON_parser.c:1.1.2.6  Mon Apr 16 22:31:05 2007
+++ php-src/ext/json/JSON_parser.c  Wed May 16 12:54:30 2007
@@ -288,7 +288,7 @@
 }
 else if (type == IS_DOUBLE)
 {
-ZVAL_DOUBLE(*z, atof(buf->c));
+ZVAL_DOUBLE(*z, zend_strtod(buf->c, NULL));
 }
 else if (type == IS_STRING)
 {

http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug41403.phpt?view=markup&rev=1.1
Index: php-src/ext/json/tests/bug41403.phpt
+++ php-src/ext/json/tests/bug41403.phpt
--TEST--
Bug #41403 (json_decode cannot decode floats if localeconv decimal_point is not 
'.')
--SKIPIF--

--INI--
precision=14
--FILE--

--EXPECTF-- 
array(1) {
  [0]=>
  float(2,1)
}
array(1) {
  [0]=>
  float(0,15)
}
array(1) {
  [0]=>
  float(123,13452345)
}
array(2) {
  [0]=>
  int(123)
  [1]=>
  int(13452345)
}
Done
--UEXPECTF--
Strict Standards: setlocale(): deprecated in Unicode mode, please use ICU 
locale functions in %s on line %d
array(1) {
  [0]=>
  float(2,1)
}
array(1) {
  [0]=>
  float(0,15)
}
array(1) {
  [0]=>
  float(123,13452345)
}
array(2) {
  [0]=>
  int(123)
  [1]=>
  int(13452345)
}
Done

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



[PHP-CVS] cvs: php-src /ext/json JSON_parser.c /ext/json/tests bug41403.phpt

2007-05-16 Thread Antony Dovgal
tony2001Wed May 16 12:53:36 2007 UTC

  Added files: 
/php-src/ext/json/tests bug41403.phpt 

  Modified files:  
/php-src/ext/json   JSON_parser.c 
  Log:
  fix #41403 (json_decode cannot decode floats if localeconv decimal_point is 
not '.')
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.9&r2=1.10&diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.9 php-src/ext/json/JSON_parser.c:1.10
--- php-src/ext/json/JSON_parser.c:1.9  Thu Apr 19 22:49:11 2007
+++ php-src/ext/json/JSON_parser.c  Wed May 16 12:53:36 2007
@@ -288,7 +288,7 @@
 }
 else if (type == IS_DOUBLE)
 {
-ZVAL_DOUBLE(*z, atof(buf->c));
+ZVAL_DOUBLE(*z, zend_strtod(buf->c, NULL));
 }
 else if (type == IS_STRING)
 {

http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug41403.phpt?view=markup&rev=1.1
Index: php-src/ext/json/tests/bug41403.phpt
+++ php-src/ext/json/tests/bug41403.phpt
--TEST--
Bug #41403 (json_decode cannot decode floats if localeconv decimal_point is not 
'.')
--SKIPIF--

--INI--
precision=14
--FILE--

--EXPECTF-- 
array(1) {
  [0]=>
  float(2,1)
}
array(1) {
  [0]=>
  float(0,15)
}
array(1) {
  [0]=>
  float(123,13452345)
}
array(2) {
  [0]=>
  int(123)
  [1]=>
  int(13452345)
}
Done
--UEXPECTF--
Strict Standards: setlocale(): deprecated in Unicode mode, please use ICU 
locale functions in %s on line %d
array(1) {
  [0]=>
  float(2,1)
}
array(1) {
  [0]=>
  float(0,15)
}
array(1) {
  [0]=>
  float(123,13452345)
}
array(2) {
  [0]=>
  int(123)
  [1]=>
  int(13452345)
}
Done

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