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

2007-04-17 Thread changelog
changelog   Wed Apr 18 01:31:10 2007 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2661r2=1.2662diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2661 php-src/ChangeLog:1.2662
--- php-src/ChangeLog:1.2661Tue Apr 17 01:31:06 2007
+++ php-src/ChangeLog   Wed Apr 18 01:31:09 2007
@@ -1,3 +1,182 @@
+2007-04-17  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/standard/basic_functions.c
+  ext/standard/tests/general_functions/putenv.phpt:
+  MFH: fix putenv(var) (i.e. unset) on BSD systems
+  add test
+
+* ext/standard/basic_functions.c
+  ext/standard/tests/general_functions/putenv.phpt
+  ext/standard/tests/general_functions/putenv.phpt:
+  fix putenv(var) (i.e. unset) on BSD systems
+  add test
+
+* sapi/cgi/tests/006.phpt
+  sapi/cgi/tests/006.phpt:
+  fix test
+
+2007-04-17  Jani Taskinen  [EMAIL PROTECTED]
+
+* sapi/cgi/cgi_main.c:
+  MFB:- Fix a possible leak when multiple -c parameters are used
+
+* (PHP_5_2)
+  sapi/cgi/cgi_main.c
+  sapi/cli/php_cli.c:
+  - Fix a possible leak when multiple -c parameters are used
+
+2007-04-17  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  sapi/cgi/tests/.cvsignore:
+  add .cvsignore
+
+* sapi/cgi/tests/.cvsignore
+  sapi/cgi/tests/.cvsignore:
+  
+  add .cvsignore
+
+* run-tests.php
+  run-tests.php
+  sapi/cgi/tests/001.phpt
+  sapi/cgi/tests/001.phpt
+  sapi/cgi/tests/001.phpt
+  sapi/cgi/tests/002.phpt
+  sapi/cgi/tests/002.phpt
+  sapi/cgi/tests/002.phpt
+  sapi/cgi/tests/003.phpt
+  sapi/cgi/tests/003.phpt
+  sapi/cgi/tests/003.phpt
+  sapi/cgi/tests/004.phpt
+  sapi/cgi/tests/004.phpt
+  sapi/cgi/tests/004.phpt
+  sapi/cgi/tests/005.phpt
+  sapi/cgi/tests/005.phpt
+  sapi/cgi/tests/005.phpt
+  sapi/cgi/tests/006.phpt
+  sapi/cgi/tests/006.phpt
+  sapi/cgi/tests/006.phpt
+  sapi/cgi/tests/007.phpt
+  sapi/cgi/tests/007.phpt
+  sapi/cgi/tests/007.phpt
+  sapi/cgi/tests/008.phpt
+  sapi/cgi/tests/008.phpt
+  sapi/cgi/tests/008.phpt
+  sapi/cgi/tests/include.inc
+  sapi/cgi/tests/include.inc
+  sapi/cgi/tests/include.inc
+  sapi/cgi/tests/skipif.inc
+  sapi/cgi/tests/skipif.inc
+  sapi/cgi/tests/skipif.inc:
+  add tests for CGI
+
+2007-04-17  Jani Taskinen  [EMAIL PROTECTED]
+
+* sapi/cli/php_cli.c:
+  MFB
+
+2007-04-17  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  sapi/cgi/cgi_main.c:
+  MFH: fix leak appearing when more than one -f option specified
+
+* sapi/cgi/cgi_main.c:
+  fix leak appearing when more than one -f option specified
+
+2007-04-17  Sara Golemon  [EMAIL PROTECTED]
+
+* ext/curl/interface.c:
+  Add support for CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS
+
+2007-04-17  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/pdo/pdo_stmt.c:
+  fix leaks in row_get_properties()
+  thanks to Kellen Bombardier for noticing
+
+2007-04-17  Hannes Magnusson  [EMAIL PROTECTED]
+
+* ext/gd/gd.c
+  ext/gd/gd.c:
+  Fix proto
+
+2007-04-17  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/gd/gd.c:
+  - INFO_EX not INFO
+
+* ext/gd/gd.c:
+  - +ZEND_BEGIN_ARG_INFO_EX not _INFO (thx bjori)
+
+* (PHP_5_2)
+  NEWS:
+  - imagegrab* entry
+
+* (PHP_5_2)
+  ext/gd/config.w32
+  ext/gd/gd.c
+  ext/gd/php_gd.h:
+  - MFH: add imagegrabwindow and imagegrabscreen (win32 only) [DOC]
+capture a window using its handle or a full screen
+
+2007-04-17  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/pdo_pgsql/pgsql_statement.c:
+  
+  Separate parm zval.
+
+2007-04-17  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* ext/gd/gd.c:
+  - fix arginfo
+
+* ext/gd/config.w32
+  ext/gd/gd.c
+  ext/gd/php_gd.h:
+  - add imagegrabwindow and imagegrabscreen (win32 only)
+capture a window using its handle or a full screen
+optional bbox and to/from clipboard  will follow shortly
+
+2007-04-17  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  main/php_variables.c:
+  Fixed bug #41093 (magic_quotes_gpc ignores first arrays keys).
+
+2007-04-17  Zoe Slattery  [EMAIL PROTECTED]
+
+* ext/standard/tests/strings/ltrim.phpt:
+  Updated testcase ltrim()
+
+2007-04-17  Marcus Boerger  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/spl/spl.php
+  ext/spl/internal/recursiveiterator.inc
+  ext/spl/internal/seekableiterator.inc:
+  - MFH Fix #41109: recursiveiterator.inc says 'implements' Iterator 
instead
+  of 'extends'
+
+* ext/spl/spl.php
+  ext/spl/internal/recursiveiterator.inc
+  ext/spl/internal/seekableiterator.inc:
+  - Fix #41109: 

