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

2006-09-11 Thread changelog
changelog   Tue Sep 12 01:31:08 2006 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2450r2=1.2451diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2450 php-src/ChangeLog:1.2451
--- php-src/ChangeLog:1.2450Mon Sep 11 01:31:03 2006
+++ php-src/ChangeLog   Tue Sep 12 01:31:07 2006
@@ -1,3 +1,130 @@
+2006-09-11  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  README.UPDATE_5_2:
+  Typo fix from Steph
+  Added note about CLI and INI search path
+
+2006-09-11  Johannes Schlüter  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/reflection/php_reflection.c:
+  - MFH: Print the type of the original value
+
+* ext/reflection/php_reflection.c:
+  - Print the type of the original value
+
+2006-09-11  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  BFN
+
+2006-09-11  Sara Golemon  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  main/network.c
+  main/network.c:
+  MFH: Bug #38687 - sockaddr local storage insufficient for all sock 
families
+
+* main/network.c:
+  Bug #38687 - sockaddr local storage insufficient for all sock families
+
+2006-09-11  Dmitry Stogov  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_API.c:
+   fix
+
+2006-09-11  Johannes Schlüter  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/reflection/php_reflection.c:
+  - MFH: Fix #37923 (Display constant value in reflection::export)
+
+* ext/reflection/php_reflection.c:
+  - Fix #37923 (Display constant value in reflection::export)
+
+2006-09-11  Andrei Zmievski  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_API.c
+  ZendEngine2/zend_API.h:
+  Add a couple more UTF-8 functions.
+
+2006-09-11  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/standard/streamsfuncs.c:
+  MFB: Fixed bug #38096 (large timeout values ignored on 32bit machines in
+  stream_socket_accept() and stream_socket_client()).
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/streamsfuncs.c:
+  Fixed bug #38096 (large timeout values ignored on 32bit machines in
+  stream_socket_accept() and stream_socket_client()).
+
+2006-09-11  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  BFN
+
+* (PHP_5_2)
+  ZendEngine2/zend.c
+  ZendEngine2/zend_execute_API.c
+  ZendEngine2/zend_globals.h:
+  MFH: fix #38779 (engine crashes when require()'ing file with syntax error
+  through userspace stream wrapper)
+
+* ZendEngine2/zend.c
+  ZendEngine2/zend_execute_API.c
+  ZendEngine2/zend_globals.h:
+  fix #38779 (engine crashes when require()'ing file with syntax error
+  through userspace stream wrapper)
+
+* ZendEngine2/tests/bug38779.phpt
+  ZendEngine2/tests/bug38779.phpt
+  ZendEngine2/tests/bug38779_1.phpt
+  ZendEngine2/tests/bug38779_1.phpt:
+  fix tests
+
+* (PHP_5_2)
+  ZendEngine2/tests/bug38779.phpt
+  ZendEngine2/tests/bug38779_1.phpt:
+  add tests
+
+* ZendEngine2/tests/bug38779.phpt
+  ZendEngine2/tests/bug38779.phpt
+  ZendEngine2/tests/bug38779_1.phpt
+  ZendEngine2/tests/bug38779_1.phpt:
+  
+  add tests
+
+2006-09-11  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  README.UPDATE_5_2:
+  Upgrading updates from Steph
+
+2006-09-11  Antony Dovgal  [EMAIL PROTECTED]
+
+* ZendEngine2/tests/bug24884.phpt
+  ZendEngine2/tests/bug24884.phpt
+  ZendEngine2/tests/bug34199.phpt:
+  fix test
+
+2006-09-11  Dmitry Stogov  [EMAIL PROTECTED]
+
+* sapi/cgi/fastcgi.c
+  sapi/cgi/fastcgi.c:
+  Don't try to do safe connection close in case of FastCGI protocol error
+
+2006-09-11  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  Fixed a typo
+
 2006-09-10  Hannes Magnusson  [EMAIL PROTECTED]
 
 * (PHP_5_2)


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

