[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2004-12-07 Thread Antony Dovgal
tony2001Tue Dec  7 03:21:39 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/sessionsession.c 
  Log:
  fix bug #30232 (session_start() sends Set-Cookie header only if the cookie is 
not set yet)
  # looks like somebody fixed it in HEAD and forgot to MFH it..
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.763&r2=1.1247.2.764&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.763 php-src/NEWS:1.1247.2.764
--- php-src/NEWS:1.1247.2.763   Mon Dec  6 19:34:32 2004
+++ php-src/NEWSTue Dec  7 03:21:37 2004
@@ -33,6 +33,8 @@
 - Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
   (Ilia)
 - Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia)
+- Fixed bug #30232 (session_start() sends Set-Cookie header only if the 
+  cookie isn't set). Tony
 - Fixed bug #30229 (imagerectangle and imagefilledrectangle do work well
   with alpha channel, corners are drawn twice) (Pierre)
 - Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.336.2.43&r2=1.336.2.44&ty=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.336.2.43 
php-src/ext/session/session.c:1.336.2.44
--- php-src/ext/session/session.c:1.336.2.43Thu Sep 30 10:18:25 2004
+++ php-src/ext/session/session.c   Tue Dec  7 03:21:38 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.336.2.43 2004/09/30 14:18:25 tony2001 Exp $ */
+/* $Id: session.c,v 1.336.2.44 2004/12/07 08:21:38 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -946,9 +946,8 @@
 {
int module_number = PS(module_number);

-   if (PS(use_cookies) && PS(send_cookie)) {
+   if (PS(use_cookies)) {
php_session_send_cookie(TSRMLS_C);
-   PS(send_cookie) = 0;
}
 
/* if the SID constant exists, destroy it. */

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



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

2004-12-07 Thread Derick Rethans
derick  Tue Dec  7 03:42:51 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  - Tidy up NEWS a bit.
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.764&r2=1.1247.2.765&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.764 php-src/NEWS:1.1247.2.765
--- php-src/NEWS:1.1247.2.764   Tue Dec  7 03:21:37 2004
+++ php-src/NEWSTue Dec  7 03:42:50 2004
@@ -14,7 +14,7 @@
   properly). (Ilia)
 - Fixed bug #30750 (Meaningful error message when upload directory is not 
   accessible). (Ilia)
-- Fixed bug #30739 (imagefill does not set back alphablending mode) (Pierre)
+- Fixed bug #30739 (imagefill does not set back alphablending mode). (Pierre)
 - Fixed bug #30672 (Problem handling exif data in jpeg images at unusual 
   places). (Marcus)
 - Fixed bug #30658 (Ensure that temporary files created by GD are removed).
@@ -27,16 +27,16 @@
 - Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia)
 - Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony)
 - Fixed bug #30388 (rename across filesystems loses ownership and
-  permission info) (Tony)
+  permission info). (Tony)
 - Fixed bug #30282 (segfault when using unknown/unsupported
   session.save_handler and/or session.serialize_handler). (Tony)
 - Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
   (Ilia)
 - Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia)
 - Fixed bug #30232 (session_start() sends Set-Cookie header only if the 
-  cookie isn't set). Tony
+  cookie isn't set). (Tony)
 - Fixed bug #30229 (imagerectangle and imagefilledrectangle do work well
-  with alpha channel, corners are drawn twice) (Pierre)
+  with alpha channel, corners are drawn twice). (Pierre)
 - Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
   (Ilia)
 - Fixed bug #30133 (get_current_user() crashes on Windows). (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_0) / NEWS

2004-12-07 Thread Derick Rethans
derick  Tue Dec  7 03:44:07 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcNEWS 
  Log:
  - Tidy up NEWS a bit
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.146&r2=1.1760.2.147&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.146 php-src/NEWS:1.1760.2.147
--- php-src/NEWS:1.1760.2.146   Tue Dec  7 02:45:46 2004
+++ php-src/NEWSTue Dec  7 03:44:07 2004
@@ -40,14 +40,14 @@
 - Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia)
 - Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony)
 - Fixed bug #30388 (rename across filesystems loses ownership and 
-  permission info) (Tony)
+  permission info). (Tony)
 - Fixed bug #30387 (stream_socket_client async connect was broken).
   (vnegrier at esds dot com, Wez).
 - Fixed bug #30381 (Strange results with get_class_vars()). (Marcus)
 - Fixed bug #30375 (cal_info() does not work without a parameter). (Ilia)
 - Fixed bug #30362 (stream_get_line() not handling end string correctly).
   (Ilia)
-- Fixed bug #30359 (SOAP client requests have no port in "Host" field ).
+- Fixed bug #30359 (SOAP client requests have no port in "Host" field).
   (Dmitry)
 - Fixed bug #30356 (str_ireplace() does not work on all strings). (Ilia)
 - Fixed bug #30344 (Reflection::getModifierNames() returns too long strings).

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



[PHP-CVS] cvs: php-src / NEWS

2004-12-07 Thread Derick Rethans
derick  Tue Dec  7 03:46:15 2004 EDT

  Modified files:  
/php-srcNEWS 
  Log:
  - Tidy up NEWS a bit
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1825&r2=1.1826&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1825 php-src/NEWS:1.1826
--- php-src/NEWS:1.1825 Sat Dec  4 02:16:44 2004
+++ php-src/NEWSTue Dec  7 03:46:14 2004
@@ -1,12 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 2004, PHP 5.1.0
-- Add apache_reset_timeout() Apache1 function. (Rasmus)
-- Make request start time be available via $_SERVER['REQUEST_TIME']. (Ilia)
+- Made request start time be available via $_SERVER['REQUEST_TIME']. (Ilia)
 - Allow gettimeofday() return a float if optional argument is specified. (Ilia)
-- Added sqlite_fetch_column_types() 3rd argument for arrays. (Ilia)
-- Added optional offset parameter to stream_get_contents() and 
-  file_get_contents(). (Ilia)
 - Improved performance of:
   . general execution/compilation. (Andi, Thies, Sterling, Dmitry, Marcus)
   . switch statement. (Dmitry)
@@ -18,6 +14,10 @@
   freeing of data. (Dmitry, Andi)
 - Implemented access to INI variables from within .ini file. (Andrei)
 - PHP will now respect extension dependencies when initializing. (Wez)