[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2007-04-17 Thread changelog
changelog   Wed Apr 18 01:31:13 2007 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1096r2=1.1097diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1096 ZendEngine2/ChangeLog:1.1097
--- ZendEngine2/ChangeLog:1.1096Tue Apr 17 01:31:09 2007
+++ ZendEngine2/ChangeLog   Wed Apr 18 01:31:12 2007
@@ -1,3 +1,9 @@
+2007-04-17  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend_types.h
+  zend_types.h:
+  typo
+
 2007-04-16  Johannes Schlüter  [EMAIL PROTECTED]
 
 * zend_API.c:
@@ -17337,7 +17343,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1096 2007/04/17 01:31:09 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1097 2007/04/18 01:31:12 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -19061,7 +19067,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1096 2007/04/17 01:31:09 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1097 2007/04/18 01:31:12 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src /ext/spl spl.php /ext/spl/internal recursiveiterator.inc seekableiterator.inc

2007-04-17 Thread Marcus Boerger
helly   Tue Apr 17 06:31:19 2007 UTC

  Modified files:  
/php-src/ext/splspl.php 
/php-src/ext/spl/internal   recursiveiterator.inc 
seekableiterator.inc 
  Log:
  - Fix #41109: recursiveiterator.inc says 'implements' Iterator instead of 
'extends'
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.78r2=1.79diff_format=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.78 php-src/ext/spl/spl.php:1.79
--- php-src/ext/spl/spl.php:1.78Mon Feb 26 22:32:57 2007
+++ php-src/ext/spl/spl.php Tue Apr 17 06:31:19 2007
@@ -32,12 +32,12 @@
  * 
  * SPL offers some advanced iterator algorithms:
  * 
- * - interface RecursiveIterator implements Iterator
+ * - interface RecursiveIterator extends Iterator
  * - interface OuterIterator extends Iterator
  * - class RecursiveIteratorIterator implements OuterIterator
  * - abstract class FilterIterator implements OuterIterator
  * - class ParentIterator extends FilterIterator implements RecursiveIterator
- * - interface SeekableIterator implements Iterator
+ * - interface SeekableIterator extends Iterator
  * - class LimitIterator implements OuterIterator
  * - class CachingIterator implements OuterIterator
  * - class RecursiveCachingIterator extends CachingIterator implements 
RecursiveIterator
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/internal/recursiveiterator.inc?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/spl/internal/recursiveiterator.inc
diff -u php-src/ext/spl/internal/recursiveiterator.inc:1.7 
php-src/ext/spl/internal/recursiveiterator.inc:1.8
--- php-src/ext/spl/internal/recursiveiterator.inc:1.7  Tue Feb 21 23:21:53 2006
+++ php-src/ext/spl/internal/recursiveiterator.inc  Tue Apr 17 06:31:19 2007
@@ -15,7 +15,7 @@
  * @version 1.0
  * @since PHP 5.0
  */
-interface RecursiveIterator implements Iterator
+interface RecursiveIterator extends Iterator
 {
/** @return whether the current element has children
 */
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/internal/seekableiterator.inc?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/spl/internal/seekableiterator.inc
diff -u php-src/ext/spl/internal/seekableiterator.inc:1.7 
php-src/ext/spl/internal/seekableiterator.inc:1.8
--- php-src/ext/spl/internal/seekableiterator.inc:1.7   Tue Feb 21 23:21:53 2006
+++ php-src/ext/spl/internal/seekableiterator.inc   Tue Apr 17 06:31:19 2007
@@ -18,7 +18,7 @@
  * to seek on an iterator LimitIterator can use this to efficiently rewind
  * to offset.
  */
-interface SeekableIterator implements Iterator
+interface SeekableIterator extends Iterator
 {
/** Seek to an absolute position
 *

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



[PHP-CVS] cvs: php-src /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Pierre-Alain Joye
pajoye  Tue Apr 17 15:11:56 2007 UTC

  Modified files:  
/php-src/ext/gd config.w32 gd.c php_gd.h 
  Log:
  - add imagegrabwindow and imagegrabscreen (win32 only)
capture a window using its handle or a full screen
optional bbox and to/from clipboard  will follow shortly
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.w32?r1=1.23r2=1.24diff_format=u
Index: php-src/ext/gd/config.w32
diff -u php-src/ext/gd/config.w32:1.23 php-src/ext/gd/config.w32:1.24
--- php-src/ext/gd/config.w32:1.23  Wed Apr 11 11:45:19 2007
+++ php-src/ext/gd/config.w32   Tue Apr 17 15:11:56 2007
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.23 2007/04/11 11:45:19 pajoye Exp $
+// $Id: config.w32,v 1.24 2007/04/17 15:11:56 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(gd, Bundled GD support, yes,shared);
@@ -24,6 +24,9 @@
CHECK_LIB(zlib.lib, gd, PHP_GD);
}
 
+   CHECK_LIB(User32.lib, gd, PHP_GD);
+   CHECK_LIB(Gdi32.lib, gd, PHP_GD);
+
EXTENSION(gd, gd.c, null, -Iext/gd/libgd, php_gd2.dll);
ADD_SOURCES(ext/gd/libgd, gd2copypal.c gd_arc_f_buggy.c gd.c 
\
gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c 
gdfontt.c \
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.369r2=1.370diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.369 php-src/ext/gd/gd.c:1.370
--- php-src/ext/gd/gd.c:1.369   Thu Apr  5 09:32:58 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:11:56 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.369 2007/04/05 09:32:58 tony2001 Exp $ */
+/* $Id: gd.c,v 1.370 2007/04/17 15:11:56 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -53,6 +53,9 @@
 #ifdef PHP_WIN32
 # include io.h
 # include fcntl.h
+# include windows.h
+# include Winuser.h
+# include Wingdi.h
 #endif
 
 #if HAVE_LIBGD
@@ -277,6 +280,17 @@
ZEND_ARG_INFO(0, src_h)
 ZEND_END_ARG_INFO()
 
+#ifdef PHP_WIN32
+static
+ZEND_BEGIN_ARG_INFO(arginfo_imagegrabwindow, 0)
+   ZEND_ARG_INFO(0, handle)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_imagegrabscreen, 0)
+ZEND_END_ARG_INFO()
+#endif
+
 #ifdef HAVE_GD_BUNDLED
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagerotate, 0, 0, 3)
@@ -961,6 +975,11 @@
PHP_FE(imagecolorexactalpha,
arginfo_imagecolorexactalpha)
PHP_FE(imagecopyresampled,  
arginfo_imagecopyresampled)
 
+#ifdef PHP_WIN32
+   PHP_FE(imagegrabwindow, 
arginfo_imagegrabwindow)
+   PHP_FE(imagegrabscreen, 
arginfo_imagegrabscreen)
+#endif
+
 #ifdef HAVE_GD_BUNDLED
PHP_FE(imagerotate, 
arginfo_imagerotate)
PHP_FE(imageantialias,  
arginfo_imageantialias)
@@ -1854,6 +1873,155 @@
 }
 /* }}} */
 
+#ifdef PHP_WIN32
+/* {{{ proto resource imagegrabwindow(int window_handle [, int client_area])
+   Grab a window or its client area using a windows handle (HWND property in 
COM instance) */
+PHP_FUNCTION(imagegrabwindow)
+{
+   HWND window;
+   long client_area = 0;
+   RECT rc = {0};
+   RECT rc_win = {0};
+   int Width, Height;
+   HDC hdc;
+   HDC memDC;
+   HBITMAP memBM;
+   HBITMAP hOld;
+   HINSTANCE handle;
+   long lwindow_handle;
+   typedef BOOL (WINAPI *tPrintWindow)(HWND, HDC,UINT);
+   tPrintWindow pPrintWindow = 0;
+   gdImagePtr im;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|l, 
lwindow_handle, client_area) == FAILURE) {
+   RETURN_FALSE;
+   }
+
+   window = (HWND) lwindow_handle;
+
+   if (!IsWindow(window)) {
+   php_error_docref(NULL TSRMLS_CC, E_NOTICE, Invalid window 
handle);
+   RETURN_FALSE;
+   }
+
+   hdc = GetDC(0);
+
+   if (client_area) {
+   GetClientRect(window, rc);
+   Width = rc.right;
+   Height = rc.bottom;
+   } else {
+   GetWindowRect(window, rc);
+   Width   = rc.right - rc.left;
+   Height  = rc.bottom - rc.top;
+   }
+
+   Width   = (Width/4)*4;
+
+   memDC   = CreateCompatibleDC(hdc);
+   memBM   = CreateCompatibleBitmap(hdc, Width, Height);
+   hOld= (HBITMAP) SelectObject (memDC, memBM);
+
+
+   handle = LoadLibrary(User32.dll);
+   if ( handle == 0 ) {
+   goto clean;
+   }
+   pPrintWindow = (tPrintWindow) GetProcAddress(handle, PrintWindow);  
+
+   if ( pPrintWindow )  {
+   pPrintWindow(window, memDC, (UINT) client_area);
+   } else {
+   

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

2007-04-17 Thread Pierre-Alain Joye
pajoye  Tue Apr 17 15:24:05 2007 UTC

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  - fix arginfo
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.370r2=1.371diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.370 php-src/ext/gd/gd.c:1.371
--- php-src/ext/gd/gd.c:1.370   Tue Apr 17 15:11:56 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:24:05 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.370 2007/04/17 15:11:56 pajoye Exp $ */
+/* $Id: gd.c,v 1.371 2007/04/17 15:24:05 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -282,8 +282,9 @@
 
 #ifdef PHP_WIN32
 static
-ZEND_BEGIN_ARG_INFO(arginfo_imagegrabwindow, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_imagegrabwindow, 0, 0, 1)
ZEND_ARG_INFO(0, handle)
+   ZEND_ARG_INFO(0, client_area)
 ZEND_END_ARG_INFO()
 
 static

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

2007-04-17 Thread Pierre-Alain Joye
pajoye  Tue Apr 17 15:39:19 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  - INFO_EX not INFO
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.21r2=1.312.2.20.2.22diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.21 php-src/ext/gd/gd.c:1.312.2.20.2.22
--- php-src/ext/gd/gd.c:1.312.2.20.2.21 Tue Apr 17 15:31:45 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:39:19 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.21 2007/04/17 15:31:45 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.22 2007/04/17 15:39:19 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -319,7 +319,7 @@
 
 #ifdef PHP_WIN32
 static
-ZEND_BEGIN_ARG_INFO(arginfo_imagegrabwindow, 0, 0, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegrabwindow, 0, 0, 1)
ZEND_ARG_INFO(0, handle)
ZEND_ARG_INFO(0, client_area)
 ZEND_END_ARG_INFO()

-- 
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-04-17 Thread Pierre-Alain Joye
pajoye  Tue Apr 17 15:33:57 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - imagegrab* entry
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.652r2=1.2027.2.547.2.653diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.652 php-src/NEWS:1.2027.2.547.2.653
--- php-src/NEWS:1.2027.2.547.2.652 Tue Apr 17 06:33:50 2007
+++ php-src/NEWSTue Apr 17 15:33:57 2007
@@ -30,6 +30,8 @@
 10 Apr 2007, PHP 5.2.2RC1
 - Improved bundled GD
   . Sync to 2.0.35
+  . Added imagegrabwindow and imagegrabscreen, capture a screen or a 
+   window using its handle (Pierre)
   . colors allocated henceforth from the resulting image overwrite the palette 
  colors (Rob Leslie)
   . Improved thread safety of the gif support (Roman Nemecek, Nuno, Pierre)

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

2007-04-17 Thread Hannes Magnusson
bjori   Tue Apr 17 15:44:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  Fix proto
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.22r2=1.312.2.20.2.23diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.22 php-src/ext/gd/gd.c:1.312.2.20.2.23
--- php-src/ext/gd/gd.c:1.312.2.20.2.22 Tue Apr 17 15:39:19 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:44:23 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.22 2007/04/17 15:39:19 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.23 2007/04/17 15:44:23 bjori Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2180,7 +2180,7 @@
 }
 /* }}} */
 
-/* {{{ proto resource imagegrabscreen(int window_handle [, int client_area])
+/* {{{ proto resource imagegrabscreen()
Grab a screenshot */
 PHP_FUNCTION(imagegrabscreen)
 {

-- 
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 config.w32 gd.c php_gd.h

2007-04-17 Thread Pierre-Alain Joye
pajoye  Tue Apr 17 15:31:45 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd config.w32 gd.c php_gd.h 
  Log:
  - MFH: add imagegrabwindow and imagegrabscreen (win32 only) [DOC]
capture a window using its handle or a full screen
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.w32?r1=1.10.4.3r2=1.10.4.4diff_format=u
Index: php-src/ext/gd/config.w32
diff -u php-src/ext/gd/config.w32:1.10.4.3 php-src/ext/gd/config.w32:1.10.4.4
--- php-src/ext/gd/config.w32:1.10.4.3  Wed Apr 11 11:44:20 2007
+++ php-src/ext/gd/config.w32   Tue Apr 17 15:31:45 2007
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.10.4.3 2007/04/11 11:44:20 pajoye Exp $
+// $Id: config.w32,v 1.10.4.4 2007/04/17 15:31:45 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(gd, Bundled GD support, yes,shared);
@@ -24,6 +24,9 @@
CHECK_LIB(zlib.lib, gd, PHP_GD);
}
 
+   CHECK_LIB(User32.lib, gd, PHP_GD);
+   CHECK_LIB(Gdi32.lib, gd, PHP_GD);
+
EXTENSION(gd, gd.c gdttf.c, null, -Iext/gd/libgd, 
php_gd2.dll);
ADD_SOURCES(ext/gd/libgd, gd2copypal.c gd_arc_f_buggy.c gd.c 
\
gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c 
gdfontt.c \
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.20r2=1.312.2.20.2.21diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.20 php-src/ext/gd/gd.c:1.312.2.20.2.21
--- php-src/ext/gd/gd.c:1.312.2.20.2.20 Fri Apr  6 15:38:35 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:31:45 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.20 2007/04/06 15:38:35 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.21 2007/04/17 15:31:45 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -52,6 +52,9 @@
 #ifdef PHP_WIN32
 # include io.h
 # include fcntl.h
+#include windows.h
+#include Winuser.h
+#include Wingdi.h
 #endif
 
 #if HAVE_LIBGD
@@ -314,6 +317,18 @@
 ZEND_END_ARG_INFO()
 #endif
 
+#ifdef PHP_WIN32
+static
+ZEND_BEGIN_ARG_INFO(arginfo_imagegrabwindow, 0, 0, 1)
+   ZEND_ARG_INFO(0, handle)
+   ZEND_ARG_INFO(0, client_area)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_imagegrabscreen, 0)
+ZEND_END_ARG_INFO()
+#endif
+
 #ifdef HAVE_GD_BUNDLED
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imagerotate, 0, 0, 3)
@@ -1020,6 +1035,11 @@
PHP_FE(imagecopyresampled,  
arginfo_imagecopyresampled)
 #endif
 
+#ifdef PHP_WIN32
+   PHP_FE(imagegrabwindow, 
arginfo_imagegrabwindow)
+   PHP_FE(imagegrabscreen, 
arginfo_imagegrabscreen)
+#endif
+
 #ifdef HAVE_GD_BUNDLED
PHP_FE(imagerotate, 
arginfo_imagerotate)
PHP_FE(imageantialias,  
arginfo_imageantialias)
@@ -2069,6 +2089,155 @@
 /* }}} */
 #endif
 
+#ifdef PHP_WIN32
+/* {{{ proto resource imagegrabwindow(int window_handle [, int client_area])
+   Grab a window or its client area using a windows handle (HWND property in 
COM instance) */
+PHP_FUNCTION(imagegrabwindow)
+{
+   HWND window;
+   long client_area = 0;
+   RECT rc = {0};
+   RECT rc_win = {0};
+   int Width, Height;
+   HDC hdc;
+   HDC memDC;
+   HBITMAP memBM;
+   HBITMAP hOld;
+   HINSTANCE handle;
+   long lwindow_handle;
+   typedef BOOL (WINAPI *tPrintWindow)(HWND, HDC,UINT);
+   tPrintWindow pPrintWindow = 0;
+   gdImagePtr im;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|l, 
lwindow_handle, client_area) == FAILURE) {
+   RETURN_FALSE;
+   }
+
+   window = (HWND) lwindow_handle;
+
+   if (!IsWindow(window)) {
+   php_error_docref(NULL TSRMLS_CC, E_NOTICE, Invalid window 
handle);
+   RETURN_FALSE;
+   }
+
+   hdc = GetDC(0);
+
+   if (client_area) {
+   GetClientRect(window, rc);
+   Width = rc.right;
+   Height = rc.bottom;
+   } else {
+   GetWindowRect(window, rc);
+   Width   = rc.right - rc.left;
+   Height  = rc.bottom - rc.top;
+   }
+
+   Width   = (Width/4)*4;
+
+   memDC   = CreateCompatibleDC(hdc);
+   memBM   = CreateCompatibleBitmap(hdc, Width, Height);
+   hOld= (HBITMAP) SelectObject (memDC, memBM);
+
+
+   handle = LoadLibrary(User32.dll);
+   if ( handle == 0 ) {
+   goto clean;
+   }
+   pPrintWindow = (tPrintWindow) GetProcAddress(handle, PrintWindow);  
+
+   if ( pPrintWindow )  {
+   pPrintWindow(window, memDC, (UINT) client_area);
+   } else {
+   

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

2007-04-17 Thread Pierre-Alain Joye
pajoye  Tue Apr 17 15:37:26 2007 UTC

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  - +ZEND_BEGIN_ARG_INFO_EX not _INFO (thx bjori)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.371r2=1.372diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.371 php-src/ext/gd/gd.c:1.372
--- php-src/ext/gd/gd.c:1.371   Tue Apr 17 15:24:05 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:37:26 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.371 2007/04/17 15:24:05 pajoye Exp $ */
+/* $Id: gd.c,v 1.372 2007/04/17 15:37:26 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -282,7 +282,7 @@
 
 #ifdef PHP_WIN32
 static
-ZEND_BEGIN_ARG_INFO(arginfo_imagegrabwindow, 0, 0, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegrabwindow, 0, 0, 1)
ZEND_ARG_INFO(0, handle)
ZEND_ARG_INFO(0, client_area)
 ZEND_END_ARG_INFO()

-- 
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_pgsql pgsql_statement.c

2007-04-17 Thread Ilia Alshanetsky
iliaa   Tue Apr 17 15:29:13 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_pgsql  pgsql_statement.c 
  Log:
  
  Separate parm zval.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_statement.c?r1=1.31.2.12.2.6r2=1.31.2.12.2.7diff_format=u
Index: php-src/ext/pdo_pgsql/pgsql_statement.c
diff -u php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.12.2.6 
php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.12.2.7
--- php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.12.2.6   Mon Jan  1 
09:36:05 2007
+++ php-src/ext/pdo_pgsql/pgsql_statement.c Tue Apr 17 15:29:13 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pgsql_statement.c,v 1.31.2.12.2.6 2007/01/01 09:36:05 sebastian Exp $ 
*/
+/* $Id: pgsql_statement.c,v 1.31.2.12.2.7 2007/04/17 15:29:13 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -306,6 +306,7 @@

S-param_lengths[param-paramno] = 1;

S-param_formats[param-paramno] = 0;
} else {
+   
SEPARATE_ZVAL_IF_NOT_REF(param-parameter);

convert_to_string(param-parameter);
S-param_values[param-paramno] 
= Z_STRVAL_P(param-parameter);

S-param_lengths[param-paramno] = Z_STRLEN_P(param-parameter);

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



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

2007-04-17 Thread Hannes Magnusson
bjori   Tue Apr 17 15:44:25 2007 UTC

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  Fix proto
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.372r2=1.373diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.372 php-src/ext/gd/gd.c:1.373
--- php-src/ext/gd/gd.c:1.372   Tue Apr 17 15:37:26 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:44:25 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.372 2007/04/17 15:37:26 pajoye Exp $ */
+/* $Id: gd.c,v 1.373 2007/04/17 15:44:25 bjori Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1965,7 +1965,7 @@
 }
 /* }}} */
 
-/* {{{ proto resource imagegrabscreen(int window_handle [, int client_area])
+/* {{{ proto resource imagegrabscreen()
Grab a screenshot */
 PHP_FUNCTION(imagegrabscreen)
 {

-- 
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-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 17:00:17 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdopdo_stmt.c 
  Log:
  fix leaks in row_get_properties()
  thanks to Kellen Bombardier for noticing
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.15r2=1.118.2.38.2.16diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.15 
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.15  Wed Mar  7 09:03:07 2007
+++ php-src/ext/pdo/pdo_stmt.c  Tue Apr 17 17:00:16 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.15 2007/03/07 09:03:07 tony2001 Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.16 2007/04/17 17:00:16 tony2001 Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -2525,28 +2525,18 @@
 
 static HashTable *row_get_properties(zval *object TSRMLS_DC)
 {
-   zval *tmp;
pdo_stmt_t * stmt = (pdo_stmt_t *) zend_object_store_get_object(object 
TSRMLS_CC);
int i;
-   HashTable *ht;
-
-   MAKE_STD_ZVAL(tmp);
-   array_init(tmp);
 
for (i = 0; i  stmt-column_count; i++) {
zval *val;
MAKE_STD_ZVAL(val);
fetch_value(stmt, val, i, NULL TSRMLS_CC);
 
-   add_assoc_zval(tmp, stmt-columns[i].name, val);
+   zend_hash_update(stmt-properties, stmt-columns[i].name, 
stmt-columns[i].namelen + 1, (void *)val, sizeof(zval *), NULL);
}
 
-   ht = Z_ARRVAL_P(tmp);
-
-   ZVAL_NULL(tmp);
-   FREE_ZVAL(tmp);
-
-   return ht;
+   return stmt-properties;
 }
 
 static union _zend_function *row_method_get(

-- 
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) /main php_variables.c

2007-04-17 Thread Ilia Alshanetsky
iliaa   Tue Apr 17 15:06:50 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   php_variables.c 
  Log:
  Fixed bug #41093 (magic_quotes_gpc ignores first arrays keys).
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_variables.c?r1=1.104.2.10.2.7r2=1.104.2.10.2.8diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.104.2.10.2.7 
php-src/main/php_variables.c:1.104.2.10.2.8
--- php-src/main/php_variables.c:1.104.2.10.2.7 Wed Mar 28 09:14:08 2007
+++ php-src/main/php_variables.cTue Apr 17 15:06:50 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_variables.c,v 1.104.2.10.2.7 2007/03/28 09:14:08 tony2001 Exp $ */
+/* $Id: php_variables.c,v 1.104.2.10.2.8 2007/04/17 15:06:50 iliaa Exp $ */
 
 #include stdio.h
 #include php.h
@@ -158,8 +158,7 @@
array_init(gpc_element);
zend_hash_next_index_insert(symtable1, 
gpc_element, sizeof(zval *), (void **) gpc_element_p);
} else {
-   if (PG(magic_quotes_gpc)  (index != var)) {
-   /* no need to addslashes() the index if 
it's the main variable name */
+   if (PG(magic_quotes_gpc)) {
escaped_index = php_addslashes(index, 
index_len, index_len, 0 TSRMLS_CC);
} else {
escaped_index = index;

-- 
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Antony Dovgal

On 04/17/2007 09:29 PM, Marcus Boerger wrote:

Hello Pierre-Alain,

  since when are we adding major new features to release branches?


Pierre, please leave this function for HEAD only, we don't add new features to 
5.2.
Thanks. 


--
Wbr, 
Antony Dovgal


--
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Antony Dovgal

On 04/17/2007 09:53 PM, Pierre Joye wrote:

On 4/17/07, Antony Dovgal [EMAIL PROTECTED] wrote:

On 04/17/2007 09:29 PM, Marcus Boerger wrote:
 Hello Pierre-Alain,

   since when are we adding major new features to release branches?

Pierre, please leave this function for HEAD only, we don't add new features to 
5.2.


Well, do you really see a problem in these two self contained
functions? They don't affect anything else in ext/gd or php and are on
windows only.


Don't get me wrong, it's not about you or the functions.
We have some rules and I believe everybody should abide by them.

--
Wbr, 
Antony Dovgal


--
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Edin Kadribasic


On 17/04/2007, at 20.01, Antony Dovgal wrote:


On 04/17/2007 09:53 PM, Pierre Joye wrote:

On 4/17/07, Antony Dovgal [EMAIL PROTECTED] wrote:

On 04/17/2007 09:29 PM, Marcus Boerger wrote:
 Hello Pierre-Alain,

   since when are we adding major new features to release branches?

Pierre, please leave this function for HEAD only, we don't add  
new features to 5.2.

Well, do you really see a problem in these two self contained
functions? They don't affect anything else in ext/gd or php and  
are on

windows only.


Don't get me wrong, it's not about you or the functions.
We have some rules and I believe everybody should abide by them.


Hi Antony, Marcus,

This is simply not true. 5.2.x is not simply bug fix release. Minor  
and major functionality is added all the time. If you're too lazy to  
read the CVS I can list them for you.


So please don't comment on commits based on who is making them.

Edin

--
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Marcus Boerger
Hello Edin,

  either way it is ridiculous to add new features in the middle of a releace
process. We are not only in a release branch here. We are even in a middle
of a release. In one that is even security focused.

best regards
marcus

Tuesday, April 17, 2007, 8:27:50 PM, you wrote:

 On 17/04/2007, at 20.01, Antony Dovgal wrote:

 On 04/17/2007 09:53 PM, Pierre Joye wrote:
 On 4/17/07, Antony Dovgal [EMAIL PROTECTED] wrote:
 On 04/17/2007 09:29 PM, Marcus Boerger wrote:
  Hello Pierre-Alain,
 
since when are we adding major new features to release branches?

 Pierre, please leave this function for HEAD only, we don't add  
 new features to 5.2.
 Well, do you really see a problem in these two self contained
 functions? They don't affect anything else in ext/gd or php and  
 are on
 windows only.

 Don't get me wrong, it's not about you or the functions.
 We have some rules and I believe everybody should abide by them.

 Hi Antony, Marcus,

 This is simply not true. 5.2.x is not simply bug fix release. Minor  
 and major functionality is added all the time. If you're too lazy to  
 read the CVS I can list them for you.

 So please don't comment on commits based on who is making them.

 Edin




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 /sapi/cgi cgi_main.c

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 18:51:24 2007 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  fix leak appearing when more than one -f option specified
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.318r2=1.319diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.318 php-src/sapi/cgi/cgi_main.c:1.319
--- php-src/sapi/cgi/cgi_main.c:1.318   Sun Apr 15 23:02:05 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Apr 17 18:51:24 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.318 2007/04/15 23:02:05 sniper Exp $ */
+/* $Id: cgi_main.c,v 1.319 2007/04/17 18:51:24 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -1409,6 +1409,9 @@
break;
 
case 'f': /* parse file */
+   if (script_file) {
+   
efree(script_file);
+   }
script_file = 
estrdup(php_optarg);
no_headers = 1;
/* arguments after the 
file are considered script args */

-- 
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) /sapi/cgi cgi_main.c

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 18:51:34 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cgi   cgi_main.c 
  Log:
  MFH: fix leak appearing when more than one -f option specified
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.34r2=1.267.2.15.2.35diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.34 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.35
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.34 Sun Apr 15 23:06:08 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Apr 17 18:51:34 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.34 2007/04/15 23:06:08 sniper Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.35 2007/04/17 18:51:34 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -1478,6 +1478,9 @@
break;
 
case 'f': /* parse file */
+   if (script_file) {
+   efree(script_file);
+   }
script_file = 
estrdup(php_optarg);
no_headers = 1;
/* arguments after the file are 
considered script args */

-- 
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) /ext/standard proc_open.c /main SAPI.c main.c php_ini.c /main/streams plain_wrapper.c /win32 select.c /win32/build config.w32 TSRM TSRM.h tsrm_win32.c ZendEng

2007-04-17 Thread Derick Rethans
On Mon, 16 Apr 2007, Dmitry Stogov wrote:

 dmitryMon Apr 16 08:09:57 2007 UTC
 
   Modified files:  (Branch: PHP_5_2)
 /TSRM TSRM.h tsrm_win32.c 
 /ZendEngine2  zend_API.c zend_API.h zend_alloc.c 
   zend_builtin_functions.c zend_compile.c zend_execute.c 
   zend_execute.h zend_execute_API.c zend_ini.c 
   zend_opcode.c zend_types.h zend_vm_def.h 
   zend_vm_execute.h 
 /php-src/ext/standard proc_open.c 
 /php-src/main SAPI.c main.c php_ini.c 
 /php-src/main/streams plain_wrapper.c 
 /php-src/win32select.c 
 /php-src/win32/build  config.w32 
   Log:
   WIN64 support

This patch looks sort of dangerous, are you sure you want to add this to 
PHP 5.2.2 after the first RC has already been released? IMO this would 
fit much better in an upcoming PHP 5.3.

Derick
-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Derick Rethans
On Tue, 17 Apr 2007, Antony Dovgal wrote:

 On 04/17/2007 09:29 PM, Marcus Boerger wrote:
  Hello Pierre-Alain,
  
since when are we adding major new features to release branches?
 
 Pierre, please leave this function for HEAD only, we don't add new features to
 5.2.

That's not true - we added many functions. I see no problems with those 
two new functions, but I think it'd be smarter to introduce them in 
5.2.3 as we just released an RC. I don't think we should *then* add more 
functions as with this we need to keep releasing new RCs.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Marcus Boerger
Hello Derick,

Tuesday, April 17, 2007, 8:58:40 PM, you wrote:

 On Tue, 17 Apr 2007, Antony Dovgal wrote:

 On 04/17/2007 09:29 PM, Marcus Boerger wrote:
  Hello Pierre-Alain,
  
since when are we adding major new features to release branches?
 
 Pierre, please leave this function for HEAD only, we don't add new features 
 to
 5.2.

 That's not true - we added many functions. I see no problems with those 
 two new functions, but I think it'd be smarter to introduce them in 
 5.2.3 as we just released an RC. I don't think we should *then* add more 
 functions as with this we need to keep releasing new RCs.

Fine with me. Though personally I hope we create 5.3 from 5.2.2 and avoid
this kind of discussion.

best regards
marcus

-- 
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Edin Kadribasic

Hello Marcus,

Did I miss your mail to Dmitry about making *major* engine changes to  
add Win64 support? I must also have lost your mail to Jani for adding  
new features to FastCGI too? I think I need to double check my spam  
filter.


Or was your response more in regard of *who* committed it than *what*  
was committed (major engine change versus two self-contained windows  
only functions)?


Edin



On 17/04/2007, at 20.51, Marcus Boerger wrote:


Hello Edin,

  either way it is ridiculous to add new features in the middle of  
a releace
process. We are not only in a release branch here. We are even in a  
middle

of a release. In one that is even security focused.

best regards
marcus

Tuesday, April 17, 2007, 8:27:50 PM, you wrote:


On 17/04/2007, at 20.01, Antony Dovgal wrote:



On 04/17/2007 09:53 PM, Pierre Joye wrote:

On 4/17/07, Antony Dovgal [EMAIL PROTECTED] wrote:

On 04/17/2007 09:29 PM, Marcus Boerger wrote:

Hello Pierre-Alain,

  since when are we adding major new features to release  
branches?


Pierre, please leave this function for HEAD only, we don't add
new features to 5.2.

Well, do you really see a problem in these two self contained
functions? They don't affect anything else in ext/gd or php and
are on
windows only.


Don't get me wrong, it's not about you or the functions.
We have some rules and I believe everybody should abide by them.



Hi Antony, Marcus,



This is simply not true. 5.2.x is not simply bug fix release. Minor
and major functionality is added all the time. If you're too lazy to
read the CVS I can list them for you.



So please don't comment on commits based on who is making them.



Edin





Best regards,
 Marcus



--
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) /ext/standard proc_open.c /main SAPI.c main.c php_ini.c /main/streams plain_wrapper.c /win32 select.c /win32/build config.w32 TSRM TSRM.h tsrm_win32.c ZendEngi

2007-04-17 Thread Marcus Boerger
Hello Dmitry,

  same here. Itis kind of a big change. Are we in any desperate need to
do this right now? Basically we have no experience with Win64/PHP at all.
So we shouldn't go for it in the middle of a release process.

best regards
marcus

Tuesday, April 17, 2007, 8:52:01 PM, you wrote:

 On Mon, 16 Apr 2007, Dmitry Stogov wrote:

 dmitryMon Apr 16 08:09:57 2007 UTC
 
   Modified files:  (Branch: PHP_5_2)
 /TSRM TSRM.h tsrm_win32.c 
 /ZendEngine2  zend_API.c zend_API.h zend_alloc.c 
   zend_builtin_functions.c zend_compile.c zend_execute.c 
   zend_execute.h zend_execute_API.c zend_ini.c 
   zend_opcode.c zend_types.h zend_vm_def.h 
   zend_vm_execute.h 
 /php-src/ext/standard proc_open.c 
 /php-src/main SAPI.c main.c php_ini.c 
 /php-src/main/streams plain_wrapper.c 
 /php-src/win32select.c 
 /php-src/win32/build  config.w32 
   Log:
   WIN64 support

 This patch looks sort of dangerous, are you sure you want to add this to 
 PHP 5.2.2 after the first RC has already been released? IMO this would 
 fit much better in an upcoming PHP 5.3.

 Derick
 -- 
 Derick Rethans
 http://derickrethans.nl | http://ez.no | http://xdebug.org




Best regards,
 Marcus

-- 
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Edin Kadribasic

On 17/04/2007, at 21.08, Marcus Boerger wrote:


Hello Derick,

Tuesday, April 17, 2007, 8:58:40 PM, you wrote:


On Tue, 17 Apr 2007, Antony Dovgal wrote:



On 04/17/2007 09:29 PM, Marcus Boerger wrote:

Hello Pierre-Alain,

  since when are we adding major new features to release branches?


Pierre, please leave this function for HEAD only, we don't add  
new features to

5.2.


That's not true - we added many functions. I see no problems with  
those

two new functions, but I think it'd be smarter to introduce them in
5.2.3 as we just released an RC. I don't think we should *then*  
add more

functions as with this we need to keep releasing new RCs.


Fine with me. Though personally I hope we create 5.3 from 5.2.2 and  
avoid

this kind of discussion.


Another option is to re-release RC1. Give people early chance to test  
win64 release?


Or make 5.2.2 as mostly security release and leave these new features  
for 5.2.3. I don't think we need 5.3.x as long as we can maintain  
binary compatibility.


Edin

--
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Marcus Boerger
Hello Edin,

  it appears i should read cvs commits more carefully. I thought that win64
change was a pretty easy one not affecting anything else. Reviewing it again
i get a different opinion. And sorry but I can't care less about FCGI and
whether someone moves stuff from CLI to FCGI. Or did jani do more than we
were discussing?

best regards
marcus

And for the record. The stuff Pierre added is cool and yes I am even a
windows user

Tuesday, April 17, 2007, 9:09:34 PM, you wrote:

 Hello Marcus,

 Did I miss your mail to Dmitry about making *major* engine changes to  
 add Win64 support? I must also have lost your mail to Jani for adding  
 new features to FastCGI too? I think I need to double check my spam  
 filter.

 Or was your response more in regard of *who* committed it than *what*  
 was committed (major engine change versus two self-contained windows  
 only functions)?

 Edin



 On 17/04/2007, at 20.51, Marcus Boerger wrote:

 Hello Edin,

   either way it is ridiculous to add new features in the middle of  
 a releace
 process. We are not only in a release branch here. We are even in a  
 middle
 of a release. In one that is even security focused.

 best regards
 marcus

 Tuesday, April 17, 2007, 8:27:50 PM, you wrote:

 On 17/04/2007, at 20.01, Antony Dovgal wrote:

 On 04/17/2007 09:53 PM, Pierre Joye wrote:
 On 4/17/07, Antony Dovgal [EMAIL PROTECTED] wrote:
 On 04/17/2007 09:29 PM, Marcus Boerger wrote:
 Hello Pierre-Alain,

   since when are we adding major new features to release  
 branches?

 Pierre, please leave this function for HEAD only, we don't add
 new features to 5.2.
 Well, do you really see a problem in these two self contained
 functions? They don't affect anything else in ext/gd or php and
 are on
 windows only.

 Don't get me wrong, it's not about you or the functions.
 We have some rules and I believe everybody should abide by them.

 Hi Antony, Marcus,

 This is simply not true. 5.2.x is not simply bug fix release. Minor
 and major functionality is added all the time. If you're too lazy to
 read the CVS I can list them for you.

 So please don't comment on commits based on who is making them.

 Edin




 Best regards,
  Marcus





Best regards,
 Marcus

-- 
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) /ext/gd config.w32 gd.c php_gd.h

2007-04-17 Thread Edin Kadribasic

On 17/04/2007, at 21.24, Marcus Boerger wrote:


Hello Edin,

  it appears i should read cvs commits more carefully. I thought  
that win64
change was a pretty easy one not affecting anything else. Reviewing  
it again
i get a different opinion. And sorry but I can't care less about  
FCGI and
whether someone moves stuff from CLI to FCGI. Or did jani do more  
than we

were discussing?


And yet two self-contained functions inside #ifdef PHP_WIN32 in gd  
module warrant your scrutiny? But never mind. My only goal with my  
post was to promote even-handed application of the principle no new  
features after RC1.


Edin

--
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) /sapi/cli php_cli.c