2006-09-11 Thread changelog
changelog   Tue Sep 12 01:31:11 2006 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.979r2=1.980diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.979 ZendEngine2/ChangeLog:1.980
--- ZendEngine2/ChangeLog:1.979 Sat Sep  9 01:31:01 2006
+++ ZendEngine2/ChangeLog   Tue Sep 12 01:31:11 2006
@@ -1,3 +1,52 @@
+2006-09-11  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend_API.c:
+   fix
+
+2006-09-11  Andrei Zmievski  [EMAIL PROTECTED]
+
+* zend_API.c
+  zend_API.h:
+  Add a couple more UTF-8 functions.
+
+2006-09-11  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  zend.c
+  zend_execute_API.c
+  zend_globals.h:
+  MFH: fix #38779 (engine crashes when require()'ing file with syntax error
+  through userspace stream wrapper)
+
+* zend.c
+  zend_execute_API.c
+  zend_globals.h:
+  fix #38779 (engine crashes when require()'ing file with syntax error
+  through userspace stream wrapper)
+
+* tests/bug38779.phpt
+  tests/bug38779.phpt
+  tests/bug38779_1.phpt
+  tests/bug38779_1.phpt:
+  fix tests
+
+* (PHP_5_2)
+  tests/bug38779.phpt
+  tests/bug38779_1.phpt:
+  add tests
+
+* tests/bug38779.phpt
+  tests/bug38779.phpt
+  tests/bug38779_1.phpt
+  tests/bug38779_1.phpt:
+  
+  add tests
+
+* tests/bug24884.phpt
+  tests/bug24884.phpt
+  tests/bug34199.phpt:
+  fix test
+
 2006-09-08  Andrei Zmievski  [EMAIL PROTECTED]
 
 * zend_operators.h:
@@ -15097,7 +15146,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.979 2006/09/09 01:31:01 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.980 2006/09/12 01:31:11 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -16821,7 +16870,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.979 2006/09/09 01:31:01 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.980 2006/09/12 01:31:11 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


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

2006-09-11 Thread Dmitry Stogov
dmitry  Mon Sep 11 07:22:40 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cgi   fastcgi.c 
  Log:
  Don't try to do safe connection close in case of FastCGI protocol error
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.13.2.8r2=1.4.2.13.2.9diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.8 
php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.9
--- php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.8 Mon Sep  4 07:26:48 2006
+++ php-src/sapi/cgi/fastcgi.c  Mon Sep 11 07:22:40 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.4.2.13.2.8 2006/09/04 07:26:48 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.4.2.13.2.9 2006/09/11 07:22:40 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -611,10 +611,12 @@
RevertToSelf();
}
 #else
-   char buf[8];
+   if (!force) {
+   char buf[8];
 
-   shutdown(req-fd, 1);
-   while (recv(req-fd, buf, sizeof(buf), 0)  0) {}
+   shutdown(req-fd, 1);
+   while (recv(req-fd, buf, sizeof(buf), 0)  0) {}
+   }
close(req-fd);
 #endif
req-fd = -1;

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



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

2006-09-11 Thread Dmitry Stogov
dmitry  Mon Sep 11 07:23:40 2006 UTC

  Modified files:  
/php-src/sapi/cgi   fastcgi.c 
  Log:
  Don't try to do safe connection close in case of FastCGI protocol error
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.22r2=1.23diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.22 php-src/sapi/cgi/fastcgi.c:1.23
--- php-src/sapi/cgi/fastcgi.c:1.22 Mon Sep  4 07:27:50 2006
+++ php-src/sapi/cgi/fastcgi.c  Mon Sep 11 07:23:40 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.22 2006/09/04 07:27:50 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.23 2006/09/11 07:23:40 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -611,10 +611,12 @@
RevertToSelf();
}
 #else
-   char buf[8];
+   if (!force) {
+   char buf[8];
 
-   shutdown(req-fd, 1);
-   while (recv(req-fd, buf, sizeof(buf), 0)  0) {}
+   shutdown(req-fd, 1);
+   while (recv(req-fd, buf, sizeof(buf), 0)  0) {}
+   }
close(req-fd);
 #endif
req-fd = -1;

-- 
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) / README.UPDATE_5_2

2006-09-11 Thread Ilia Alshanetsky
iliaa   Mon Sep 11 14:10:18 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcREADME.UPDATE_5_2 
  Log:
  Upgrading updates from Steph
  
  http://cvs.php.net/viewvc.cgi/php-src/README.UPDATE_5_2?r1=1.1.2.13r2=1.1.2.14diff_format=u
Index: php-src/README.UPDATE_5_2
diff -u php-src/README.UPDATE_5_2:1.1.2.13 php-src/README.UPDATE_5_2:1.1.2.14
--- php-src/README.UPDATE_5_2:1.1.2.13  Sun Sep 10 22:59:28 2006
+++ php-src/README.UPDATE_5_2   Mon Sep 11 14:10:18 2006
@@ -1,60 +1,162 @@
-PHP 5.2 Update info or NEWS explained
+PHP 5.2 UPDATE INFO
 
-- Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR. (Marcus)
+===
+Changes in PHP datetime support
+===
 