+- Added apache_reset_timeout() Apache1 function. (Rasmus)
+- Added sqlite_fetch_column_types() 3rd argument for arrays. (Ilia)
+- Added optional offset parameter to stream_get_contents() and 
+  file_get_contents(). (Ilia)
 - Added SAPI hook to get the current request time. (Rasmus)
 - Added new functions:
   . array_diff_key() (Andrey)
@@ -43,8 +43,8 @@
 - Added zlib stream filter support. (Sara)
 - Added bz2 stream filter support. (Sara)
 - Added HTTP/1.1 and chunked encoding support to http:// wrapper. (Sara)
-- Added support of parameter=>value arrays to 
xsl_xsltprocessor_set_parameter() 
-  (Tony)
+- Added support of parameter=>value arrays to
+  xsl_xsltprocessor_set_parameter(). (Tony)
 - Changed stream_filter_(ap|pre)pend() to return resource. (Sara)
 - Fixed a problem with SPL iterators aggregating the innner iterator. (Marcus)
 - Fixed bug with raw_post_data not getting set. (Brian)
@@ -54,8 +54,8 @@
 - Fixed bug #29522 (accessing properties without connection). (Georg)
 - Fixed bug #29335 (fetch functions now use MYSQLI_BOTH as default). (Georg)
 - Fixed bug #29311 (calling parent constructor in mysqli). (Georg)
-- Fixed bug #29256 (SOAP HTTP Error when envelop size is more than 24345 bytes)
-  (Dmitry, Wez)
+- Fixed bug #29256 (SOAP HTTP Error when envelop size is more than 24345
+  bytes).  (Dmitry, Wez)
 - Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry)
 - Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry)
 - Fixed bug #29061 (soap extension segfaults). (Dmitry)

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



Re: [PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2004-12-07 Thread Sascha Schumann
Please revert.  It is intentional that a cookie is only sent
when the client has not yet transferred the same session id
to us using a cookie.
- Sascha
On Tue, 7 Dec 2004, Antony Dovgal wrote:
tony2001Tue Dec  7 03:21:39 2004 EDT
 Modified files:  (Branch: PHP_4_3)
   /php-src NEWS
   /php-src/ext/session session.c
 Log:
 fix bug #30232 (session_start() sends Set-Cookie header only if the cookie is 
not set yet)
 # looks like somebody fixed it in HEAD and forgot to MFH it..
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.763&r2=1.1247.2.764&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.763 php-src/NEWS:1.1247.2.764
--- php-src/NEWS:1.1247.2.763   Mon Dec  6 19:34:32 2004
+++ php-src/NEWSTue Dec  7 03:21:37 2004
@@ -33,6 +33,8 @@
- Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
  (Ilia)
- Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia)
+- Fixed bug #30232 (session_start() sends Set-Cookie header only if the
+  cookie isn't set). Tony
- Fixed bug #30229 (imagerectangle and imagefilledrectangle do work well
  with alpha channel, corners are drawn twice) (Pierre)
- Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.336.2.43&r2=1.336.2.44&ty=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.336.2.43 
php-src/ext/session/session.c:1.336.2.44
--- php-src/ext/session/session.c:1.336.2.43Thu Sep 30 10:18:25 2004
+++ php-src/ext/session/session.c   Tue Dec  7 03:21:38 2004
@@ -17,7 +17,7 @@
   +--+
 */
-/* $Id: session.c,v 1.336.2.43 2004/09/30 14:18:25 tony2001 Exp $ */
+/* $Id: session.c,v 1.336.2.44 2004/12/07 08:21:38 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -946,9 +946,8 @@
{
int module_number = PS(module_number);
-   if (PS(use_cookies) && PS(send_cookie)) {
+   if (PS(use_cookies)) {
php_session_send_cookie(TSRMLS_C);
-   PS(send_cookie) = 0;
}
/* if the SID constant exists, destroy it. */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

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