2007-04-17 Thread Jani Taskinen
sniper  Tue Apr 17 19:46:14 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cli   php_cli.c 
  Log:
  - Fix a possible leak when multiple -c parameters are used
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.16r2=1.129.2.13.2.17diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.16 
php-src/sapi/cli/php_cli.c:1.129.2.13.2.17
--- php-src/sapi/cli/php_cli.c:1.129.2.13.2.16  Thu Feb 22 10:06:22 2007
+++ php-src/sapi/cli/php_cli.c  Tue Apr 17 19:46:13 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.129.2.13.2.16 2007/02/22 10:06:22 tony2001 Exp $ */
+/* $Id: php_cli.c,v 1.129.2.13.2.17 2007/04/17 19:46:13 sniper Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -652,7 +652,10 @@
while ((c = php_getopt(argc, argv, OPTIONS, php_optarg, php_optind, 
0))!=-1) {
switch (c) {
case 'c':
-   cli_sapi_module.php_ini_path_override = 
strdup(php_optarg);
+   if (cli_sapi_module.php_ini_path_override) {
+   
free(cli_sapi_module.php_ini_path_override);
+   }
+   cli_sapi_module.php_ini_path_override = 
strdup(php_optarg);
break;
case 'n':
cli_sapi_module.php_ini_ignore = 1;

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



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

2007-04-17 Thread Jani Taskinen
sniper  Tue Apr 17 19:48:16 2007 UTC

  Modified files:  
/php-src/sapi/cli   php_cli.c 
  Log:
  MFB
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.170r2=1.171diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.170 php-src/sapi/cli/php_cli.c:1.171
--- php-src/sapi/cli/php_cli.c:1.170Thu Feb 22 10:06:02 2007
+++ php-src/sapi/cli/php_cli.c  Tue Apr 17 19:48:16 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.170 2007/02/22 10:06:02 tony2001 Exp $ */
+/* $Id: php_cli.c,v 1.171 2007/04/17 19:48:16 sniper Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -663,7 +663,10 @@
while ((c = php_getopt(argc, argv, OPTIONS, php_optarg, php_optind, 
0))!=-1) {
switch (c) {
case 'c':
-   cli_sapi_module.php_ini_path_override = 
strdup(php_optarg);
+   if (cli_sapi_module.php_ini_path_override) {
+   
free(cli_sapi_module.php_ini_path_override);
+   }
+   cli_sapi_module.php_ini_path_override = 
strdup(php_optarg);
break;
case 'n':
cli_sapi_module.php_ini_ignore = 1;

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



[PHP-CVS] cvs: php-src / run-tests.php /sapi/cgi/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt include.inc skipif.inc

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 19:48:22 2007 UTC

  Added files: 
/php-src/sapi/cgi/tests 001.phpt 002.phpt 003.phpt 004.phpt 
005.phpt 006.phpt 007.phpt 008.phpt 
include.inc skipif.inc 

  Modified files:  
/php-srcrun-tests.php 
  Log:
  add tests for CGI
  
  http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.317r2=1.318diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.317 php-src/run-tests.php:1.318
--- php-src/run-tests.php:1.317 Thu Apr 12 13:17:14 2007
+++ php-src/run-tests.php   Tue Apr 17 19:48:22 2007
@@ -23,7 +23,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.317 2007/04/12 13:17:14 tony2001 Exp $ */
+/* $Id: run-tests.php,v 1.318 2007/04/17 19:48:22 tony2001 Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -405,7 +405,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.317 $'.\n;
+   echo '$Revision: 1.318 $'.\n;
exit(1);
default:
echo Illegal switch specified!\n;
@@ -542,7 +542,7 @@
 $ignored_by_ext = 0;
 sort($exts_to_test);
 $test_dirs = array();
-$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli');
+$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli', 
'sapi/cgi');
 foreach($optionals as $dir) {
if (@filetype($dir) == 'dir') {
$test_dirs[] = $dir;

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/001.phpt?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/001.phpt
+++ php-src/sapi/cgi/tests/001.phpt
--TEST--
version string
--SKIPIF--
?php include skipif.inc; ?
--FILE--
?php

include include.inc;

$php = get_cgi_path();
reset_env_vars();

var_dump(`$php -n -v`);

echo Done\n;
?
--EXPECTF--
string(%d) PHP %s (cgi%s (built: %s
Copyright (c) 1997-20%s The PHP Group
Zend Engine v%s, Copyright (c) 1998-20%s Zend Technologies

Done

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/002.phpt?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/002.phpt
+++ php-src/sapi/cgi/tests/002.phpt
--TEST--
defining INI options with -d
--SKIPIF--
?php 
include skipif.inc; 
?
--FILE--
?php
include include.inc;

$php = get_cgi_path();
reset_env_vars();

$file = dirname(__FILE__)./002.test.php;

file_put_contents($file, '?php var_dump(ini_get(max_execution_time)); ?');

var_dump(`$php -n -d max_execution_time=111 $file`);
var_dump(`$php -n -d max_execution_time=500 $file`);
var_dump(`$php -n -d max_execution_time=500 -d max_execution_time=555 $file`);

file_put_contents($file, '?php var_dump(ini_get(max_execution_time)); 
var_dump(ini_get(upload_tmp_dir)); ?');

var_dump(`$php -n -d upload_tmp_dir=/test/path -d max_execution_time=555 
$file`);

unlink($file);

echo Done\n;
?
--EXPECTF-- 
string(%d) X-Powered-By: PHP/%s
Content-type: text/html

string(3) 111

string(%d) X-Powered-By: PHP/%s
Content-type: text/html

string(3) 500

string(%d) X-Powered-By: PHP/%s
Content-type: text/html

string(3) 555

string(%d) X-Powered-By: PHP/%s
Content-type: text/html

string(3) 555
string(10) /test/path

Done

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/003.phpt?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/003.phpt
+++ php-src/sapi/cgi/tests/003.phpt
--TEST--
strip comments and whitespace with -w
--SKIPIF--
?php 
include skipif.inc; 
?
--FILE--
?php

include include.inc;

$php = get_cgi_path();
reset_env_vars();

$filename = dirname(__FILE__).'/003.test.php';
$code ='
?php
/* some test script */