-  This change means that the value of the E_ALL constant has changed to 6143
-  from its previous value of 2047. If you are setting your error reporting mode
-  inside the Apache config file or the .htaccess files you will need to adjust
-  the value of the error_reporting INI setting accordingly.
+Since PHP 5.1, there has been an extension named 'date' in the PHP core. This
+is the new implementation of PHP's datetime support. Although it will attempt
+to guess your system's timezone setting, you should set the timezone manually.
+You can do this in any of three ways:
+
+1) in your php.ini using the date.timezone INI directive
+2) on your system using the TZ environmental variable
+3) from your script using the convenience function date_default_timezone_set()
+
+All supported timezones are listed in the PHP Manual at
+http://www.php.net/manual/timezones.php.
+
+With the advent of PHP 5.2, there are object representations of the date and
+timezone, named DateTime and DateTimeZone respectively. You can see the methods
+and constants available to the new classes by running
+
+php --rc DateTime
+php --rc DateTimeZone
+
+under PHP CLI. All methods map to existing procedural date functions.
+
+==
+Items from the NEWS file explained
+==
 
 - Added new error mode E_RECOVERABLE_ERROR. (Derick, Marcus, Tony)
 
-  This changes a few E_ERROR conditions to something that you can now catch 
-  using a user error handler. If the user error handler does not grab these
-  kind of errors they behave as fatal errors just like in any PHP version prior
-  to 5.2. Errors of this type are logged as 'Catchable fatal error'.
+  Some of the existing E_ERROR conditions have been converted to something that
+  you can catch with a user-defined error handler. If an E_RECOVERABLE_ERROR is
+  not handled, it will behave in the same way as E_ERROR behaves in all 
versions
+  of PHP. Errors of this type are logged as 'Catchable fatal error'.
+
+
+- Changed E_ALL error reporting mode to includes E_RECOVERABLE_ERROR. (Marcus)
+
+  This change means that the value of the E_ALL error_reporting constant is now
+  6143, where its previous value was 2047. If you are setting the 
error_reporting
+  mode from either the Apache config file or the .htaccess files, you will need
+  to adjust the value accordingly. The same applies if you use the numeric 
value
+  rather than the constant in your PHP scripts.
+
 
 - Added support for constructors in interfaces to force constructor signature
   checks in implementations. (Marcus)
-  
-  Starting with PHP 5.2 interfaces can have constructors. If you use this 
-  feature then all implementing classes must implement constructors with a 
-  matching signature, while normally constructors do not need to follow any
-  base class or interface constructor signature. (Signature is the name for 
-  the parameter and return type definition which captures count, reference or 
-  not and any type hints).
+
+  Starting with PHP 5.2, interfaces can have constructors. However, if you 
choose
+  to declare a constructor in an interface, each class implementing that 
interface
+  MUST include a constructor with a signature matching that of the base 
interface
+  constructor. By 'signature' we mean the parameter and return type 
definitions,
+  including any type hints and including whether the data is passed by 
reference
+  or by value.
+
 
 - Changed __toString to be called wherever applicable. (Marcus)
 
-  The magic object method __toString() is now called whenever an object is used
-  as a string. The function must not throw an exception or the script will be
-  terminated with a catchable see above) fatal error. The PHP 5.0/5.1 fallback
-  to return a string containing the object identifier has been dropped. People 
-  were assuming that this object identifier was unique when in fact it wasn't. 
 
-  
-  Even with __toString objects cannot be used as keys to arrays. We might add
-  built-in hash support for this. But for 5.2 you would need to either provide
-  your own hashing and use an explicit string cast or use new function 
-  spl_object_hash()
+  The magic method __toString() will now be called in 

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

2006-09-11 Thread Antony Dovgal
tony2001Mon Sep 11 14:30:17 2006 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.242r2=1.2027.2.547.2.243diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.242 php-src/NEWS:1.2027.2.547.2.243
--- php-src/NEWS:1.2027.2.547.2.242 Mon Sep 11 01:36:20 2006
+++ php-src/NEWSMon Sep 11 14:30:17 2006
@@ -5,6 +5,8 @@
   (marci at balabit dot hu, Tony)
 - Removed current working directory from the php.ini search path for CLI and
   readded it for other SAPIs (restore to pre 5.1.x behavior). (Edin)
+- Fixed bug #38779 (engine crashes when require()'ing file with syntax error 
+  through userspace stream wrapper). (Tony, Dmitry)
 - Fixed bug #38759 (PDO sqlite2 empty query causes segfault). (Tony)
 - Fixed bug #38721 (Invalid memory read in date_parse()). (Tony, Derick)
 - Fixed bug #38700 (SoapClient::__getTypes never returns). (Dmitry)