Re: [PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2004-12-07 Thread Antony Dovgal
On Tue, 7 Dec 2004 13:22:15 +0100 (CET)
Sascha Schumann <[EMAIL PROTECTED]> wrote:

>  Please revert.  It is intentional that a cookie is only sent
>  when the client has not yet transferred the same session id
>  to us using a cookie.

5.0 & 5.1 behave wrong then, as they send cookie on every 
request and 4.3 sends it only when there was no cookie in browser's request.

Probably, 5.0 & 5.1 branches should be fixed then or .. ?

-- 
Wbr, 
Antony Dovgal aka tony2001
[EMAIL PROTECTED] || [EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2004-12-07 Thread Sascha Schumann
On Tue, 7 Dec 2004, Antony Dovgal wrote:
On Tue, 7 Dec 2004 13:22:15 +0100 (CET)
Sascha Schumann <[EMAIL PROTECTED]> wrote:
 Please revert.  It is intentional that a cookie is only sent
 when the client has not yet transferred the same session id
 to us using a cookie.
5.0 & 5.1 behave wrong then, as they send cookie on every
request [..]
Yes, that is not the intended behaviour.
Probably, 5.0 & 5.1 branches should be fixed then or .. ?
Indeed.  I don't have time to watch every commit to the code,
so this probably just slipped through.  I'd appreciate it, if
you could take care of 5.0 and 5.1 as well.
- Sascha
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2004-12-07 Thread Antony Dovgal
On Tue, 7 Dec 2004 13:56:36 +0100 (CET)
Sascha Schumann <[EMAIL PROTECTED]> wrote:

> On Tue, 7 Dec 2004, Antony Dovgal wrote:
> 
> > On Tue, 7 Dec 2004 13:22:15 +0100 (CET)
> > Sascha Schumann <[EMAIL PROTECTED]> wrote:
> >
> >>  Please revert.  It is intentional that a cookie is only sent
> >>  when the client has not yet transferred the same session id
> >>  to us using a cookie.
> >
> > 5.0 & 5.1 behave wrong then, as they send cookie on every
> > request [..]
> 
>  Yes, that is not the intended behaviour.
> 
> > Probably, 5.0 & 5.1 branches should be fixed then or .. ?
> 
>  Indeed.  I don't have time to watch every commit to the code,
>  so this probably just slipped through.  I'd appreciate it, if
>  you could take care of 5.0 and 5.1 as well.

No problem, I'll do it.

I just wanted to know why the intended behaviour looks so strange:
setting session.cookie_lifetime to non-zero value leads to session invalidation 
in that time, 
even if the session is active and the user is still working with it.

Do we *really* want it?
And why?

-- 
Wbr, 
Antony Dovgal aka tony2001
[EMAIL PROTECTED] || [EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2004-12-07 Thread Sascha Schumann
setting session.cookie_lifetime to non-zero value leads to
session invalidation in that time, even if the session is
active and the user is still working with it.
Your change affected the code path of standard session
cookies which don't have an explicit expiry date.  There is
no point in sending session cookies (=expiring when browser
is closed) on every request.
The proper way to handle explicit session expiry dates is the
following: Encode the timestamp of the expiry date as part of
the cookie.  Check for a certain criteria upon each request.
If that criteria is met, update the cookie on the client
side.  Common criterias:
- one hour/day/week to expiration
- half the lifetime of the cookie has passed
Using no criteria at all is not a suitable way to deal with
users from my POV.
- Sascha
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2004-12-07 Thread Antony Dovgal
On Tue, 7 Dec 2004 14:20:58 +0100 (CET)
Sascha Schumann <[EMAIL PROTECTED]> wrote:

> > setting session.cookie_lifetime to non-zero value leads to
> > session invalidation in that time, even if the session is
> > active and the user is still working with it.
> 
>  Your change affected the code path of standard session
>  cookies which don't have an explicit expiry date.  There is
>  no point in sending session cookies (=expiring when browser
>  is closed) on every request.
> 
>  The proper way to handle explicit session expiry dates is the
>  following: Encode the timestamp of the expiry date as part of
>  the cookie.  Check for a certain criteria upon each request.
>  If that criteria is met, update the cookie on the client
>  side.  Common criterias:
> 
>  - one hour/day/week to expiration
>  - half the lifetime of the cookie has passed
> 
>  Using no criteria at all is not a suitable way to deal with
>  users from my POV.

ok then.
I'll revert it now and will send you more suitable patch in the evening.

-- 
Wbr, 
Antony Dovgal aka tony2001
[EMAIL PROTECTED] || [EMAIL PROTECTED]

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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2004-12-07 Thread Antony Dovgal
tony2001Tue Dec  7 09:01:57 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/sessionsession.c 
  Log:
  revert it
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.765&r2=1.1247.2.766&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.765 php-src/NEWS:1.1247.2.766
--- php-src/NEWS:1.1247.2.765   Tue Dec  7 03:42:50 2004
+++ php-src/NEWSTue Dec  7 09:01:55 2004
@@ -33,8 +33,6 @@
 - Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
   (Ilia)
 - Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia)
-- Fixed bug #30232 (session_start() sends Set-Cookie header only if the 
-  cookie isn't set). (Tony)
 - Fixed bug #30229 (imagerectangle and imagefilledrectangle do work well
   with alpha channel, corners are drawn twice). (Pierre)
 - Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.336.2.44&r2=1.336.2.45&ty=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.336.2.44 
php-src/ext/session/session.c:1.336.2.45
--- php-src/ext/session/session.c:1.336.2.44Tue Dec  7 03:21:38 2004
+++ php-src/ext/session/session.c   Tue Dec  7 09:01:56 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.336.2.44 2004/12/07 08:21:38 tony2001 Exp $ */
+/* $Id: session.c,v 1.336.2.45 2004/12/07 14:01:56 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -946,8 +946,9 @@
 {
int module_number = PS(module_number);

-   if (PS(use_cookies)) {
+   if (PS(use_cookies) && PS(send_cookie)) {
php_session_send_cookie(TSRMLS_C);
+   PS(send_cookie) = 0;
}
 
/* if the SID constant exists, destroy it. */

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



[PHP-CVS] cvs: php-src /ext/bcmath/libbcmath/src raisemod.c

2004-12-07 Thread Antony Dovgal
tony2001Tue Dec  7 11:54:25 2004 EDT

  Modified files:  
/php-src/ext/bcmath/libbcmath/src   raisemod.c 
  Log:
  fix leak
  
  
http://cvs.php.net/diff.php/php-src/ext/bcmath/libbcmath/src/raisemod.c?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/bcmath/libbcmath/src/raisemod.c
diff -u php-src/ext/bcmath/libbcmath/src/raisemod.c:1.4 
php-src/ext/bcmath/libbcmath/src/raisemod.c:1.5
--- php-src/ext/bcmath/libbcmath/src/raisemod.c:1.4 Fri Nov 22 04:25:29 2002
+++ php-src/ext/bcmath/libbcmath/src/raisemod.c Tue Dec  7 11:54:25 2004
@@ -92,6 +92,7 @@
   bc_free_num (&power);
   bc_free_num (&exponent);
   bc_free_num (result);
+  bc_free_num (&parity);
   *result = temp;
   return 0;/* Everything is OK. */
 }

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/bcmath/libbcmath/src raisemod.c

2004-12-07 Thread Antony Dovgal
tony2001Tue Dec  7 12:04:43 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/bcmath/libbcmath/src   raisemod.c 
  Log:
  MFH: fix leak
  
  
http://cvs.php.net/diff.php/php-src/ext/bcmath/libbcmath/src/raisemod.c?r1=1.1.16.1&r2=1.1.16.2&ty=u
Index: php-src/ext/bcmath/libbcmath/src/raisemod.c
diff -u php-src/ext/bcmath/libbcmath/src/raisemod.c:1.1.16.1 
php-src/ext/bcmath/libbcmath/src/raisemod.c:1.1.16.2
--- php-src/ext/bcmath/libbcmath/src/raisemod.c:1.1.16.1Fri Nov 22 
04:27:08 2002
+++ php-src/ext/bcmath/libbcmath/src/raisemod.c Tue Dec  7 12:04:42 2004
@@ -92,6 +92,7 @@
   bc_free_num (&power);
   bc_free_num (&exponent);
   bc_free_num (result);
+  bc_free_num (&parity);
   *result = temp;
   return 0;/* Everything is OK. */
 }

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



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/bcmath/libbcmath/src raisemod.c