class test { /* {{{ */
public $var = test; //test var
#perl style comment 
private $pri; /* private attr */

function foo(/* void */) {
}
}
/* }}} */

?
';

file_put_contents($filename, $code);

var_dump(`$php -n -w $filename`);
var_dump(`$php -n -w wrong`);
var_dump(`echo ?php /* comment */ class test {\n // comment \n function foo() 
{} } ? | $php -n -w`);

@unlink($filename);

echo Done\n;
?
--EXPECTF-- 
string(%d) X-Powered-By: PHP/%s
Content-type: text/html


?php
 class test { public $var = test; private $pri; function foo() { } } ?

string(%d) Status: 404
X-Powered-By: PHP/%s
Content-type: text/html

No input file specified.

string(%d) X-Powered-By: PHP/%s
Content-type: text/html

?php  class test { function foo() {} } ?

Done

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/004.phpt?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/004.phpt
+++ php-src/sapi/cgi/tests/004.phpt
--TEST--
execute a file with -f
--SKIPIF--
?php 

[PHP-CVS] cvs: php-src(PHP_5_2) / run-tests.php /sapi/cgi/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt include.inc skipif.inc

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 19:49:26 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/sapi/cgi/tests 001.phpt 002.phpt 003.phpt 004.phpt 
005.phpt 006.phpt 007.phpt 008.phpt 
include.inc skipif.inc 

  Modified files:  