-- 
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/standard streamsfuncs.c

2006-09-11 Thread Ilia Alshanetsky
iliaa   Mon Sep 11 14:52:21 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/standard   streamsfuncs.c 
  Log:
  Fixed bug #38096 (large timeout values ignored on 32bit machines in
  stream_socket_accept() and stream_socket_client()).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.243r2=1.2027.2.547.2.244diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.243 php-src/NEWS:1.2027.2.547.2.244
--- php-src/NEWS:1.2027.2.547.2.243 Mon Sep 11 14:30:17 2006
+++ php-src/NEWSMon Sep 11 14:52:20 2006
@@ -14,6 +14,8 @@
 - Fixed bug #38661 (mixed-case URL breaks url-wrappers). (Ilia)
 - Fixed bug #38464 (array_count_values() mishandles numeric strings). 
   (php_lists at realplain dot com, Ilia)
+- Fixed bug #38096 (large timeout values ignored on 32bit machines in
+  stream_socket_accept() and stream_socket_client()). (Ilia)
 
 31 Aug 2006, PHP 5.2.0RC3
 - Updated PCRE to version 6.7. (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.5r2=1.58.2.6.2.6diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.5 
php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.6
--- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.5Thu Aug 31 14:41:24 2006
+++ php-src/ext/standard/streamsfuncs.c Mon Sep 11 14:52:21 2006
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: streamsfuncs.c,v 1.58.2.6.2.5 2006/08/31 14:41:24 tony2001 Exp $ */
+/* $Id: streamsfuncs.c,v 1.58.2.6.2.6 2006/09/11 14:52:21 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -33,8 +33,10 @@
 
 #ifndef PHP_WIN32
 #define php_select(m, r, w, e, t)  select(m, r, w, e, t)
+typedef unsigned long long php_timeout_ull;
 #else
 #include win32/select.h
+typedef unsigned __int64 php_timeout_ull;
 #endif
 
 static php_stream_context *decode_context_param(zval *contextresource 
TSRMLS_DC);
@@ -81,7 +83,7 @@
int host_len;
zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL;
double timeout = FG(default_socket_timeout);
-   unsigned long conv;
+   php_timeout_ull conv;
struct timeval tv;
char *hashkey = NULL;
php_stream *stream = NULL;
@@ -103,7 +105,7 @@
}

/* prepare the timeout value for use */
-   conv = (unsigned long) (timeout * 100.0);
+   conv = (php_timeout_ull) (timeout * 100.0);
tv.tv_sec = conv / 100;
tv.tv_usec = conv % 100;
 
@@ -231,7 +233,7 @@
 {
double timeout = FG(default_socket_timeout);
zval *peername = NULL;
-   unsigned long conv;
+   php_timeout_ull conv;
struct timeval tv;
php_stream *stream = NULL, *clistream = NULL;
zval *zstream;
@@ -245,7 +247,7 @@
php_stream_from_zval(stream, zstream);

/* prepare the timeout value for use */
-   conv = (unsigned long) (timeout * 100.0);
+   conv = (php_timeout_ull) (timeout * 100.0);
tv.tv_sec = conv / 100;
tv.tv_usec = conv % 100;
 

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



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

2006-09-11 Thread Ilia Alshanetsky
iliaa   Mon Sep 11 14:53:34 2006 UTC

  Modified files:  
/php-src/ext/standard   streamsfuncs.c 
  Log:
  MFB: Fixed bug #38096 (large timeout values ignored on 32bit machines in
  stream_socket_accept() and stream_socket_client()).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.83r2=1.84diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.83 
php-src/ext/standard/streamsfuncs.c:1.84
--- php-src/ext/standard/streamsfuncs.c:1.83Thu Aug 31 14:41:15 2006
+++ php-src/ext/standard/streamsfuncs.c Mon Sep 11 14:53:33 2006
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: streamsfuncs.c,v 1.83 2006/08/31 14:41:15 tony2001 Exp $ */
+/* $Id: streamsfuncs.c,v 1.84 2006/09/11 14:53:33 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -33,8 +33,10 @@
 
 #ifndef PHP_WIN32
 #define php_select(m, r, w, e, t)  select(m, r, w, e, t)
+typedef unsigned long long php_timeout_ull;
 #else
 #include win32/select.h
+typedef unsigned __int64 php_timeout_ull;
 #endif
 
 static php_stream_context *decode_context_param(zval *contextresource 
TSRMLS_DC);
@@ -81,7 +83,7 @@
int host_len;
zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL;
double timeout = FG(default_socket_timeout);
-   unsigned long conv;
+   php_timeout_ull conv;
struct timeval tv;
char *hashkey = NULL;
php_stream *stream = NULL;
@@ -103,7 +105,7 @@
}

/* prepare the timeout value for use */
-   conv = (unsigned long) (timeout * 100.0);
+   conv = (php_timeout_ull) (timeout * 100.0);
tv.tv_sec = conv / 100;
tv.tv_usec = conv % 100;
 
@@ -231,7 +233,7 @@
 {
double timeout = FG(default_socket_timeout);
zval *peername = NULL;
-   unsigned long conv;
+   php_timeout_ull conv;
struct timeval tv;
php_stream *stream = NULL, *clistream = NULL;
zval *zstream;
@@ -245,7 +247,7 @@
php_stream_from_zval(stream, zstream);

/* prepare the timeout value for use */
-   conv = (unsigned long) (timeout * 100.0);
+   conv = (php_timeout_ull) (timeout * 100.0);
tv.tv_sec = conv / 100;
tv.tv_usec = conv % 100;
 

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



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

2006-09-11 Thread Johannes Schl
johannesMon Sep 11 17:06:59 2006 UTC

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  - Fix #37923 (Display constant value in reflection::export)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.252r2=1.253diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.252 
php-src/ext/reflection/php_reflection.c:1.253
--- php-src/ext/reflection/php_reflection.c:1.252   Sun Sep 10 13:35:32 2006
+++ php-src/ext/reflection/php_reflection.c Mon Sep 11 17:06:59 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.252 2006/09/10 13:35:32 bjori Exp $ */
+/* $Id: php_reflection.c,v 1.253 2006/09/11 17:06:59 johannes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -530,10 +530,23 @@
 /* {{{ _const_string */
 static void _const_string(string *str, char *name, zval *value, char *indent 
TSRMLS_DC)
 {
-   string_printf(str, %sConstant [ %s %v ] { }\n,
+   zval value_copy;
+   int use_copy;
+
+   zend_make_printable_zval(value, value_copy, use_copy);
+   if (use_copy) {
+   value = value_copy;
+   }
+
+   string_printf(str, %sConstant [ %s %v ] { %s }\n,
   indent,
   zend_zval_type_name(value),
-  name);
+  name,
+  Z_STRVAL_P(value));
+
+   if (use_copy) {
+   zval_dtor(value);
+   }
 }
 /* }}} */
 
@@ -4867,7 +4880,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);
 
-   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.252 
2006/09/10 13:35:32 bjori Exp $);
+   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.253 
2006/09/11 17:06:59 johannes Exp $);
 