2004-12-07 Thread Antony Dovgal
tony2001Tue Dec  7 12:07:17 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/bcmath/libbcmath/src   raisemod.c 
  Log:
  MFH: fix leak in bcpowmod()
  
  
http://cvs.php.net/diff.php/php-src/ext/bcmath/libbcmath/src/raisemod.c?r1=1.4&r2=1.4.2.1&ty=u
Index: php-src/ext/bcmath/libbcmath/src/raisemod.c
diff -u php-src/ext/bcmath/libbcmath/src/raisemod.c:1.4 
php-src/ext/bcmath/libbcmath/src/raisemod.c:1.4.2.1
--- php-src/ext/bcmath/libbcmath/src/raisemod.c:1.4 Fri Nov 22 04:25:29 2002
+++ php-src/ext/bcmath/libbcmath/src/raisemod.c Tue Dec  7 12:07:16 2004
@@ -92,6 +92,7 @@
   bc_free_num (&power);
   bc_free_num (&exponent);
   bc_free_num (result);
+  bc_free_num (&parity);
   *result = temp;
   return 0;/* Everything is OK. */
 }

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



[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/soap php_encoding.c /ext/soap/tests/bugs bug30928.phpt bug30928.wsdl

2004-12-07 Thread Dmitry Stogov
dmitry  Tue Dec  7 12:29:24 2004 EDT

  Added files: (Branch: PHP_5_0)
/php-src/ext/soap/tests/bugsbug30928.phpt bug30928.wsdl 

  Modified files:  
/php-srcNEWS 
/php-src/ext/soap   php_encoding.c 
  Log:
  Fixed bug #30928 (When Using WSDL, SoapServer doesn't handle private or 
protected properties)
  
  http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.147&r2=1.1760.2.148&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.147 php-src/NEWS:1.1760.2.148
--- php-src/NEWS:1.1760.2.147   Tue Dec  7 03:44:07 2004
+++ php-src/NEWSTue Dec  7 12:29:23 2004
@@ -10,6 +10,8 @@
 - Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
 - Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia)
 - Fixed bug #30967 (properties in extended mysqli classes don't work). (Georg)
+- Fixed bug #30928 (When Using WSDL, SoapServer doesn't handle private or
+  protected properties). (Dmitry)
 - Fixed bug #30922 (reflective functions crash PHP when interfaces extend
   themselves). (Tony, Dmitry)
 - Fixed bug #30904 (segfault when recording soapclient into session). (Tony,
http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.71.2.11&r2=1.71.2.12&ty=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.71.2.11 
php-src/ext/soap/php_encoding.c:1.71.2.12
--- php-src/ext/soap/php_encoding.c:1.71.2.11   Tue Nov 16 08:51:32 2004
+++ php-src/ext/soap/php_encoding.c Tue Dec  7 12:29:24 2004
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: php_encoding.c,v 1.71.2.11 2004/11/16 13:51:32 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.71.2.12 2004/12/07 17:29:24 dmitry Exp $ */
 
 #include 
 
@@ -864,6 +864,45 @@
return ret;
 }
 
+static void set_zval_property(zval* object, char* name, zval* val TSRMLS_DC)
+{
+   zend_class_entry *old_scope;
+
+   old_scope = EG(scope);
+   EG(scope) = Z_OBJCE_P(object);
+#ifdef ZEND_ENGINE_2
+   val->refcount--;
+#endif
+   add_property_zval(object, name, val);
+   EG(scope) = old_scope;
+}
+
+static zval* get_zval_property(zval* object, char* name TSRMLS_DC)
+{
+   if (Z_TYPE_P(object) == IS_OBJECT) {
+   zval member;
+   zval *data;
+   zend_class_entry *old_scope;
+
+   ZVAL_STRING(&member, name, 0);
+   old_scope = EG(scope);
+ EG(scope) = Z_OBJCE_P(object);
+   data = Z_OBJ_HT_P(object)->read_property(object, &member, 
BP_VAR_IS TSRMLS_CC);
+   EG(scope) = old_scope;
+   if (data == EG(uninitialized_zval_ptr)) {
+   return NULL;
+   }
+   return data;
+   } else if (Z_TYPE_P(object) == IS_ARRAY) {
+   zval **data_ptr;
+
+   if (zend_hash_find(Z_ARRVAL_P(object), name, strlen(name)+1, 
(void**)&data_ptr) == SUCCESS) {
+ return *data_ptr;
+   }
+   }
+  return NULL;
+}
+
 static void model_to_zval_object(zval *ret, sdlContentModelPtr model, 
xmlNodePtr data, sdlPtr sdl TSRMLS_DC)
 {
switch (model->kind) {
@@ -920,10 +959,7 @@
} while ((node = 
get_node(node->next, model->u.element->name)) != NULL);
val = array;
}
-#ifdef ZEND_ENGINE_2
-   val->refcount--;
-#endif
-   add_property_zval(ret, 
model->u.element->name, val);
+   set_zval_property(ret, 
model->u.element->name, val TSRMLS_CC);
}
}
break;
@@ -965,7 +1001,7 @@
if (zend_hash_find(SOAP_GLOBAL(class_map), type->type_str, 
strlen(type->type_str)+1, (void**)&classname) == SUCCESS &&
Z_TYPE_PP(classname) == IS_STRING &&
(tmp = zend_fetch_class(Z_STRVAL_PP(classname), 
Z_STRLEN_PP(classname), ZEND_FETCH_CLASS_AUTO TSRMLS_CC)) != NULL) {
-   ce = tmp; 
+   ce = tmp;
}
}
sdl = SOAP_GLOBAL(sdl);
@@ -988,10 +1024,7 @@
 