/php-srcrun-tests.php 
  Log:
  add tests for CGI
  
  http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.24r2=1.226.2.37.2.25diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.24 
php-src/run-tests.php:1.226.2.37.2.25
--- php-src/run-tests.php:1.226.2.37.2.24   Tue Mar 27 20:28:06 2007
+++ php-src/run-tests.php   Tue Apr 17 19:49:26 2007
@@ -23,7 +23,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.24 2007/03/27 20:28:06 helly Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.25 2007/04/17 19:49:26 tony2001 Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -398,7 +398,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.24 
$'.\n;
+   echo '$Revision: 1.226.2.37.2.25 
$'.\n;
exit(1);
default:
echo Illegal switch '$switch' 
specified!\n;
@@ -534,7 +534,7 @@
 $ignored_by_ext = 0;
 sort($exts_to_test);
 $test_dirs = array();
-$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli');
+$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli', 
'sapi/cgi');
 foreach($optionals as $dir) {
if (@filetype($dir) == 'dir') {
$test_dirs[] = $dir;

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/001.phpt?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/001.phpt
+++ php-src/sapi/cgi/tests/001.phpt
--TEST--
version string
--SKIPIF--
?php include skipif.inc; ?
--FILE--
?php

include include.inc;

$php = get_cgi_path();
reset_env_vars();

var_dump(`$php -n -v`);

echo Done\n;
?
--EXPECTF--
string(%d) PHP %s (cgi%s (built: %s
Copyright (c) 1997-20%s The PHP Group
Zend Engine v%s, Copyright (c) 1998-20%s Zend Technologies

Done

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/002.phpt?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/002.phpt
+++ php-src/sapi/cgi/tests/002.phpt
--TEST--
defining INI options with -d
--SKIPIF--
?php 
include skipif.inc; 
?
--FILE--
?php
include include.inc;

$php = get_cgi_path();
reset_env_vars();

$file = dirname(__FILE__)./002.test.php;

file_put_contents($file, '?php var_dump(ini_get(max_execution_time)); ?');

var_dump(`$php -n -d max_execution_time=111 $file`);
var_dump(`$php -n -d max_execution_time=500 $file`);
var_dump(`$php -n -d max_execution_time=500 -d max_execution_time=555 $file`);

file_put_contents($file, '?php var_dump(ini_get(max_execution_time)); 
var_dump(ini_get(upload_tmp_dir)); ?');

var_dump(`$php -n -d upload_tmp_dir=/test/path -d max_execution_time=555 
$file`);

unlink($file);

echo Done\n;
?
--EXPECTF-- 
string(%d) X-Powered-By: PHP/%s
Content-type: text/html

string(3) 111

string(%d) X-Powered-By: PHP/%s
Content-type: text/html

string(3) 500

string(%d) X-Powered-By: PHP/%s
Content-type: text/html

string(3) 555

string(%d) X-Powered-By: PHP/%s
Content-type: text/html

string(3) 555
string(10) /test/path

Done

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/003.phpt?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/003.phpt
+++ php-src/sapi/cgi/tests/003.phpt
--TEST--
strip comments and whitespace with -w
--SKIPIF--
?php 
include skipif.inc; 
?
--FILE--
?php

include include.inc;

$php = get_cgi_path();
reset_env_vars();

$filename = dirname(__FILE__).'/003.test.php';
$code ='
?php
/* some test script */

class test { /* {{{ */
public $var = test; //test var
#perl style comment 
private $pri; /* private attr */

function foo(/* void */) {
}
}
/* }}} */

?
';

file_put_contents($filename, $code);

var_dump(`$php -n -w $filename`);
var_dump(`$php -n -w wrong`);
var_dump(`echo ?php /* comment */ class test {\n // comment \n function foo() 
{} } ? | $php -n -w`);

@unlink($filename);

echo Done\n;
?
--EXPECTF-- 
string(%d) X-Powered-By: PHP/%s
Content-type: text/html


?php
 class test { public $var = test; private $pri; function foo() { } } ?

string(%d) Status: 404
X-Powered-By: PHP/%s
Content-type: text/html

No input file specified.

string(%d) X-Powered-By: PHP/%s
Content-type: text/html

?php  class test { function foo() {} } ?

Done

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/004.phpt?view=markuprev=1.1

[PHP-CVS] cvs: php-src /sapi/cgi/tests .cvsignore

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 19:59:58 2007 UTC

  Added files: 
/php-src/sapi/cgi/tests .cvsignore 
  Log:
  add .cvsignore
  
  

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/.cvsignore?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/.cvsignore
+++ php-src/sapi/cgi/tests/.cvsignore
phpt.*
*.mem
*.diff
*.log
*.exp
*.out
*.php
*.gcda
*.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) /sapi/cgi/tests .cvsignore

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 20:00:04 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/sapi/cgi/tests .cvsignore 
  Log:
  add .cvsignore
  
  

http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/.cvsignore?view=markuprev=1.1
Index: php-src/sapi/cgi/tests/.cvsignore
+++ php-src/sapi/cgi/tests/.cvsignore
phpt.*
*.mem
*.diff
*.log
*.exp
*.out
*.php
*.gcda
*.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) /sapi/cgi cgi_main.c

2007-04-17 Thread Jani Taskinen
sniper  Tue Apr 17 20:00:53 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cgi   cgi_main.c 
  Log:
  - Fix a possible leak when multiple -c parameters are used
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.35r2=1.267.2.15.2.36diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.35 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.36
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.35 Tue Apr 17 18:51:34 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Apr 17 20:00:53 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.35 2007/04/17 18:51:34 tony2001 Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.36 2007/04/17 20:00:53 sniper Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -1151,6 +1151,7 @@
 #endif
 
sapi_startup(cgi_sapi_module);
+   cgi_sapi_module.php_ini_path_override = NULL;
 
 #ifdef PHP_WIN32
_fmode = _O_BINARY; /* sets default for file streams to binary */
@@ -1178,6 +1179,9 @@
while ((c = php_getopt(argc, argv, OPTIONS, php_optarg, php_optind, 
0)) != -1) {
switch (c) {
case 'c':
+   if (cgi_sapi_module.php_ini_path_override) {
+   
free(cgi_sapi_module.php_ini_path_override);
+   }
cgi_sapi_module.php_ini_path_override = 
strdup(php_optarg);
break;
case 'n':

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



[PHP-CVS] cvs: php-src /sapi/cgi/tests 006.phpt

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 20:17:20 2007 UTC

  Modified files:  
/php-src/sapi/cgi/tests 006.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/006.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cgi/tests/006.phpt
diff -u php-src/sapi/cgi/tests/006.phpt:1.1 php-src/sapi/cgi/tests/006.phpt:1.2
--- php-src/sapi/cgi/tests/006.phpt:1.1 Tue Apr 17 19:48:22 2007
+++ php-src/sapi/cgi/tests/006.phpt Tue Apr 17 20:17:20 2007
@@ -54,7 +54,7 @@
 string(%d) No input file specified.
 
 string(%d) br /
-bParse error/b:  syntax error, unexpected T_PRIVATE, expecting '{' in 
b%s006.test.php/b on line b5/bbr /
+bParse error/b: %s expecting %s{%s in b%s006.test.php/b on line 
b5/bbr /
 Errors parsing %s006.test.php
 
 Done

-- 
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) /sapi/cgi/tests 006.phpt

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 20:17:25 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cgi/tests 006.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/006.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cgi/tests/006.phpt
diff -u php-src/sapi/cgi/tests/006.phpt:1.1.2.2 
php-src/sapi/cgi/tests/006.phpt:1.1.2.3
--- php-src/sapi/cgi/tests/006.phpt:1.1.2.2 Tue Apr 17 19:49:26 2007
+++ php-src/sapi/cgi/tests/006.phpt Tue Apr 17 20:17:25 2007
@@ -54,7 +54,7 @@
 string(%d) No input file specified.
 
 string(%d) br /
-bParse error/b:  syntax error, unexpected T_PRIVATE, expecting '{' in 
b%s006.test.php/b on line b5/bbr /
+bParse error/b: %s expecting %s{%s in b%s006.test.php/b on line 
b5/bbr /
 Errors parsing %s006.test.php
 
 Done

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



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

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 20:33:45 2007 UTC

  Added files: 
/php-src/ext/standard/tests/general_functions   putenv.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  fix putenv(var) (i.e. unset) on BSD systems
  add test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.854r2=1.855diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.854 
php-src/ext/standard/basic_functions.c:1.855
--- php-src/ext/standard/basic_functions.c:1.854Tue Apr 10 09:36:10 2007
+++ php-src/ext/standard/basic_functions.c  Tue Apr 17 20:33:45 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.854 2007/04/10 09:36:10 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.855 2007/04/17 20:33:45 tony2001 Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4443,8 +4443,15 @@
 * We try to avoid this by setting our own value first */
SetEnvironmentVariable(pe.key, bugbug);
 #endif
-   
-   if (putenv(pe.putenv_string) == 0) {/* success */
+
+#if HAVE_UNSETENV
+   if (!p) { /* no '=' means we want to unset it */
+   unsetenv(pe.putenv_string);
+   }
+   if (!p || putenv(pe.putenv_string) == 0) {  /* success */
+#else
+   if (putenv(pe.putenv_string) == 0) {/* success */
+#endif
zend_hash_add(BG(putenv_ht), pe.key, pe.key_len+1, 
(void **) pe, sizeof(putenv_entry), NULL);
 #ifdef HAVE_TZSET
if (!strncmp(pe.key, TZ, pe.key_len)) {

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/putenv.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/general_functions/putenv.phpt
+++ php-src/ext/standard/tests/general_functions/putenv.phpt
--TEST--
putenv() basic tests
--FILE--
?php

$var_name=SUCHVARSHOULDNOTEXIST;

var_dump(getenv($var_name));
var_dump(putenv($var_name.=value));
var_dump(getenv($var_name));

var_dump(putenv($var_name.=));
var_dump(getenv($var_name));

var_dump(putenv($var_name));
var_dump(getenv($var_name));

echo Done\n;
?
--EXPECTF-- 
bool(false)
bool(true)
string(5) value
bool(true)
string(0) 
bool(true)
bool(false)
Done
--UEXPECTF--
bool(false)
bool(true)
unicode(5) value
bool(true)
unicode(0) 
bool(true)
bool(false)
Done

-- 
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 basic_functions.c /ext/standard/tests/general_functions putenv.phpt

2007-04-17 Thread Antony Dovgal
tony2001Tue Apr 17 20:34:14 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/general_functions   putenv.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: fix putenv(var) (i.e. unset) on BSD systems
  add test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.48r2=1.725.2.31.2.49diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.48 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.49
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.48  Tue Apr 10 
09:37:09 2007
+++ php-src/ext/standard/basic_functions.c  Tue Apr 17 20:34:14 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.48 2007/04/10 09:37:09 tony2001 Exp $ 
*/
+/* $Id: basic_functions.c,v 1.725.2.31.2.49 2007/04/17 20:34:14 tony2001 Exp $ 
*/
 
 #include php.h
 #include php_streams.h
@@ -4461,8 +4461,15 @@
 * We try to avoid this by setting our own value first */
SetEnvironmentVariable(pe.key, bugbug);
 #endif
-   
+
+#if HAVE_UNSETENV
+   if (!p) { /* no '=' means we want to unset it */
+   unsetenv(pe.putenv_string);
+   }
+   if (!p || putenv(pe.putenv_string) == 0) {  /* success */
+#else
if (putenv(pe.putenv_string) == 0) {/* success */
+#endif
zend_hash_add(BG(putenv_ht), pe.key, pe.key_len+1, 
(void **) pe, sizeof(putenv_entry), NULL);
 #ifdef HAVE_TZSET
if (!strncmp(pe.key, TZ, pe.key_len)) {

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/putenv.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/general_functions/putenv.phpt
+++ php-src/ext/standard/tests/general_functions/putenv.phpt
--TEST--
putenv() basic tests
--FILE--
?php

$var_name=SUCHVARSHOULDNOTEXIST;

var_dump(getenv($var_name));
var_dump(putenv($var_name.=value));
var_dump(getenv($var_name));

var_dump(putenv($var_name.=));
var_dump(getenv($var_name));

var_dump(putenv($var_name));
var_dump(getenv($var_name));

echo Done\n;
?
--EXPECTF-- 
bool(false)
bool(true)
string(5) value
bool(true)
string(0) 
bool(true)
bool(false)
Done
--UEXPECTF--
bool(false)
bool(true)
unicode(5) value
bool(true)
unicode(0) 
bool(true)
bool(false)
Done

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