php_info_print_table_end();
 } /* }}} */

-- 
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/reflection php_reflection.c

2006-09-11 Thread Johannes Schl
johannesMon Sep 11 17:08:43 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/reflection php_reflection.c 
  Log:
  - MFH: Fix #37923 (Display constant value in reflection::export)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.244r2=1.2027.2.547.2.245diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.244 php-src/NEWS:1.2027.2.547.2.245
--- php-src/NEWS:1.2027.2.547.2.244 Mon Sep 11 14:52:20 2006
+++ php-src/NEWSMon Sep 11 17:08:42 2006
@@ -16,6 +16,7 @@
   (php_lists at realplain dot com, Ilia)
 - Fixed bug #38096 (large timeout values ignored on 32bit machines in
   stream_socket_accept() and stream_socket_client()). (Ilia)
+- Fixed bug #37923 (Display constant value in reflection::export). (Johannes)
 
 31 Aug 2006, PHP 5.2.0RC3
 - Updated PCRE to version 6.7. (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.22r2=1.164.2.33.2.23diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.22 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.23
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.22 Sun Sep 10 
13:25:47 2006
+++ php-src/ext/reflection/php_reflection.c Mon Sep 11 17:08:42 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.22 2006/09/10 13:25:47 bjori Exp $ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.23 2006/09/11 17:08:42 johannes Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -537,10 +537,23 @@
 /* {{{ _const_string */
 static void _const_string(string *str, char *name, zval *value, char *indent 
TSRMLS_DC)
 {
-   string_printf(str, %sConstant [ %s %s ] { }\n,
+   zval value_copy;
+   int use_copy;
+
+   zend_make_printable_zval(value, value_copy, use_copy);
+   if (use_copy) {
+   value = value_copy;
+   }
+
+   string_printf(str, %sConstant [ %s %s ] { %s }\n,
   indent,
   zend_zval_type_name(value),
-  name);
+  name,
+  Z_STRVAL_P(value));
+
+   if (use_copy) {
+   zval_dtor(value);
+   }
 }
 /* }}} */
 
@@ -4799,7 +4812,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);
 