object_init_ex(ret, ce);
base = master_to_zval_int(enc, data);
-#ifdef ZEND_ENGINE_2
-   base->refcount--;
-#endif
-   add_property_zval(ret, "_", base);
+   set_zval_property(ret, "_", base TSRMLS_CC);
} else {
MAKE_STD_ZVAL(ret);
FIND_XML_NULL(data, ret);
@@ -1013,10 +1046,7 @@
 
object_init_ex(ret, ce);
  

[PHP-CVS] cvs: php-src /ext/soap php_encoding.c /ext/soap/tests/bugs bug30928.phpt bug30928.wsdl

2004-12-07 Thread Dmitry Stogov
dmitry  Tue Dec  7 12:29:42 2004 EDT

  Modified files:  
/php-src/ext/soap   php_encoding.c 
/php-src/ext/soap/tests/bugsbug30928.phpt bug30928.wsdl 
  Log:
  Fixed bug #30928 (When Using WSDL, SoapServer doesn't handle private or 
protected properties)
  
  http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.84&r2=1.85&ty=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.84 
php-src/ext/soap/php_encoding.c:1.85
--- php-src/ext/soap/php_encoding.c:1.84Tue Nov 16 08:51:09 2004
+++ php-src/ext/soap/php_encoding.c Tue Dec  7 12:29:42 2004
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: php_encoding.c,v 1.84 2004/11/16 13:51:09 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.85 2004/12/07 17:29:42 dmitry Exp $ */
 
 #include 
 
@@ -864,6 +864,45 @@
return ret;
 }
 
+static void set_zval_property(zval* object, char* name, zval* val TSRMLS_DC)
+{
+   zend_class_entry *old_scope;
+
+   old_scope = EG(scope);
+   EG(scope) = Z_OBJCE_P(object);
+#ifdef ZEND_ENGINE_2
+   val->refcount--;
+#endif
+   add_property_zval(object, name, val);
+   EG(scope) = old_scope;
+}
+
+static zval* get_zval_property(zval* object, char* name TSRMLS_DC)
+{
+   if (Z_TYPE_P(object) == IS_OBJECT) {
+   zval member;
+   zval *data;
+   zend_class_entry *old_scope;
+
+   ZVAL_STRING(&member, name, 0);
+   old_scope = EG(scope);
+ EG(scope) = Z_OBJCE_P(object);
+   data = Z_OBJ_HT_P(object)->read_property(object, &member, 
BP_VAR_IS TSRMLS_CC);
+   EG(scope) = old_scope;
+   if (data == EG(uninitialized_zval_ptr)) {
+   return NULL;
+   }
+   return data;
+   } else if (Z_TYPE_P(object) == IS_ARRAY) {
+   zval **data_ptr;
+
+   if (zend_hash_find(Z_ARRVAL_P(object), name, strlen(name)+1, 
(void**)&data_ptr) == SUCCESS) {
+ return *data_ptr;
+   }
+   }
+  return NULL;
+}
+
 static void model_to_zval_object(zval *ret, sdlContentModelPtr model, 
xmlNodePtr data, sdlPtr sdl TSRMLS_DC)
 {
switch (model->kind) {
@@ -920,10 +959,7 @@
} while ((node = 
get_node(node->next, model->u.element->name)) != NULL);
val = array;
}
-#ifdef ZEND_ENGINE_2
-   val->refcount--;
-#endif
-   add_property_zval(ret, 
model->u.element->name, val);
+   set_zval_property(ret, 
model->u.element->name, val TSRMLS_CC);
}
}
break;
@@ -965,7 +1001,7 @@
if (zend_hash_find(SOAP_GLOBAL(class_map), type->type_str, 
strlen(type->type_str)+1, (void**)&classname) == SUCCESS &&
Z_TYPE_PP(classname) == IS_STRING &&
(tmp = zend_fetch_class(Z_STRVAL_PP(classname), 
Z_STRLEN_PP(classname), ZEND_FETCH_CLASS_AUTO TSRMLS_CC)) != NULL) {
-   ce = tmp; 
+   ce = tmp;
}
}
sdl = SOAP_GLOBAL(sdl);
@@ -988,10 +1024,7 @@
 
object_init_ex(ret, ce);
base = master_to_zval_int(enc, data);
-#ifdef ZEND_ENGINE_2
-   base->refcount--;
-#endif
-   add_property_zval(ret, "_", base);
+   set_zval_property(ret, "_", base TSRMLS_CC);
} else {
MAKE_STD_ZVAL(ret);
FIND_XML_NULL(data, ret);
@@ -1013,10 +1046,7 @@
 
object_init_ex(ret, ce);
base = master_to_zval_int(sdlType->encode, 
data);
-#ifdef ZEND_ENGINE_2
-   base->refcount--;
-#endif
-   add_property_zval(ret, "_", base);
+   set_zval_property(ret, "_", base TSRMLS_CC);
}
} else {
MAKE_STD_ZVAL(ret);
@@ -1054,10 +1084,7 @@
xmlNodeSetContent(dummy, 
str_val);
data = 
master_to_zval((*attr)->encode, dummy);
xmlFreeNode(dummy);
-#ifdef ZEND_ENGINE_2
-   data->refcount--;
-#endif
-   add_property_zval(ret, 
(*attr)->name, data);
+ 

[PHP-CVS] cvs: php-src(PHP_5_0) /ext/session session.c

2004-12-07 Thread Dmitry Stogov
dmitry  Tue Dec  7 13:01:56 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/sessionsession.c 
  Log:
  Fixed crash in phpinfo() after graceful Apache restart.
  
  
http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.391.2.3&r2=1.391.2.4&ty=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.391.2.3 
php-src/ext/session/session.c:1.391.2.4
--- php-src/ext/session/session.c:1.391.2.3 Thu Sep 30 10:20:22 2004
+++ php-src/ext/session/session.c   Tue Dec  7 13:01:56 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.391.2.3 2004/09/30 14:20:22 tony2001 Exp $ */
+/* $Id: session.c,v 1.391.2.4 2004/12/07 18:01:56 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -169,6 +169,7 @@
 PS_SERIALIZER_FUNCS(php_binary);
 
 #define MAX_SERIALIZERS 10
+#define PREDEFINED_SERIALIZERS 2
 
 static ps_serializer ps_serializers[MAX_SERIALIZERS + 1] = {
PS_SERIALIZER_ENTRY(php),
@@ -176,6 +177,7 @@
 };
 
 #define MAX_MODULES 10
+#define PREDEFINED_MODULES 2
 
 static ps_module *ps_modules[MAX_MODULES + 1] = {
ps_files_ptr,
@@ -1802,6 +1804,9 @@
PHP_MSHUTDOWN(ps_mm) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
 #endif
 
+   ps_serializers[PREDEFINED_SERIALIZERS].name = NULL;
+   ps_modules[PREDEFINED_MODULES] = NULL;
+
return SUCCESS;
 }
 

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



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

2004-12-07 Thread Dmitry Stogov
dmitry  Tue Dec  7 13:02:25 2004 EDT

  Modified files:  
/php-src/ext/sessionsession.c 
  Log:
  Fixed crash in phpinfo() after graceful Apache restart.
  
  
http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.400&r2=1.401&ty=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.400 php-src/ext/session/session.c:1.401
--- php-src/ext/session/session.c:1.400 Mon Oct  4 16:17:06 2004
+++ php-src/ext/session/session.c   Tue Dec  7 13:02:25 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.400 2004/10/04 20:17:06 andi Exp $ */
+/* $Id: session.c,v 1.401 2004/12/07 18:02:25 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -169,6 +169,7 @@
 PS_SERIALIZER_FUNCS(php_binary);
 
 #define MAX_SERIALIZERS 10
+#define PREDEFINED_SERIALIZERS 2
 
 static ps_serializer ps_serializers[MAX_SERIALIZERS + 1] = {
PS_SERIALIZER_ENTRY(php),
@@ -176,6 +177,7 @@
 };
 
 #define MAX_MODULES 10
+#define PREDEFINED_MODULES 2
 
 static ps_module *ps_modules[MAX_MODULES + 1] = {
ps_files_ptr,
@@ -1808,6 +1810,9 @@
PHP_MSHUTDOWN(ps_mm) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
 #endif
 
+   ps_serializers[PREDEFINED_SERIALIZERS].name = NULL;
+   ps_modules[PREDEFINED_MODULES] = NULL;
+
return SUCCESS;
 }
 

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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS configure.in /main php_version.h

2004-12-07 Thread Ilia Alshanetsky
iliaa   Tue Dec  7 20:09:54 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS configure.in 
/php-src/main   php_version.h 
  Log:
  4.3.10RC2
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.766&r2=1.1247.2.767&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.766 php-src/NEWS:1.1247.2.767
--- php-src/NEWS:1.1247.2.766   Tue Dec  7 09:01:55 2004
+++ php-src/NEWSTue Dec  7 20:09:53 2004
@@ -1,6 +1,6 @@
 PHP 4  NEWS
 |||
-?? Nov 2004, Version 4.3.10
+07 Dec 2004, Version 4.3.10RC2
 - Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
 - Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia)
 
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.396.2.136&r2=1.396.2.137&ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.396.2.136 php-src/configure.in:1.396.2.137
--- php-src/configure.in:1.396.2.136Mon Dec  6 15:37:56 2004
+++ php-src/configure.inTue Dec  7 20:09:53 2004
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.396.2.136 2004/12/06 20:37:56 derick Exp $ -*- sh 
-*-
+dnl ## $Id: configure.in,v 1.396.2.137 2004/12/08 01:09:53 iliaa Exp $ -*- sh 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -41,7 +41,7 @@
 MAJOR_VERSION=4
 MINOR_VERSION=3
 RELEASE_VERSION=10
-EXTRA_VERSION="RC2-dev"
+EXTRA_VERSION="RC2"
 VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
 
 dnl Define where extension directories are located in the configure context
http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.66.2.71&r2=1.66.2.72&ty=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.66.2.71 
php-src/main/php_version.h:1.66.2.72
--- php-src/main/php_version.h:1.66.2.71Tue Nov 23 09:56:29 2004
+++ php-src/main/php_version.h  Tue Dec  7 20:09:53 2004
@@ -3,5 +3,5 @@
 #define PHP_MAJOR_VERSION 4
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 10
-#define PHP_EXTRA_VERSION "RC2-dev"
-#define PHP_VERSION "4.3.10RC2-dev"
+#define PHP_EXTRA_VERSION "RC2"
+#define PHP_VERSION "4.3.10RC2"

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



[PHP-CVS] cvs: php-src(PHP_4_3) / configure.in /main php_version.h

2004-12-07 Thread Ilia Alshanetsky
iliaa   Tue Dec  7 20:11:43 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcconfigure.in 
/php-src/main   php_version.h 
  Log:
  Back to dev.
  
  
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.396.2.137&r2=1.396.2.138&ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.396.2.137 php-src/configure.in:1.396.2.138
--- php-src/configure.in:1.396.2.137Tue Dec  7 20:09:53 2004
+++ php-src/configure.inTue Dec  7 20:11:43 2004
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.396.2.137 2004/12/08 01:09:53 iliaa Exp $ -*- sh 
-*-
+dnl ## $Id: configure.in,v 1.396.2.138 2004/12/08 01:11:43 iliaa Exp $ -*- sh 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -41,7 +41,7 @@
 MAJOR_VERSION=4
 MINOR_VERSION=3
 RELEASE_VERSION=10
-EXTRA_VERSION="RC2"
+EXTRA_VERSION="RC3-dev"
 VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
 
 dnl Define where extension directories are located in the configure context
http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.66.2.72&r2=1.66.2.73&ty=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.66.2.72 
php-src/main/php_version.h:1.66.2.73
--- php-src/main/php_version.h:1.66.2.72Tue Dec  7 20:09:53 2004
+++ php-src/main/php_version.h  Tue Dec  7 20:11:43 2004
@@ -3,5 +3,5 @@
 #define PHP_MAJOR_VERSION 4
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 10
-#define PHP_EXTRA_VERSION "RC2"
-#define PHP_VERSION "4.3.10RC2"
+#define PHP_EXTRA_VERSION "RC3-dev"
+#define PHP_VERSION "4.3.10RC3-dev"

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



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

2004-12-07 Thread Brad House
bradmsswTue Dec  7 22:02:33 2004 EDT

  Modified files:  
/php-src/ext/mcve   config.m4 mcve.c 
  Log:
  Newer versions of libmonetra broke compatability with one function. Make 
workaround that detects version, and works with both.
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.10&r2=1.11&ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.10 php-src/ext/mcve/config.m4:1.11
--- php-src/ext/mcve/config.m4:1.10 Sun May 30 10:33:44 2004
+++ php-src/ext/mcve/config.m4  Tue Dec  7 22:02:33 2004
@@ -51,6 +51,20 @@
   ],[
 AC_MSG_ERROR([libmcve 3.2.2 or greater required.])
   ])
+
+  AC_MSG_CHECKING([for correct libmonetra 4.2 or higher])
+  AC_EGREP_CPP(yes,[
+#include "$MCVE_DIR/include/mcve.h"
+#ifdef MCVE_SetSSL_CAfile
+yes
+#endif
+  ],[
+AC_MSG_RESULT([yes])
+  ],[
+AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using 
libmonetra 4.2 or higher ])
+AC_MSG_ERROR([no])
+  ])
+
   CPPFLAGS=$saved_CPPFLAGS
 
   PHP_ADD_INCLUDE($MCVE_DIR/include)
http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.28&r2=1.29&ty=u
Index: php-src/ext/mcve/mcve.c
diff -u php-src/ext/mcve/mcve.c:1.28 php-src/ext/mcve/mcve.c:1.29
--- php-src/ext/mcve/mcve.c:1.28Sun May 30 18:41:13 2004
+++ php-src/ext/mcve/mcve.c Tue Dec  7 22:02:33 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: mcve.c,v 1.28 2004/05/30 22:41:13 bradmssw Exp $ */
+/* $Id: mcve.c,v 1.29 2004/12/08 03:02:33 bradmssw Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -25,6 +25,14 @@
 
 #include "php.h"
 
+#if PHP_WIN32
+#include "config.w32.h"
+#elif defined NETWARE
+#include "config.nw.h"
+#else
+#include "php_config.h"
+#endif
+
 #if HAVE_MCVE
 
 /* standard php include(s) */
@@ -719,23 +727,34 @@
 }
 /* }}} */
 