-   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 
1.164.2.33.2.22 2006/09/10 13:25:47 bjori Exp $);
+   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 
1.164.2.33.2.23 2006/09/11 17:08:42 johannes Exp $);
 
php_info_print_table_end();
 } /* }}} */

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

2006-09-11 Thread Sara Golemon
pollita Mon Sep 11 19:18:07 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   network.c 
  Log:
  MFH: Bug #38687 - sockaddr local storage insufficient for all sock families
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.1r2=1.118.2.2.2.2diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.1 
php-src/main/network.c:1.118.2.2.2.2
--- php-src/main/network.c:1.118.2.2.2.1Sat Jul  1 11:35:34 2006
+++ php-src/main/network.c  Mon Sep 11 19:18:07 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.1 2006/07/01 11:35:34 nlopess Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.2 2006/09/11 19:18:07 pollita Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -787,37 +787,46 @@
/* make a connection attempt */
 
if (bindto) {
-   struct sockaddr local_address;
+   struct sockaddr *local_address = NULL;
+   int local_address_len = 0;

if (sa-sa_family == AF_INET) {
-   struct sockaddr_in *in4 = (struct 
sockaddr_in*)local_address;
+   struct sockaddr_in *in4 = 
emalloc(sizeof(struct sockaddr_in));
+
+   local_address = (struct sockaddr*)in4;
+   local_address_len = sizeof(struct 
sockaddr_in);

in4-sin_family = sa-sa_family;
in4-sin_port = htons(bindport);
if (!inet_aton(bindto, in4-sin_addr)) 
{
-   goto bad_ip;
+   php_error_docref(NULL 
TSRMLS_CC, E_WARNING, Invalid IP Address: %s, bindto);
+   goto skip_bind;
}
memset((in4-sin_zero), 0, 
sizeof(in4-sin_zero));
}
 #if HAVE_IPV6  HAVE_INET_PTON
 else { /* IPV6 */
-   struct sockaddr_in6 *in6 = (struct 
sockaddr_in6*)local_address;
+   struct sockaddr_in6 *in6 = 
emalloc(sizeof(struct sockaddr_in6));
+
+   local_address = (struct sockaddr*)in6;
+   local_address_len = sizeof(struct 
sockaddr_in6);

in6-sin6_family = sa-sa_family;
in6-sin6_port = htons(bindport);
if (inet_pton(AF_INET6, bindto, 
in6-sin6_addr)  1) {
-   goto bad_ip;
+   php_error_docref(NULL 
TSRMLS_CC, E_WARNING, Invalid IP Address: %s, bindto);
+   goto skip_bind;
}
}
 #endif
-   if (bind(sock, local_address, sizeof(struct 
sockaddr))) {
+   if (!local_address || bind(sock, local_address, 
local_address_len)) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING, failed to bind to '%s:%d', system said: %s, bindto, bindport, 
strerror(errno));
}
-   goto bind_done;
-bad_ip:
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Invalid IP Address: %s, bindto);
+skip_bind:
+   if (local_address) {
+   efree(local_address);
+   }
}
-bind_done:
/* free error string recieved during previous iteration 
(if any) */
if (error_string  *error_string) {
efree(*error_string);

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



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

2006-09-11 Thread Sara Golemon
pollita Mon Sep 11 19:18:06 2006 UTC

  Modified files:  
/php-src/main   network.c 
  Log:
  Bug #38687 - sockaddr local storage insufficient for all sock families
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.122r2=1.123diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.122 php-src/main/network.c:1.123
--- php-src/main/network.c:1.122Sat Jul  1 11:50:52 2006
+++ php-src/main/network.c  Mon Sep 11 19:18:06 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.122 2006/07/01 11:50:52 nlopess Exp $ */
+/* $Id: network.c,v 1.123 2006/09/11 19:18:06 pollita Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -787,37 +787,46 @@
/* make a connection attempt */
 
if (bindto) {
-   struct sockaddr local_address;
-   
+   struct sockaddr *local_address = NULL;
+   int local_address_len = 0;
+   
if (sa-sa_family == AF_INET) {
-   struct sockaddr_in *in4 = (struct 
sockaddr_in*)local_address;
-   
+   struct sockaddr_in *in4 = 
emalloc(sizeof(struct sockaddr_in));
+
+   local_address = (struct sockaddr*)in4;
+   local_address_len = sizeof(struct 
sockaddr_in);
+
in4-sin_family = sa-sa_family;
in4-sin_port = htons(bindport);
if (!inet_aton(bindto, in4-sin_addr)) 
{
-   goto bad_ip;
+   php_error_docref(NULL 
TSRMLS_CC, E_WARNING, Invalid IP Address: %s, bindto);
+   goto skip_bind;
}
memset((in4-sin_zero), 0, 
sizeof(in4-sin_zero));
}
 #if HAVE_IPV6  HAVE_INET_PTON
 else { /* IPV6 */
-   struct sockaddr_in6 *in6 = (struct 
sockaddr_in6*)local_address;
+   struct sockaddr_in6 *in6 = 
emalloc(sizeof(struct sockaddr_in6));
+
+   local_address = (struct sockaddr*)in6;
+   local_address_len = sizeof(struct 
sockaddr_in6);

in6-sin6_family = sa-sa_family;
in6-sin6_port = htons(bindport);
if (inet_pton(AF_INET6, bindto, 
in6-sin6_addr)  1) {
-   goto bad_ip;
+   php_error_docref(NULL 
TSRMLS_CC, E_WARNING, Invalid IP Address: %s, bindto);
+   goto skip_bind;
}
}
 #endif
-   if (bind(sock, local_address, sizeof(struct 
sockaddr))) {
+   if (!local_address || bind(sock, local_address, 
local_address_len)) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING, failed to bind to '%s:%d', system said: %s, bindto, bindport, 
strerror(errno));
}
-   goto bind_done;
-bad_ip:
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Invalid IP Address: %s, bindto);
+skip_bind:
+   if (local_address) {
+   efree(local_address);
+   }
}
-bind_done:
/* free error string recieved during previous iteration 
(if any) */
if (error_string  *error_string) {
efree(*error_string);

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



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

2006-09-11 Thread Sara Golemon
pollita Mon Sep 11 19:18:10 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/main   network.c 
  Log:
  MFH: Bug #38687 - sockaddr local storage insufficient for all sock families
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2r2=1.118.2.3diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2 php-src/main/network.c:1.118.2.3
--- php-src/main/network.c:1.118.2.2Sun Mar 19 22:33:10 2006
+++ php-src/main/network.c  Mon Sep 11 19:18:10 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2 2006/03/19 22:33:10 tony2001 Exp $ */
+/* $Id: network.c,v 1.118.2.3 2006/09/11 19:18:10 pollita Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -787,37 +787,46 @@
/* make a connection attempt */
 
if (bindto) {
-   struct sockaddr local_address;
+   struct sockaddr *local_address = NULL;
+   int local_address_len = 0;

if (sa-sa_family == AF_INET) {
-   struct sockaddr_in *in4 = (struct 
sockaddr_in*)local_address;
+   struct sockaddr_in *in4 = 
emalloc(sizeof(struct sockaddr_in));
+
+   local_address = (struct sockaddr*)in4;
+   local_address_len = sizeof(struct 
sockaddr_in);

in4-sin_family = sa-sa_family;
in4-sin_port = htons(bindport);
if (!inet_aton(bindto, in4-sin_addr)) 
{
-   goto bad_ip;
+   php_error_docref(NULL 
TSRMLS_CC, E_WARNING, Invalid IP Address: %s, bindto);
+   goto skip_bind;
}
memset((in4-sin_zero), 0, 
sizeof(in4-sin_zero));
}
 #if HAVE_IPV6  HAVE_INET_PTON
 else { /* IPV6 */
-   struct sockaddr_in6 *in6 = (struct 
sockaddr_in6*)local_address;
+   struct sockaddr_in6 *in6 = 
emalloc(sizeof(struct sockaddr_in6));
+
+   local_address = (struct sockaddr*)in6;
+   local_address_len = sizeof(struct 
sockaddr_in6);

in6-sin6_family = sa-sa_family;
in6-sin6_port = htons(bindport);
if (inet_pton(AF_INET6, bindto, 
in6-sin6_addr)  1) {
-   goto bad_ip;
+   php_error_docref(NULL 
TSRMLS_CC, E_WARNING, Invalid IP Address: %s, bindto);
+   goto skip_bind;
}
}
 #endif
-   if (bind(sock, local_address, sizeof(struct 
sockaddr))) {
+   if (!local_address || bind(sock, local_address, 
local_address_len)) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING, failed to bind to '%s:%d', system said: %s, bindto, bindport, 
strerror(errno));
}
-   goto bind_done;
-bad_ip:
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Invalid IP Address: %s, bindto);
+skip_bind:
+   if (local_address) {
+   efree(local_address);
+   }
}
-bind_done:
/* free error string recieved during previous iteration 
(if any) */
if (error_string  *error_string) {
efree(*error_string);

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

2006-09-11 Thread Ilia Alshanetsky
iliaa   Mon Sep 11 19:57:46 2006 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.245r2=1.2027.2.547.2.246diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.245 php-src/NEWS:1.2027.2.547.2.246
--- php-src/NEWS:1.2027.2.547.2.245 Mon Sep 11 17:08:42 2006
+++ php-src/NEWSMon Sep 11 19:57:45 2006
@@ -11,6 +11,8 @@
 - Fixed bug #38721 (Invalid memory read in date_parse()). (Tony, Derick)
 - Fixed bug #38700 (SoapClient::__getTypes never returns). (Dmitry)
 - Fixed bug #38693 (curl_multi_add_handle() set curl handle to null). (Ilia)
+- Fixed bug #38687 (sockaddr local storage insufficient for all sock
+  families). (Sara)
 - Fixed bug #38661 (mixed-case URL breaks url-wrappers). (Ilia)
 - Fixed bug #38464 (array_count_values() mishandles numeric strings). 
   (php_lists at realplain dot com, Ilia)

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



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