-/* {{{ proto int m_setssl_files(string sslkeyfile, string sslcertfile)
+/* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string 
sslcertfile)
Set certificate key files and certificates if server requires client 
certificate
verification
 */
 PHP_FUNCTION(m_setssl_files)
 {
+   MCVE_CONN *conn;
int retval;
-   zval **arg1, **arg2;
+   zval **arg1, **arg2, **arg3;
 
+#ifndef LIBMONETRA_BELOW_4_2
+   if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, 
&arg3) == FAILURE)
+   WRONG_PARAM_COUNT;
+   ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, "mcve connection", 
le_conn);
+#else
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == 
FAILURE)
WRONG_PARAM_COUNT;
+#endif
 
-   convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
 
+#ifndef LIBMONETRA_BELOW_4_2
+   convert_to_string_ex(arg3);
+   retval = MCVE_SetSSL_Files(conn, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3));
+#else
+   convert_to_string_ex(arg1); 
retval = MCVE_SetSSL_Files(Z_STRVAL_PP(arg1), Z_STRVAL_PP(arg2));
-
+#endif
RETURN_LONG(retval);
 }
 /* }}} */

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



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mcve config.m4 mcve.c

2004-12-07 Thread Brad House
bradmsswTue Dec  7 22:08:39 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/mcve   config.m4 mcve.c 
  Log:
  backport from head. compatability fix with libmonetra 4.2 and higher (still 
works with older releases too).
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.10&r2=1.10.2.1&ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.10 php-src/ext/mcve/config.m4:1.10.2.1
--- php-src/ext/mcve/config.m4:1.10 Sun May 30 10:33:44 2004
+++ php-src/ext/mcve/config.m4  Tue Dec  7 22:08:37 2004
@@ -51,6 +51,20 @@
   ],[
 AC_MSG_ERROR([libmcve 3.2.2 or greater required.])
   ])
+
+  AC_MSG_CHECKING([for correct libmonetra 4.2 or higher])
+  AC_EGREP_CPP(yes,[
+#include "$MCVE_DIR/include/mcve.h"
+#ifdef MCVE_SetSSL_CAfile
+yes
+#endif
+  ],[
+AC_MSG_RESULT([yes])
+  ],[
+AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using 
libmonetra 4.2 or higher ])
+AC_MSG_ERROR([no])
+  ])
+
   CPPFLAGS=$saved_CPPFLAGS
 
   PHP_ADD_INCLUDE($MCVE_DIR/include)
http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.28&r2=1.28.2.1&ty=u
Index: php-src/ext/mcve/mcve.c
diff -u php-src/ext/mcve/mcve.c:1.28 php-src/ext/mcve/mcve.c:1.28.2.1
--- php-src/ext/mcve/mcve.c:1.28Sun May 30 18:41:13 2004
+++ php-src/ext/mcve/mcve.c Tue Dec  7 22:08:38 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: mcve.c,v 1.28 2004/05/30 22:41:13 bradmssw Exp $ */
+/* $Id: mcve.c,v 1.28.2.1 2004/12/08 03:08:38 bradmssw Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -25,6 +25,14 @@
 
 #include "php.h"
 
+#if PHP_WIN32
+#include "config.w32.h"
+#elif defined NETWARE
+#include "config.nw.h"
+#else
+#include "php_config.h"
+#endif
+
 #if HAVE_MCVE
 
 /* standard php include(s) */
@@ -719,23 +727,34 @@
 }
 /* }}} */
 
-/* {{{ proto int m_setssl_files(string sslkeyfile, string sslcertfile)
+/* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string 
sslcertfile)
Set certificate key files and certificates if server requires client 
certificate
verification
 */
 PHP_FUNCTION(m_setssl_files)
 {
+   MCVE_CONN *conn;
int retval;
-   zval **arg1, **arg2;
+   zval **arg1, **arg2, **arg3;
 
+#ifndef LIBMONETRA_BELOW_4_2
+   if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, 
&arg3) == FAILURE)
+   WRONG_PARAM_COUNT;
+   ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, "mcve connection", 
le_conn);
+#else
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == 
FAILURE)
WRONG_PARAM_COUNT;
+#endif
 
-   convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
 
+#ifndef LIBMONETRA_BELOW_4_2
+   convert_to_string_ex(arg3);
+   retval = MCVE_SetSSL_Files(conn, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3));
+#else
+   convert_to_string_ex(arg1); 
retval = MCVE_SetSSL_Files(Z_STRVAL_PP(arg1), Z_STRVAL_PP(arg2));
-
+#endif
RETURN_LONG(retval);
 }
 /* }}} */

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mcve config.m4 mcve.c