2006-09-11 Thread Johannes Schl
johannesMon Sep 11 21:21:28 2006 UTC

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  - Print the type of the original value
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.253r2=1.254diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.253 
php-src/ext/reflection/php_reflection.c:1.254
--- php-src/ext/reflection/php_reflection.c:1.253   Mon Sep 11 17:06:59 2006
+++ php-src/ext/reflection/php_reflection.c Mon Sep 11 21:21:27 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.253 2006/09/11 17:06:59 johannes Exp $ */
+/* $Id: php_reflection.c,v 1.254 2006/09/11 21:21:27 johannes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -530,9 +530,12 @@
 /* {{{ _const_string */
 static void _const_string(string *str, char *name, zval *value, char *indent 
TSRMLS_DC)
 {
+   char *type;
zval value_copy;
int use_copy;
 
+   type = zend_zval_type_name(value);
+
zend_make_printable_zval(value, value_copy, use_copy);
if (use_copy) {
value = value_copy;
@@ -540,7 +543,7 @@
 
string_printf(str, %sConstant [ %s %v ] { %s }\n,
   indent,
-  zend_zval_type_name(value),
+  type,
   name,
   Z_STRVAL_P(value));
 
@@ -4880,7 +4883,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);
 
-   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.253 
2006/09/11 17:06:59 johannes Exp $);
+   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.254 
2006/09/11 21:21:27 johannes Exp $);
 