2004-12-07 Thread Brad House
bradmsswTue Dec  7 22:11:31 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mcve   config.m4 mcve.c 
  Log:
  backport from 5.0/head. Newer versions of libmonetra broke compatability with 
one function. Make workaround that detects version, and works with both.
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.2.4.9&r2=1.2.4.10&ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.2.4.9 php-src/ext/mcve/config.m4:1.2.4.10
--- php-src/ext/mcve/config.m4:1.2.4.9  Sun May 30 10:33:12 2004
+++ php-src/ext/mcve/config.m4  Tue Dec  7 22:11:31 2004
@@ -51,6 +51,20 @@
   ],[
 AC_MSG_ERROR([libmcve 3.2.2 or greater required.])
   ])
+
+  AC_MSG_CHECKING([for correct libmonetra 4.2 or higher])
+  AC_EGREP_CPP(yes,[
+#include "$MCVE_DIR/include/mcve.h"
+#ifdef MCVE_SetSSL_CAfile
+yes
+#endif
+  ],[
+AC_MSG_RESULT([yes])
+  ],[
+AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using 
libmonetra 4.2 or higher ])
+AC_MSG_ERROR([no])
+  ])
+
   CPPFLAGS=$saved_CPPFLAGS
 
   PHP_ADD_INCLUDE($MCVE_DIR/include)
http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.14.2.9&r2=1.14.2.10&ty=u
Index: php-src/ext/mcve/mcve.c
diff -u php-src/ext/mcve/mcve.c:1.14.2.9 php-src/ext/mcve/mcve.c:1.14.2.10
--- php-src/ext/mcve/mcve.c:1.14.2.9Wed Jun 16 23:16:54 2004
+++ php-src/ext/mcve/mcve.c Tue Dec  7 22:11:31 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: mcve.c,v 1.14.2.9 2004/06/17 03:16:54 bradmssw Exp $ */
+/* $Id: mcve.c,v 1.14.2.10 2004/12/08 03:11:31 bradmssw Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -25,6 +25,14 @@
 
 #include "php.h"
 
+#if PHP_WIN32
+#include "config.w32.h"
+#elif defined NETWARE
+#include "config.nw.h"
+#else
+#include "php_config.h"
+#endif
+
 #if HAVE_MCVE
 
 /* standard php include(s) */
@@ -717,23 +725,34 @@
 }
 /* }}} */
 
-/* {{{ proto int m_setssl_files(string sslkeyfile, string sslcertfile)
+/* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string 
sslcertfile)
Set certificate key files and certificates if server requires client 
certificate
verification
 */
 PHP_FUNCTION(m_setssl_files)
 {
+   MCVE_CONN *conn;
int retval;
-   zval **arg1, **arg2;
+   zval **arg1, **arg2, **arg3;
 
+#ifndef LIBMONETRA_BELOW_4_2
+   if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &arg1, &arg2, 
&arg3) == FAILURE)
+   WRONG_PARAM_COUNT;
+   ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, "mcve connection", 
le_conn);
+#else
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == 
FAILURE)
WRONG_PARAM_COUNT;
+#endif
 
-   convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
 
+#ifndef LIBMONETRA_BELOW_4_2
+   convert_to_string_ex(arg3);
+   retval = MCVE_SetSSL_Files(conn, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3));
+#else
+   convert_to_string_ex(arg1); 
retval = MCVE_SetSSL_Files(Z_STRVAL_PP(arg1), Z_STRVAL_PP(arg2));
-
+#endif
RETURN_LONG(retval);
 }
 /* }}} */

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



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

2004-12-07 Thread Jani Taskinen
sniper  Wed Dec  8 01:46:34 2004 EDT

  Modified files:  
/php-src/ext/mcve   config.m4 
  Log:
  Fix build. This was not supposed to halt configure if test fails.
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.11&r2=1.12&ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.11 php-src/ext/mcve/config.m4:1.12
--- php-src/ext/mcve/config.m4:1.11 Tue Dec  7 22:02:33 2004
+++ php-src/ext/mcve/config.m4  Wed Dec  8 01:46:33 2004
@@ -62,7 +62,7 @@
 AC_MSG_RESULT([yes])
   ],[
 AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using 
libmonetra 4.2 or higher ])
-AC_MSG_ERROR([no])
+AC_MSG_RESULT([no])
   ])
 
   CPPFLAGS=$saved_CPPFLAGS

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



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mcve config.m4

2004-12-07 Thread Jani Taskinen
sniper  Wed Dec  8 01:47:07 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/mcve   config.m4 
  Log:
  MFH: Fix build. This was not supposed to halt configure if test fails.
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.10.2.1&r2=1.10.2.2&ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.10.2.1 php-src/ext/mcve/config.m4:1.10.2.2
--- php-src/ext/mcve/config.m4:1.10.2.1 Tue Dec  7 22:08:37 2004
+++ php-src/ext/mcve/config.m4  Wed Dec  8 01:47:07 2004
@@ -62,7 +62,7 @@
 AC_MSG_RESULT([yes])
   ],[
 AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using 
libmonetra 4.2 or higher ])
-AC_MSG_ERROR([no])
+AC_MSG_RESULT([no])
   ])
 
   CPPFLAGS=$saved_CPPFLAGS

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mcve config.m4

2004-12-07 Thread Jani Taskinen
sniper  Wed Dec  8 01:48:11 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mcve   config.m4 
  Log:
  MFH: Fix build. This was not supposed to halt configure if test fails.
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.2.4.10&r2=1.2.4.11&ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.2.4.10 php-src/ext/mcve/config.m4:1.2.4.11
--- php-src/ext/mcve/config.m4:1.2.4.10 Tue Dec  7 22:11:31 2004
+++ php-src/ext/mcve/config.m4  Wed Dec  8 01:48:11 2004
@@ -62,7 +62,7 @@
 AC_MSG_RESULT([yes])
   ],[
 AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using 
libmonetra 4.2 or higher ])
-AC_MSG_ERROR([no])
+AC_MSG_RESULT([no])
   ])
 
   CPPFLAGS=$saved_CPPFLAGS

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