php_info_print_table_end();
 } /* }}} */

-- 
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) / README.UPDATE_5_2

2006-09-11 Thread Ilia Alshanetsky
iliaa   Mon Sep 11 23:11:18 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcREADME.UPDATE_5_2 
  Log:
  Typo fix from Steph
  Added note about CLI and INI search path
  
  
http://cvs.php.net/viewvc.cgi/php-src/README.UPDATE_5_2?r1=1.1.2.14r2=1.1.2.15diff_format=u
Index: php-src/README.UPDATE_5_2
diff -u php-src/README.UPDATE_5_2:1.1.2.14 php-src/README.UPDATE_5_2:1.1.2.15
--- php-src/README.UPDATE_5_2:1.1.2.14  Mon Sep 11 14:10:18 2006
+++ php-src/README.UPDATE_5_2   Mon Sep 11 23:11:18 2006
@@ -37,7 +37,7 @@
   of PHP. Errors of this type are logged as 'Catchable fatal error'.
 
 
-- Changed E_ALL error reporting mode to includes E_RECOVERABLE_ERROR. (Marcus)
+- Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR. (Marcus)
 
   This change means that the value of the E_ALL error_reporting constant is now
   6143, where its previous value was 2047. If you are setting the 
error_reporting
@@ -160,3 +160,11 @@
   variable be accessed in write mode. To work around this, you should either
   cast the returned value from __get() to an array, or use SPL's ArrayObject
   instead of an array.
+
+- CLI SAPI no longer checks cwd for php.ini or the php-cli.ini file (Edin)
+
+  In PHP 5.1.X an undocumented feature was added that made the CLI binary
+  check the current directory for PHP configuration file possibly leading to
+  unpredictable behavior due to an un-expected configuration file being
+  read. This functionality was removed in 5.2 and PHP will no longer search
+  CWD for the presence of the php.ini or the php-cli.ini files.

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