Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS

2011-07-13 Thread Pierre Joye
how so?

On Wed, Jul 13, 2011 at 10:12 PM, Stanislav Malyshev s...@php.net wrote:
 stas                                     Wed, 13 Jul 2011 20:12:14 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=313214

 Log:
 integrate 5.3 NEWS

 Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS

 Modified: php/php-src/branches/PHP_5_4/NEWS
 ===
 --- php/php-src/branches/PHP_5_4/NEWS   2011-07-13 19:41:13 UTC (rev 313213)
 +++ php/php-src/branches/PHP_5_4/NEWS   2011-07-13 20:12:14 UTC (rev 313214)
 @@ -266,6 +266,59 @@
  - Fixed PDO objects binary incompatibility. (Dmitry)
  - Fixed bug #52211 (iconv() returns part of string on error). (Felipe)

 +?? ??? 2011, PHP 5.3.7
 +- Zend Engine:
 +  . Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even
 +    though the class has none). (Felipe)
 +
 +- Core
 +  . Fixed bug #55014 (Compile failure due to improper use of ctime_r()). 
 (Ilia)
 +  . Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption). 
 (Dmitry)
 +  . Fixed bug #54305 (Crash in gc_remove_zval_from_buffer). (Dmitry)
 +  . Fixed bug #53727 (Inconsistent behavior of is_subclass_of with 
 interfaces)
 +    (Ralph Schindler, Dmitry)
 +  . Fixed buffer overflow on overlog salt in crypt(). (Clément LECIGNE, Stas)
 +  . Fixed bug #52935 (call exit in user_error_handler cause stream relate
 +    core). (Gustavo)
 +
 +- MCrypt
 +  . Change E_ERROR to E_WARNING in mcrypt_create_iv when not enough data
 +    has been fetched (Windows). (Pierre)
 +  . Fixed bug #55169 (mcrypt_create_iv always fails to gather sufficient 
 random
 +    data on Windows). (Pierre)
 +
 +- PDO DBlib:
 +  . Fixed bug #54329 (MSSql extension memory leak).
 +    (dotslashpok at gmail dot com)
 +
 +30 Jun 2011, PHP 5.3.7 RC2
 +- Core:
 +  . Fixed crash in error_log(). (Felipe) Reported by Mateusz Kocielski.
 +  . Fixed bug #55082 (var_export() doesn't escape properties properly).
 +    (Gustavo)
 +
 +- DateTime extension:
 +  . Fixed bug where the DateTime object got changed while using date_diff().
 +    (Derick)
 +
 +- DBA extension:
 +  . Supress warning on non-existent file open with Berkeley DB 5.2 (Chris 
 Jones)
 +
 +- PDO ODBC driver:
 +  . Fixed data type usage in 64bit. (leocsilva at gmail dot com)
 +
 +- PHP-FPM SAPI:
 +  . Implemented FR #54499 (FPM ping and status_path should handle HEAD 
 request). (fat)
 +  . Implemented FR #54172 (Overriding the pid file location of php-fpm). 
 (fat)
 +  . Fixed missing Expires and Cache-Control headers for ping and status 
 pages.
 +    (fat)
 +  . Fixed memory leak. (fat) Reported and fixed by Giovanni Giacobbi.
 +  . Fixed wrong value of log_level when invoking fpm with -tt. (fat)
 +
 +- SPL extension:
 +  . Fixed bug #54971 (Wrong result when using iterator_to_array with use_keys
 +    on true). (Pierrick)
 +
  16 Jun 2011, PHP 5.3.7 RC1
  - Upgraded bundled SQLite to version 3.7.6.3. (Scott)
  - Upgraded bundled PCRE to version 8.12. (Scott)
 @@ -429,7 +482,18 @@
  - Phar extension:
   . Fixed bug #54395 (Phar::mount() crashes when calling with wrong 
 parameters).
     (Felipe)
 -
 +
 +- PHP-FPM SAPI:
 +  . Added xml format to the status page. (fat)
 +  . Removed timestamp in logs written by children processes. (fat)
 +  . Fixed exit at FPM startup on fpm_resources_prepare() errors. (fat)
 +  . Added master rlimit_files and rlimit_core in the global configuration
 +    settings. (fat)
 +  . Removed pid in debug logs written by chrildren processes. (fat)
 +  . Added custom access log (also added per request %CPU and memory
 +    mesurement). (fat)
 +  . Added a real scoreboard and several improvements to the status page. 
 (fat)
 +
  - Reflection extension:
   . Fixed bug #54347 (reflection_extension does not lowercase module function
     name). (Felipe, laruence at yahoo dot com dot cn)


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




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/winutil.c branches/PHP_5_4/win32/winutil.c trunk/win32/winutil.c

2011-07-12 Thread Pierre Joye
pajoye   Tue, 12 Jul 2011 11:46:41 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=313175

Log:
- Bug #55169, improve fix, allow non interactive user, hash-like ops only usage

Bug: https://bugs.php.net/55169 (Assigned) mcrypt_create_iv always fails to 
gather sufficient random data
  
Changed paths:
U   php/php-src/branches/PHP_5_3/win32/winutil.c
U   php/php-src/branches/PHP_5_4/win32/winutil.c
U   php/php-src/trunk/win32/winutil.c

Modified: php/php-src/branches/PHP_5_3/win32/winutil.c
===
--- php/php-src/branches/PHP_5_3/win32/winutil.c2011-07-12 10:50:39 UTC 
(rev 313174)
+++ php/php-src/branches/PHP_5_3/win32/winutil.c2011-07-12 11:46:41 UTC 
(rev 313175)
@@ -87,11 +87,14 @@
 #endif

if (has_crypto_ctx == 0) {
-   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, 0)) {
+   /* CRYPT_VERIFYCONTEXT  only hashingco-like use, no need to 
acces prv keys */
+   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_VERIFYCONTEXT )) {
/* Could mean that the key container does not exist, 
let try
-again by asking for a new one */
+  again by asking for a new one. If it fails here, it 
surely means that the user running
+   this process does not have the permission(s) to use this 
container.
+ */
if (GetLastError() == NTE_BAD_KEYSET) {
-   if (CryptAcquireContext(hCryptProv, NULL, 
NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
+   if (CryptAcquireContext(hCryptProv, NULL, 
NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET | CRYPT_MACHINE_KEYSET | 
CRYPT_VERIFYCONTEXT )) {
has_crypto_ctx = 1;
} else {
has_crypto_ctx = 0;

Modified: php/php-src/branches/PHP_5_4/win32/winutil.c
===
--- php/php-src/branches/PHP_5_4/win32/winutil.c2011-07-12 10:50:39 UTC 
(rev 313174)
+++ php/php-src/branches/PHP_5_4/win32/winutil.c2011-07-12 11:46:41 UTC 
(rev 313175)
@@ -87,11 +87,14 @@
 #endif

if (has_crypto_ctx == 0) {
-   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, 0)) {
+   /* CRYPT_VERIFYCONTEXT  only hashingco-like use, no need to 
acces prv keys */
+   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_VERIFYCONTEXT )) {
/* Could mean that the key container does not exist, 
let try
-again by asking for a new one */
+  again by asking for a new one. If it fails here, it 
surely means that the user running
+   this process does not have the permission(s) to use this 
container.
+ */
if (GetLastError() == NTE_BAD_KEYSET) {
-   if (CryptAcquireContext(hCryptProv, NULL, 
NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
+   if (CryptAcquireContext(hCryptProv, NULL, 
NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET | CRYPT_MACHINE_KEYSET | 
CRYPT_VERIFYCONTEXT )) {
has_crypto_ctx = 1;
} else {
has_crypto_ctx = 0;

Modified: php/php-src/trunk/win32/winutil.c
===
--- php/php-src/trunk/win32/winutil.c   2011-07-12 10:50:39 UTC (rev 313174)
+++ php/php-src/trunk/win32/winutil.c   2011-07-12 11:46:41 UTC (rev 313175)
@@ -87,11 +87,14 @@
 #endif

if (has_crypto_ctx == 0) {
-   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, 0)) {
+   /* CRYPT_VERIFYCONTEXT  only hashingco-like use, no need to 
acces prv keys */
+   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_VERIFYCONTEXT )) {
/* Could mean that the key container does not exist, 
let try
-again by asking for a new one */
+  again by asking for a new one. If it fails here, it 
surely means that the user running
+   this process does not have the permission(s) to use this 
container.
+ */
if (GetLastError() == NTE_BAD_KEYSET) {
-   if (CryptAcquireContext(hCryptProv, NULL, 
NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
+   if (CryptAcquireContext(hCryptProv, NULL, 
NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET | CRYPT_MACHINE_KEYSET | 
CRYPT_VERIFYCONTEXT )) {

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mcrypt/mcrypt.c branches/PHP_5_4/ext/mcrypt/mcrypt.c trunk/ext/mcrypt/mcrypt.c

2011-07-10 Thread Pierre Joye
pajoye   Sun, 10 Jul 2011 14:19:51 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=313109

Log:
- use warning here to match unix behavior

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/mcrypt/mcrypt.c
U   php/php-src/branches/PHP_5_4/ext/mcrypt/mcrypt.c
U   php/php-src/trunk/ext/mcrypt/mcrypt.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-07-10 13:24:54 UTC (rev 313108)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-07-10 14:19:51 UTC (rev 313109)
@@ -12,6 +12,10 @@
   . Fixed bug #52935 (call exit in user_error_handler cause stream relate
 core). (Gustavo)

+- MCrypt
+  . Change E_ERROR to E_WARNING in mcrypt_create_iv when not enough data
+has been fetched (Windows). (Pierre)
+
 - PDO DBlib:
   . Fixed bug #54329 (MSSql extension memory leak).
 (dotslashpok at gmail dot com)

Modified: php/php-src/branches/PHP_5_3/ext/mcrypt/mcrypt.c
===
--- php/php-src/branches/PHP_5_3/ext/mcrypt/mcrypt.c2011-07-10 13:24:54 UTC 
(rev 313108)
+++ php/php-src/branches/PHP_5_3/ext/mcrypt/mcrypt.c2011-07-10 14:19:51 UTC 
(rev 313109)
@@ -1394,7 +1394,7 @@
BYTE *iv_b = (BYTE *) iv;
if (php_win32_get_random_bytes(iv_b, (size_t) size) == FAILURE){
efree(iv);
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, Could not 
gather sufficient random data);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
gather sufficient random data);
RETURN_FALSE;
}
n = size;

Modified: php/php-src/branches/PHP_5_4/ext/mcrypt/mcrypt.c
===
--- php/php-src/branches/PHP_5_4/ext/mcrypt/mcrypt.c2011-07-10 13:24:54 UTC 
(rev 313108)
+++ php/php-src/branches/PHP_5_4/ext/mcrypt/mcrypt.c2011-07-10 14:19:51 UTC 
(rev 313109)
@@ -1394,7 +1394,7 @@
BYTE *iv_b = (BYTE *) iv;
if (php_win32_get_random_bytes(iv_b, (size_t) size) == FAILURE){
efree(iv);
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, Could not 
gather sufficient random data);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
gather sufficient random data);
RETURN_FALSE;
}
n = size;

Modified: php/php-src/trunk/ext/mcrypt/mcrypt.c
===
--- php/php-src/trunk/ext/mcrypt/mcrypt.c   2011-07-10 13:24:54 UTC (rev 
313108)
+++ php/php-src/trunk/ext/mcrypt/mcrypt.c   2011-07-10 14:19:51 UTC (rev 
313109)
@@ -1394,7 +1394,7 @@
BYTE *iv_b = (BYTE *) iv;
if (php_win32_get_random_bytes(iv_b, (size_t) size) == FAILURE){
efree(iv);
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, Could not 
gather sufficient random data);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
gather sufficient random data);
RETURN_FALSE;
}
n = size;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/win32/winutil.c branches/PHP_5_4/win32/winutil.c trunk/win32/winutil.c

2011-07-10 Thread Pierre Joye
pajoye   Sun, 10 Jul 2011 14:36:32 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=313110

Log:
- fix bug #55169, mcrypt_create_iv always fails to gather sufficient random data

Bug: https://bugs.php.net/55169 (Open) mcrypt_create_iv always fails to gather 
sufficient random data
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/win32/winutil.c
U   php/php-src/branches/PHP_5_4/win32/winutil.c
U   php/php-src/trunk/win32/winutil.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-07-10 14:19:51 UTC (rev 313109)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-07-10 14:36:32 UTC (rev 313110)
@@ -15,6 +15,8 @@
 - MCrypt
   . Change E_ERROR to E_WARNING in mcrypt_create_iv when not enough data
 has been fetched (Windows). (Pierre)
+  . Fixed bug #55169 (mcrypt_create_iv always fails to gather sufficient random
+data on Windows). (Pierre)

 - PDO DBlib:
   . Fixed bug #54329 (MSSql extension memory leak).

Modified: php/php-src/branches/PHP_5_3/win32/winutil.c
===
--- php/php-src/branches/PHP_5_3/win32/winutil.c2011-07-10 14:19:51 UTC 
(rev 313109)
+++ php/php-src/branches/PHP_5_3/win32/winutil.c2011-07-10 14:36:32 UTC 
(rev 313110)
@@ -87,7 +87,7 @@
 #endif

if (has_crypto_ctx == 0) {
-   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)) {
+   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, 0)) {
/* Could mean that the key container does not exist, 
let try
 again by asking for a new one */
if (GetLastError() == NTE_BAD_KEYSET) {
@@ -97,6 +97,8 @@
has_crypto_ctx = 0;
}
}
+   } else {
+   has_crypto_ctx = 1;
}
}


Modified: php/php-src/branches/PHP_5_4/win32/winutil.c
===
--- php/php-src/branches/PHP_5_4/win32/winutil.c2011-07-10 14:19:51 UTC 
(rev 313109)
+++ php/php-src/branches/PHP_5_4/win32/winutil.c2011-07-10 14:36:32 UTC 
(rev 313110)
@@ -87,7 +87,7 @@
 #endif

if (has_crypto_ctx == 0) {
-   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)) {
+   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, 0)) {
/* Could mean that the key container does not exist, 
let try
 again by asking for a new one */
if (GetLastError() == NTE_BAD_KEYSET) {
@@ -97,6 +97,8 @@
has_crypto_ctx = 0;
}
}
+   } else {
+   has_crypto_ctx = 1;
}
}


Modified: php/php-src/trunk/win32/winutil.c
===
--- php/php-src/trunk/win32/winutil.c   2011-07-10 14:19:51 UTC (rev 313109)
+++ php/php-src/trunk/win32/winutil.c   2011-07-10 14:36:32 UTC (rev 313110)
@@ -87,7 +87,7 @@
 #endif

if (has_crypto_ctx == 0) {
-   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)) {
+   if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, 0)) {
/* Could mean that the key container does not exist, 
let try
 again by asking for a new one */
if (GetLastError() == NTE_BAD_KEYSET) {
@@ -97,6 +97,8 @@
has_crypto_ctx = 0;
}
}
+   } else {
+   has_crypto_ctx = 1;
}
}


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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c

2011-07-10 Thread Pierre Joye
pajoye   Sun, 10 Jul 2011 14:59:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=313112

Log:
- use  php_win32_get_random_bytes instead of over slow and partially wrong 
openssl's version

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
U   php/php-src/trunk/ext/openssl/openssl.c

Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c  2011-07-10 14:37:12 UTC 
(rev 313111)
+++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c  2011-07-10 14:59:33 UTC 
(rev 313112)
@@ -36,6 +36,10 @@
 #include ext/standard/md5.h
 #include ext/standard/base64.h

+#if PHP_WIN32
+# include win32/winutil.h
+#endif
+
 /* OpenSSL includes */
 #include openssl/evp.h
 #include openssl/x509.h
@@ -4920,10 +4924,19 @@

buffer = emalloc(buffer_length + 1);

+#ifdef PHP_WIN32
+   strong_result = 1;
+   /* random/urandom equivalent on Windows */
+   if (php_win32_get_random_bytes(buffer, (size_t) buffer_length) == 
FAILURE){
+   efree(buffer);
+   RETURN_FALSE;
+   }
+#else
if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length))  0) {
efree(buffer);
RETURN_FALSE;
}
+#endif

buffer[buffer_length] = 0;
RETVAL_STRINGL((char *)buffer, buffer_length, 0);

Modified: php/php-src/trunk/ext/openssl/openssl.c
===
--- php/php-src/trunk/ext/openssl/openssl.c 2011-07-10 14:37:12 UTC (rev 
313111)
+++ php/php-src/trunk/ext/openssl/openssl.c 2011-07-10 14:59:33 UTC (rev 
313112)
@@ -4920,10 +4920,19 @@

buffer = emalloc(buffer_length + 1);

+#ifdef PHP_WIN32
+   strong_result = 1;
+   /* random/urandom equivalent on Windows */
+   if (php_win32_get_random_bytes(buffer, (size_t) buffer_length) == 
FAILURE){
+   efree(buffer);
+   RETURN_FALSE;
+   }
+#else
if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length))  0) {
efree(buffer);
RETURN_FALSE;
}
+#endif

buffer[buffer_length] = 0;
RETVAL_STRINGL((char *)buffer, buffer_length, 0);

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS

2011-07-10 Thread Pierre Joye
pajoye   Sun, 10 Jul 2011 15:00:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=313113

Log:
- rng change

Changed paths:
U   php/php-src/branches/PHP_5_4/NEWS

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-07-10 14:59:33 UTC (rev 313112)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-07-10 15:00:49 UTC (rev 313113)
@@ -1,4 +1,4 @@
-PHPNEWS
+PHP
NEWS
 |||
 ?? ??? 2011, PHP 5.4.0
 - autoconf 2.59+ is now supported (and required) for generating the
@@ -195,6 +195,8 @@
   . Added a no_ticket SSL context option to disable the SessionTicket TLS
 extension. FR #53447. (Adam)
   . Added no padding option to openssl_encrypt()/openssl_decrypt(). (Scott)
+  . Use php's implementation for Windows Crypto API in
+openssl_random_pseudo_bytes. (Pierre)

 - Improved PDO DB-LIB: (Stanley)
   . Added nextRowset support.

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/win32/build/libs_version.txt trunk/win32/build/libs_version.txt

2011-07-09 Thread Pierre Joye
pajoye   Sun, 10 Jul 2011 02:20:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=313101

Log:
- update libpng to 1.2.45

Changed paths:
U   php/php-src/branches/PHP_5_4/win32/build/libs_version.txt
U   php/php-src/trunk/win32/build/libs_version.txt

Modified: php/php-src/branches/PHP_5_4/win32/build/libs_version.txt
===
--- php/php-src/branches/PHP_5_4/win32/build/libs_version.txt   2011-07-10 
02:00:00 UTC (rev 313100)
+++ php/php-src/branches/PHP_5_4/win32/build/libs_version.txt   2011-07-10 
02:20:34 UTC (rev 313101)
@@ -1 +1,2 @@
 libcurl-7.21.6
+libpng-1.2.45
\ No newline at end of file

Modified: php/php-src/trunk/win32/build/libs_version.txt
===
--- php/php-src/trunk/win32/build/libs_version.txt  2011-07-10 02:00:00 UTC 
(rev 313100)
+++ php/php-src/trunk/win32/build/libs_version.txt  2011-07-10 02:20:34 UTC 
(rev 313101)
@@ -1 +1,2 @@
 libcurl-7.21.6
+libpng-1.2.45

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

[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug53727.phpt branches/PHP_5_3/Zend/tests/is_a.phpt branches/PHP_5_3/Zend/zend_builtin_functi

2011-07-07 Thread Pierre Joye
what kind of troubles do they see?

2011/7/7 Johannes Schlüter johan...@schlueters.de:
 Hi,

 I was told (didn't verify) that this causes lots of trouble with PEAR
 and other applications. We're in final RC phase of 5.3.7. I don't think
 it is critical for 5.3.7 and I wonder whether we need it for 5.3 at all.

 johannes

 On Mon, 2011-07-04 at 14:55 +, Dmitry Stogov wrote:
 dmitry                                   Mon, 04 Jul 2011 14:55:39 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=312904

 Log:
 Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces)

 Bug: https://bugs.php.net/53727 (Assigned) Inconsistent behavior of 
 is_subclass_of with interfaces

 Changed paths:
     U   php/php-src/branches/PHP_5_3/NEWS
     A   php/php-src/branches/PHP_5_3/Zend/tests/bug53727.phpt
     U   php/php-src/branches/PHP_5_3/Zend/tests/is_a.phpt
     U   php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c
     U   
 php/php-src/branches/PHP_5_3/ext/standard/tests/class_object/is_a_variation_001.phpt
     A   php/php-src/branches/PHP_5_4/Zend/tests/bug53727.phpt
     U   php/php-src/branches/PHP_5_4/Zend/tests/is_a.phpt
     U   php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c
     U   
 php/php-src/branches/PHP_5_4/ext/standard/tests/class_object/is_a_variation_001.phpt
     A   php/php-src/trunk/Zend/tests/bug53727.phpt
     U   php/php-src/trunk/Zend/tests/is_a.phpt
     U   php/php-src/trunk/Zend/zend_builtin_functions.c
     U   
 php/php-src/trunk/ext/standard/tests/class_object/is_a_variation_001.phpt

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



 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/apache2handler/config.w32 trunk/sapi/apache2handler/config.w32

2011-07-06 Thread Pierre Joye
pajoye   Wed, 06 Jul 2011 11:13:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=313001

Log:
- add apache 2.3 (upcoming 2.4) handler

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/apache2handler/config.w32
U   php/php-src/trunk/sapi/apache2handler/config.w32

Modified: php/php-src/branches/PHP_5_4/sapi/apache2handler/config.w32
===
--- php/php-src/branches/PHP_5_4/sapi/apache2handler/config.w32 2011-07-06 
11:00:55 UTC (rev 313000)
+++ php/php-src/branches/PHP_5_4/sapi/apache2handler/config.w32 2011-07-06 
11:13:38 UTC (rev 313001)
@@ -5,7 +5,7 @@

 if (PHP_APACHE2HANDLER != no) {
if (PHP_ZTS == no) {
-   WARNING(Apache2 module requires an --enable-zts build of PHP 
on windows);
+   WARNING(Apache 2.0 module requires an --enable-zts build of 
PHP on windows);
} else if (CHECK_HEADER_ADD_INCLUDE(httpd.h, CFLAGS_APACHE2HANDLER, 
PHP_PHP_BUILD + \\include\\apache2) 
CHECK_LIB(libhttpd.lib, apache2handler, 
PHP_PHP_BUILD + \\lib\\apache2) 
CHECK_LIB(libapr.lib, apache2handler, PHP_PHP_BUILD 
+ \\lib\\apache2) 
@@ -23,7 +23,7 @@

 if (PHP_APACHE2_2HANDLER != no) {
if (PHP_ZTS == no) {
-   WARNING(Apache2 module requires an --enable-zts build of PHP 
on windows);
+   WARNING(Apache 2.2 module requires an --enable-zts build of 
PHP on windows);
} else if (CHECK_HEADER_ADD_INCLUDE(httpd.h, 
CFLAGS_APACHE2_2HANDLER, PHP_PHP_BUILD + \\include\\apache2_2) 
CHECK_LIB(libhttpd.lib, apache2_2handler, 
PHP_PHP_BUILD + \\lib\\apache2_2) 
CHECK_LIB(libapr-1.lib, apache2_2handler, 
PHP_PHP_BUILD + \\lib\\apache2_2) 
@@ -37,3 +37,22 @@
WARNING(Could not find apache2.2 libraries/headers);
}
 }
+
+ARG_ENABLE('apache2-3handler', 'Build Apache 2.3.x handler', 'no');
+if (PHP_APACHE2_3HANDLER != no) {
+   if (PHP_ZTS == no) {
+   WARNING(Apache 2.3 module requires an --enable-zts build of 
PHP on windows);
+   } else if (CHECK_HEADER_ADD_INCLUDE(httpd.h, 
CFLAGS_APACHE2_3HANDLER, PHP_PHP_BUILD + \\include\\apache2_3) 
+   CHECK_LIB(libhttpd.lib, apache2_3handler, 
PHP_PHP_BUILD + \\lib\\apache2_3) 
+   CHECK_LIB(libapr-1.lib, apache2_3handler, 
PHP_PHP_BUILD + \\lib\\apache2_3) 
+   CHECK_LIB(libaprutil-1.lib, apache2_3handler, 
PHP_PHP_BUILD + \\lib\\apache2_3)
+   ) {
+   SAPI('apache2_3handler', 'mod_php5.c sapi_apache2.c 
apache_config.c php_functions.c',
+   'php' + PHP_VERSION + 'apache2_3.dll',
+   '/D PHP_APACHE2_EXPORTS /I win32',
+   'sapi\\apache2handler');
+   } else {
+   WARNING(Could not find apache2.3 libraries/headers);
+   }
+}
+

Modified: php/php-src/trunk/sapi/apache2handler/config.w32
===
--- php/php-src/trunk/sapi/apache2handler/config.w322011-07-06 11:00:55 UTC 
(rev 313000)
+++ php/php-src/trunk/sapi/apache2handler/config.w322011-07-06 11:13:38 UTC 
(rev 313001)
@@ -5,7 +5,7 @@

 if (PHP_APACHE2HANDLER != no) {
if (PHP_ZTS == no) {
-   WARNING(Apache2 module requires an --enable-zts build of PHP 
on windows);
+   WARNING(Apache 2.0 module requires an --enable-zts build of 
PHP on windows);
} else if (CHECK_HEADER_ADD_INCLUDE(httpd.h, CFLAGS_APACHE2HANDLER, 
PHP_PHP_BUILD + \\include\\apache2) 
CHECK_LIB(libhttpd.lib, apache2handler, 
PHP_PHP_BUILD + \\lib\\apache2) 
CHECK_LIB(libapr.lib, apache2handler, PHP_PHP_BUILD 
+ \\lib\\apache2) 
@@ -23,7 +23,7 @@

 if (PHP_APACHE2_2HANDLER != no) {
if (PHP_ZTS == no) {
-   WARNING(Apache2 module requires an --enable-zts build of PHP 
on windows);
+   WARNING(Apache 2.2 module requires an --enable-zts build of 
PHP on windows);
} else if (CHECK_HEADER_ADD_INCLUDE(httpd.h, 
CFLAGS_APACHE2_2HANDLER, PHP_PHP_BUILD + \\include\\apache2_2) 
CHECK_LIB(libhttpd.lib, apache2_2handler, 
PHP_PHP_BUILD + \\lib\\apache2_2) 
CHECK_LIB(libapr-1.lib, apache2_2handler, 
PHP_PHP_BUILD + \\lib\\apache2_2) 
@@ -37,3 +37,22 @@
WARNING(Could not find apache2.2 libraries/headers);
}
 }
+
+ARG_ENABLE('apache2-3handler', 'Build Apache 2.3.x handler', 'no');
+if (PHP_APACHE2_3HANDLER != no) {
+   if (PHP_ZTS == no) {
+   WARNING(Apache 2.3 module requires an --enable-zts build of 
PHP on windows);
+   } else if (CHECK_HEADER_ADD_INCLUDE(httpd.h, 
CFLAGS_APACHE2_3HANDLER, PHP_PHP_BUILD + \\include\\apache2_3) 
+   CHECK_LIB(libhttpd.lib, 

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS configure.in main/php_version.h

2011-07-06 Thread Pierre Joye
On Wed, Jul 6, 2011 at 9:20 PM, Rasmus Lerdorf ras...@lerdorf.com wrote:

 Given the pretty big changes that are likely to occur between alpha
 releases, I think it would be a good idea to have separated NEWS
 sections. And yes, when we put out the first beta we merge them all.

Exactly, every change happening between two tests releases (no matter
the state) has its NEWS entry. They got merged, removed or rephrased
for the final release.

Cheers.
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /SVNROOT/ global_avail

2011-06-25 Thread Pierre Joye
pajoye   Sat, 25 Jun 2011 09:41:00 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312451

Log:
- pecl/yaf and doc karma for laruence

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-06-25 07:45:41 UTC (rev 312450)
+++ SVNROOT/global_avail2011-06-25 09:41:00 UTC (rev 312451)
@@ -342,7 +342,10 @@
 avail|dsr|pecl/sam,phpdoc
 avail|jtansavatdi|pecl/amqp,phpdoc
 avail|knut|php/php-src/*/tests
+avail|laruence|pecl/yaf,phpdoc
+

+
 # Objective-C bridge
 avail|wez,jan|php/php-objc


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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/sapi/cli/php_cli.c branches/PHP_5_4/sapi/cli/php_cli.c trunk/sapi/cli/php_cli.c

2011-06-25 Thread Pierre Joye
pajoye   Sat, 25 Jun 2011 10:47:54 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312454

Log:
- reflection is always enabled

Changed paths:
U   php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c
U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
U   php/php-src/trunk/sapi/cli/php_cli.c

Modified: php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c
===
--- php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c 2011-06-25 10:16:46 UTC 
(rev 312453)
+++ php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c 2011-06-25 10:47:54 UTC 
(rev 312454)
@@ -29,9 +29,7 @@
 #include zend_modules.h
 #include zend_interfaces.h

-#ifdef HAVE_REFLECTION
 #include ext/reflection/php_reflection.h
-#endif

 #include SAPI.h

@@ -159,14 +157,12 @@
{'?', 0, usage},/* help alias (both '?' and 'usage') */
{'v', 0, version},
{'z', 1, zend-extension},
-#ifdef HAVE_REFLECTION
{10,  1, rf},
{10,  1, rfunction},
{11,  1, rc},
{11,  1, rclass},
{12,  1, re},
{12,  1, rextension},
-#endif
{13,  1, ri},
{13,  1, rextinfo},
{14,  0, ini},
@@ -519,11 +515,9 @@
\n
  --iniShow configuration file 
names\n
\n
-#if (HAVE_REFLECTION)
  --rf name  Show information about 
function name.\n
  --rc name  Show information about 
class name.\n
  --re name  Show information about 
extension name.\n
-#endif
  --ri name  Show configuration for 
extension name.\n
\n
, prog, prog, prog, prog, prog, prog);
@@ -1005,8 +999,6 @@
case 'H':
hide_argv = 1;
break;
-
-#ifdef HAVE_REFLECTION
case 10:
behavior=PHP_MODE_REFLECTION_FUNCTION;
reflection_what = php_optarg;
@@ -1019,7 +1011,6 @@
behavior=PHP_MODE_REFLECTION_EXTENSION;
reflection_what = php_optarg;
break;
-#endif
case 13:
behavior=PHP_MODE_REFLECTION_EXT_INFO;
reflection_what = php_optarg;
@@ -1285,7 +1276,6 @@

break;
}
-#ifdef HAVE_REFLECTION
case PHP_MODE_REFLECTION_FUNCTION:
case PHP_MODE_REFLECTION_CLASS:
case PHP_MODE_REFLECTION_EXTENSION:
@@ -1336,7 +1326,6 @@

break;
}
-#endif /* reflection */
case PHP_MODE_REFLECTION_EXT_INFO:
{
int len = strlen(reflection_what);

Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
===
--- php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c 2011-06-25 10:16:46 UTC 
(rev 312453)
+++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c 2011-06-25 10:47:54 UTC 
(rev 312454)
@@ -29,9 +29,7 @@
 #include zend_modules.h
 #include zend_interfaces.h

-#ifdef HAVE_REFLECTION
 #include ext/reflection/php_reflection.h
-#endif

 #include SAPI.h

@@ -158,7 +156,6 @@
{'?', 0, usage},/* help alias (both '?' and 'usage') */
{'v', 0, version},
{'z', 1, zend-extension},
-#ifdef HAVE_REFLECTION
{10,  1, rf},
{10,  1, rfunction},
{11,  1, rc},
@@ -167,7 +164,6 @@
{12,  1, rextension},
{13,  1, rz},
{13,  1, rzendextension},
-#endif
{14,  1, ri},
{14,  1, rextinfo},
{15,  0, ini},
@@ -537,12 +533,10 @@
\n
  --iniShow configuration file 
names\n
\n
-#if (HAVE_REFLECTION)
  --rf name  Show information about 
function name.\n
  --rc name  Show information about 
class name.\n
  --re name  Show information about 
extension name.\n
  --rz name  Show information about Zend 
extension name.\n
-#endif
  --ri name  Show configuration for 
extension name.\n
\n
, prog, prog, prog, prog, prog, prog);
@@ -873,8 +867,6 @@
case 'H':
hide_argv = 1;
break;
-
-#ifdef 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/config.m4 branches/PHP_5_4/sapi/cli/config.w32 branches/PHP_5_4/sapi/cli/php_cli.c branches/PHP_5_4/sapi/cli/php_cli_server.c branches/PHP_5_

2011-06-21 Thread Pierre Joye
The build is still broken. Can you fix it please?

On Tue, Jun 21, 2011 at 11:12 AM, Moriyoshi Koizumi m...@mozo.jp wrote:
 Thanks!

 On 2011/06/21, at 8:36, Felipe Pena wrote:

 Fixed.

 2011/6/20 Johannes Schlüter johan...@schlueters.de

 Hi,

 On Mon, 2011-06-20 at 20:27 +, Moriyoshi Koizumi wrote:
 moriyoshi                                Mon, 20 Jun 2011 20:27:39 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=312344

 Log:
 - Add built-in web server to CLI SAPI. See the RFC for detail.

 This broke the -d option. Causing this error on make:

 | Generating phar.phar
 | PEAR package PHP_Archive not installed: generated phar will require
 | PHP's phar extension be enabled.
 | Creating phar files is disabled by ini setting 'phar.readonly'.
 | make: *** [ext/phar/phar.phar] Error 1

 which can be reduced to this simple test case:

 $ sapi/cli/php -n -d phar.readonly=0 -r 'echo ini_get(phar.readonly);'
 1

 I see that php_cli.c now handles parsing -d options before calling
 sapi_startup() whic seems to cause this.


 johannes



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




 --
 Regards,
 Felipe Pena


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





-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/sapi/cli/php_cli_server.c

2011-06-21 Thread Pierre Joye
pajoye   Tue, 21 Jun 2011 11:43:19 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312355

Log:
- fix build

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
U   php/php-src/trunk/sapi/cli/php_cli_server.c

Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
===
--- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c  2011-06-21 
09:24:04 UTC (rev 312354)
+++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c  2011-06-21 
11:43:19 UTC (rev 312355)
@@ -18,8 +18,6 @@

 /* $Id: php_cli.c 306938 2011-01-01 02:17:06Z felipe $ */

-#include php_config.h
-
 #include stdio.h
 #include fcntl.h
 #include assert.h
@@ -30,6 +28,8 @@
 #include win32/time.h
 #include win32/signal.h
 #include win32/php_registry.h
+#else
+# include php_config.h
 #endif

 #ifdef __riscos__

Modified: php/php-src/trunk/sapi/cli/php_cli_server.c
===
--- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-06-21 09:24:04 UTC (rev 
312354)
+++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-06-21 11:43:19 UTC (rev 
312355)
@@ -18,8 +18,6 @@

 /* $Id: php_cli.c 306938 2011-01-01 02:17:06Z felipe $ */

-#include php_config.h
-
 #include stdio.h
 #include fcntl.h
 #include assert.h
@@ -30,6 +28,8 @@
 #include win32/time.h
 #include win32/signal.h
 #include win32/php_registry.h
+#else
+# include php_config.h
 #endif

 #ifdef __riscos__

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/config.m4 branches/PHP_5_4/sapi/cli/config.w32 branches/PHP_5_4/sapi/cli/php_cli.c branches/PHP_5_4/sapi/cli/php_cli_server.c branches/PHP_5_

2011-06-20 Thread Pierre Joye
Build is also broken:

php-trunk, build nts-windows-vc9-x86:
php_cli_server.c, 21, error, C1083, Cannot open include file:
'php_config.h': No such file or directory, sapi\cli
, NMAKE, error, U1077, 'C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC\BIN\cl.exe' : return code '0x2',


php-trunk, build ts-windows-vc9-x86:
php_cli_server.c, 21, error, C1083, Cannot open include file:
'php_config.h': No such file or directory, sapi\cli
, NMAKE, error, U1077, 'C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC\BIN\cl.exe' : return code '0x2',

On Mon, Jun 20, 2011 at 10:27 PM, Moriyoshi Koizumi moriyo...@php.net wrote:
 moriyoshi                                Mon, 20 Jun 2011 20:27:39 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=312344

 Log:
 - Add built-in web server to CLI SAPI. See the RFC for detail.

 Changed paths:
    U   php/php-src/branches/PHP_5_4/sapi/cli/config.m4
    U   php/php-src/branches/PHP_5_4/sapi/cli/config.w32
    U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
    A   php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
    A   php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.h
    A   php/php-src/branches/PHP_5_4/sapi/cli/php_http_parser.c
    A   php/php-src/branches/PHP_5_4/sapi/cli/php_http_parser.h
    U   php/php-src/trunk/sapi/cli/config.m4
    U   php/php-src/trunk/sapi/cli/config.w32
    U   php/php-src/trunk/sapi/cli/php_cli.c
    A   php/php-src/trunk/sapi/cli/php_cli_server.c
    A   php/php-src/trunk/sapi/cli/php_cli_server.h
    A   php/php-src/trunk/sapi/cli/php_http_parser.c
    A   php/php-src/trunk/sapi/cli/php_http_parser.h

 diffs exceeded maximum size

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




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/main/main.c trunk/main/main.c

2011-06-17 Thread Pierre Joye
pajoye   Sat, 18 Jun 2011 02:24:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312250

Log:
- fix build

Changed paths:
U   php/php-src/branches/PHP_5_4/main/main.c
U   php/php-src/trunk/main/main.c

Modified: php/php-src/branches/PHP_5_4/main/main.c
===
--- php/php-src/branches/PHP_5_4/main/main.c2011-06-18 01:05:30 UTC (rev 
312249)
+++ php/php-src/branches/PHP_5_4/main/main.c2011-06-18 02:24:01 UTC (rev 
312250)
@@ -32,6 +32,7 @@
 #include win32/time.h
 #include win32/signal.h
 #include win32/php_win32_globals.h
+#include win32/winutil.h
 #include process.h
 #elif defined(NETWARE)
 #include sys/timeval.h

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-06-18 01:05:30 UTC (rev 312249)
+++ php/php-src/trunk/main/main.c   2011-06-18 02:24:01 UTC (rev 312250)
@@ -32,6 +32,7 @@
 #include win32/time.h
 #include win32/signal.h
 #include win32/php_win32_globals.h
+#include win32/winutil.h
 #include process.h
 #elif defined(NETWARE)
 #include sys/timeval.h

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/winutil.c branches/PHP_5_4/win32/winutil.c trunk/win32/winutil.c

2011-06-16 Thread Pierre Joye
pajoye   Thu, 16 Jun 2011 10:20:25 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312203

Log:
- fix nts build

Changed paths:
U   php/php-src/branches/PHP_5_3/win32/winutil.c
U   php/php-src/branches/PHP_5_4/win32/winutil.c
U   php/php-src/trunk/win32/winutil.c

Modified: php/php-src/branches/PHP_5_3/win32/winutil.c
===
--- php/php-src/branches/PHP_5_3/win32/winutil.c2011-06-16 01:41:34 UTC 
(rev 312202)
+++ php/php-src/branches/PHP_5_3/win32/winutil.c2011-06-16 10:20:25 UTC 
(rev 312203)
@@ -82,7 +82,10 @@
BOOL ret;
size_t i = 0;

+#ifdef ZTS
tsrm_mutex_lock(php_lock_win32_cryptoctx);
+#endif
+
if (has_crypto_ctx == 0) {
if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)) {
/* Could mean that the key container does not exist, 
let try
@@ -96,7 +99,10 @@
}
}
}
+
+#ifdef ZTS
tsrm_mutex_unlock(php_lock_win32_cryptoctx);
+#endif

if (has_crypto_ctx == 0) {
return FAILURE;

Modified: php/php-src/branches/PHP_5_4/win32/winutil.c
===
--- php/php-src/branches/PHP_5_4/win32/winutil.c2011-06-16 01:41:34 UTC 
(rev 312202)
+++ php/php-src/branches/PHP_5_4/win32/winutil.c2011-06-16 10:20:25 UTC 
(rev 312203)
@@ -82,7 +82,10 @@
BOOL ret;
size_t i = 0;

+#ifdef ZTS
tsrm_mutex_lock(php_lock_win32_cryptoctx);
+#endif
+
if (has_crypto_ctx == 0) {
if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)) {
/* Could mean that the key container does not exist, 
let try
@@ -96,7 +99,10 @@
}
}
}
+
+#ifdef ZTS
tsrm_mutex_unlock(php_lock_win32_cryptoctx);
+#endif

if (has_crypto_ctx == 0) {
return FAILURE;

Modified: php/php-src/trunk/win32/winutil.c
===
--- php/php-src/trunk/win32/winutil.c   2011-06-16 01:41:34 UTC (rev 312202)
+++ php/php-src/trunk/win32/winutil.c   2011-06-16 10:20:25 UTC (rev 312203)
@@ -82,7 +82,10 @@
BOOL ret;
size_t i = 0;

+#ifdef ZTS
tsrm_mutex_lock(php_lock_win32_cryptoctx);
+#endif
+
if (has_crypto_ctx == 0) {
if (!CryptAcquireContext(hCryptProv, NULL, NULL, 
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)) {
/* Could mean that the key container does not exist, 
let try
@@ -96,7 +99,10 @@
}
}
}
+
+#ifdef ZTS
tsrm_mutex_unlock(php_lock_win32_cryptoctx);
+#endif

if (has_crypto_ctx == 0) {
return FAILURE;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/openssl.c branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c

2011-06-16 Thread Pierre Joye
pajoye   Thu, 16 Jun 2011 13:06:41 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312209

Log:
- did I not kill that already? (do not use rand_screen, pointless on server and 
not TS)

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
U   php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
U   php/php-src/trunk/ext/openssl/openssl.c

Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2011-06-16 12:57:06 UTC 
(rev 312208)
+++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2011-06-16 13:06:41 UTC 
(rev 312209)
@@ -4900,10 +4900,6 @@

buffer = emalloc(buffer_length + 1);

-#ifdef WINDOWS
-RAND_screen();
-#endif
-
if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length))  0) {
efree(buffer);
RETURN_FALSE;

Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c  2011-06-16 12:57:06 UTC 
(rev 312208)
+++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c  2011-06-16 13:06:41 UTC 
(rev 312209)
@@ -4920,10 +4920,6 @@

buffer = emalloc(buffer_length + 1);

-#ifdef WINDOWS
-RAND_screen();
-#endif
-
if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length))  0) {
efree(buffer);
RETURN_FALSE;

Modified: php/php-src/trunk/ext/openssl/openssl.c
===
--- php/php-src/trunk/ext/openssl/openssl.c 2011-06-16 12:57:06 UTC (rev 
312208)
+++ php/php-src/trunk/ext/openssl/openssl.c 2011-06-16 13:06:41 UTC (rev 
312209)
@@ -4920,10 +4920,6 @@

buffer = emalloc(buffer_length + 1);

-#ifdef WINDOWS
-RAND_screen();
-#endif
-
if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length))  0) {
efree(buffer);
RETURN_FALSE;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/session/config.w32 branches/PHP_5_4/ext/session/config.w32 trunk/ext/session/config.w32

2011-06-15 Thread Pierre Joye
pajoye   Thu, 16 Jun 2011 01:21:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312200

Log:
- install extra headers

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/session/config.w32
U   php/php-src/branches/PHP_5_4/ext/session/config.w32
U   php/php-src/trunk/ext/session/config.w32

Modified: php/php-src/branches/PHP_5_3/ext/session/config.w32
===
--- php/php-src/branches/PHP_5_3/ext/session/config.w32 2011-06-16 00:37:23 UTC 
(rev 312199)
+++ php/php-src/branches/PHP_5_3/ext/session/config.w32 2011-06-16 01:21:01 UTC 
(rev 312200)
@@ -6,5 +6,5 @@
 if (PHP_SESSION == yes) {
EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, false 
/* never shared */);
AC_DEFINE(HAVE_PHP_SESSION, 1, Session support);
-   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h);
+   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h php_session.h mod_files.h 
mod_user.h);
 }

Modified: php/php-src/branches/PHP_5_4/ext/session/config.w32
===
--- php/php-src/branches/PHP_5_4/ext/session/config.w32 2011-06-16 00:37:23 UTC 
(rev 312199)
+++ php/php-src/branches/PHP_5_4/ext/session/config.w32 2011-06-16 01:21:01 UTC 
(rev 312200)
@@ -6,5 +6,5 @@
 if (PHP_SESSION == yes) {
EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, false 
/* never shared */);
AC_DEFINE(HAVE_PHP_SESSION, 1, Session support);
-   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h);
+   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h php_session.h mod_files.h 
mod_user.h);
 }

Modified: php/php-src/trunk/ext/session/config.w32
===
--- php/php-src/trunk/ext/session/config.w322011-06-16 00:37:23 UTC (rev 
312199)
+++ php/php-src/trunk/ext/session/config.w322011-06-16 01:21:01 UTC (rev 
312200)
@@ -6,5 +6,5 @@
 if (PHP_SESSION == yes) {
EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, false 
/* never shared */);
AC_DEFINE(HAVE_PHP_SESSION, 1, Session support);
-   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h);
+   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h php_session.h mod_files.h 
mod_user.h);
 }

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/main.c branches/PHP_5_3/win32/winutil.c branches/PHP_5_3/win32/winutil.h branches/PHP_5_4/main/main.c branches/PHP_5_4/win32/winutil.c branches/PHP_5

2011-06-15 Thread Pierre Joye
pajoye   Thu, 16 Jun 2011 01:31:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312201

Log:
- init win32 rng context once per process

Changed paths:
U   php/php-src/branches/PHP_5_3/main/main.c
U   php/php-src/branches/PHP_5_3/win32/winutil.c
U   php/php-src/branches/PHP_5_3/win32/winutil.h
U   php/php-src/branches/PHP_5_4/main/main.c
U   php/php-src/branches/PHP_5_4/win32/winutil.c
U   php/php-src/branches/PHP_5_4/win32/winutil.h
U   php/php-src/trunk/main/main.c
U   php/php-src/trunk/win32/winutil.c
U   php/php-src/trunk/win32/winutil.h

Modified: php/php-src/branches/PHP_5_3/main/main.c
===
--- php/php-src/branches/PHP_5_3/main/main.c	2011-06-16 01:21:01 UTC (rev 312200)
+++ php/php-src/branches/PHP_5_3/main/main.c	2011-06-16 01:31:10 UTC (rev 312201)
@@ -32,6 +32,7 @@
 #include win32/time.h
 #include win32/signal.h
 #include win32/php_win32_globals.h
+#include win32/winutil.h
 #include process.h
 #elif defined(NETWARE)
 #include sys/timeval.h
@@ -1829,6 +1830,10 @@
 	tsrm_ls = ts_resource(0);
 #endif

+#ifdef PHP_WIN32
+	php_win32_init_rng_lock();
+#endif
+
 	module_shutdown = 0;
 	module_startup = 1;
 	sapi_initialize_empty_request(TSRMLS_C);
@@ -2148,6 +2153,10 @@
 	WSACleanup();
 #endif

+#ifdef PHP_WIN32
+	php_win32_free_rng_lock();
+#endif
+
 	sapi_flush(TSRMLS_C);

 	zend_shutdown(TSRMLS_C);

Modified: php/php-src/branches/PHP_5_3/win32/winutil.c
===
--- php/php-src/branches/PHP_5_3/win32/winutil.c	2011-06-16 01:21:01 UTC (rev 312200)
+++ php/php-src/branches/PHP_5_3/win32/winutil.c	2011-06-16 01:31:10 UTC (rev 312201)
@@ -49,26 +49,61 @@
 	}
 }

+HCRYPTPROV   hCryptProv;
+unsigned int has_crypto_ctx = 0;
+
+#ifdef ZTS
+MUTEX_T php_lock_win32_cryptoctx;
+void php_win32_init_rng_lock()
+{
+	php_lock_win32_cryptoctx = tsrm_mutex_alloc();
+}
+
+void php_win32_free_rng_lock()
+{
+	tsrm_mutex_lock(php_lock_win32_cryptoctx);
+	CryptReleaseContext(hCryptProv, 0);
+	has_crypto_ctx = 0;
+	tsrm_mutex_unlock(php_lock_win32_cryptoctx);
+	tsrm_mutex_free(php_lock_win32_cryptoctx);
+
+}
+#else
+#define php_win32_init_rng_lock();
+#define php_win32_free_rng_lock();
+#endif
+
+
+
 PHPAPI int php_win32_get_random_bytes(unsigned char *buf, size_t size) {  /* {{{ */
-	HCRYPTPROV   hCryptProv;
-	int has_context = 0;
+
+	unsigned int has_contextg = 0;
+
 	BOOL ret;
 	size_t i = 0;

-	if (!CryptAcquireContext(hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)) {
-		/* Could mean that the key container does not exist, let try
-		   again by asking for a new one */
-		if (GetLastError() == NTE_BAD_KEYSET) {
-			if (CryptAcquireContext(hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
-has_context = 1;
-			} else {
-return FAILURE;
+	tsrm_mutex_lock(php_lock_win32_cryptoctx);
+	if (has_crypto_ctx == 0) {
+		if (!CryptAcquireContext(hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)) {
+			/* Could mean that the key container does not exist, let try
+ again by asking for a new one */
+			if (GetLastError() == NTE_BAD_KEYSET) {
+if (CryptAcquireContext(hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
+	has_crypto_ctx = 1;
+} else {
+	has_crypto_ctx = 0;
+}
 			}
 		}
 	}
+	tsrm_mutex_unlock(php_lock_win32_cryptoctx);

+	if (has_crypto_ctx == 0) {
+		return FAILURE;
+	}
+
 	ret = CryptGenRandom(hCryptProv, size, buf);
-	CryptReleaseContext(hCryptProv, 0);
+
 	if (ret) {
 		return SUCCESS;
 	} else {

Modified: php/php-src/branches/PHP_5_3/win32/winutil.h
===
--- php/php-src/branches/PHP_5_3/win32/winutil.h	2011-06-16 01:21:01 UTC (rev 312200)
+++ php/php-src/branches/PHP_5_3/win32/winutil.h	2011-06-16 01:31:10 UTC (rev 312201)
@@ -21,3 +21,11 @@
 #define php_win_err()	php_win_err(GetLastError())
 int php_win32_check_trailing_space(const char * path, const int path_len);
 PHPAPI php_win32_get_random_bytes(unsigned char *buf, size_t size);
+
+#ifdef ZTS
+void php_win32_init_rng_lock();
+void php_win32_free_rng_lock();
+#else
+#define php_win32_init_rng_lock();
+#define php_win32_free_rng_lock();
+#endif

Modified: php/php-src/branches/PHP_5_4/main/main.c
===
--- php/php-src/branches/PHP_5_4/main/main.c	2011-06-16 01:21:01 UTC (rev 312200)
+++ php/php-src/branches/PHP_5_4/main/main.c	2011-06-16 01:31:10 UTC (rev 312201)
@@ -1871,6 +1871,10 @@
 	tsrm_ls = ts_resource(0);
 #endif

+#ifdef PHP_WIN32
+	php_win32_init_rng_lock();
+#endif
+
 	module_shutdown = 0;
 	module_startup = 1;
 	sapi_initialize_empty_request(TSRMLS_C);
@@ -2220,6 +2224,10 @@
 	WSACleanup();
 #endif

+#ifdef PHP_WIN32
+	php_win32_free_rng_lock();
+#endif
+
 	sapi_flush(TSRMLS_C);

 	zend_shutdown(TSRMLS_C);

Modified: php/php-src/branches/PHP_5_4/win32/winutil.c

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2011-06-11 Thread Pierre Joye
pajoye   Sat, 11 Jun 2011 13:23:29 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312050

Log:
- missing entry for curl.cainfo

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-06-11 10:21:15 UTC (rev 312049)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-11 13:23:29 UTC (rev 312050)
@@ -62,6 +62,7 @@
   . Fixed bug #52496 (Zero exit code on option parsing failure). (Ilia)

 - cURL:
+  . Added ini option curl.cainfo (support for custom cert db). (Pierre)
   . Added CURLINFO_REDIRECT_URL support. (Daniel Stenberg, Pierre)
   . Added support for CURLOPT_MAX_RECV_SPEED_LARGE and
 CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815. (Pierrick)

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

[PHP-CVS] svn: /SVNROOT/ global_avail

2011-06-01 Thread Pierre Joye
pajoye   Wed, 01 Jun 2011 08:18:52 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311694

Log:
- duplicate entries

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-06-01 08:01:59 UTC (rev 311693)
+++ SVNROOT/global_avail2011-06-01 08:18:52 UTC (rev 311694)
@@ -345,8 +345,6 @@
 # Objective-C bridge
 avail|wez,jan|php/php-objc

-# php windows installer
-avail|jmertic|php/win-installer

 # DB2, SDO, IDS have tighter restrictions, so that IBM are not overly
 # legally encumbered.  If you have contributions for these two extensions,

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

[PHP-CVS] svn: /SVNROOT/ global_avail

2011-06-01 Thread Pierre Joye
pajoye   Wed, 01 Jun 2011 08:19:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311695

Log:
- CLA  trashbin

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-06-01 08:18:52 UTC (rev 311694)
+++ SVNROOT/global_avail2011-06-01 08:19:50 UTC (rev 311695)
@@ -356,10 +356,6 @@
 avail|gcc,cem,mfp,ansriniv,slaws,chm,rs|pecl/sdo
 avail|dbs,kraman,kfbombar,ambrish|pecl/pdo_ids,pecl/pdo_informix,pecl/pdo_ibm

-# PDO Specs. CLA required to commit
-unavail||php/php-src/*/ext/pdo/specs
-avail|wez,andi,stas,iliaa|php/php-src/*/ext/pdo/specs
-
 # preprocessor karma
 avail|merlin|pecl/preprocessor


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

[PHP-CVS] svn: /SVNROOT/ global_avail

2011-05-31 Thread Pierre Joye
pajoye   Tue, 31 May 2011 18:15:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311674

Log:
- amqp karma for jtansavatdi

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-05-31 17:44:40 UTC (rev 311673)
+++ SVNROOT/global_avail2011-05-31 18:15:49 UTC (rev 311674)
@@ -339,6 +339,8 @@
 avail|tpenner4d|pecl/pdo_4d,phpdoc
 avail|ianb|pecl/svm,phpdoc
 avail|michelec|pecl/rsync,phpdoc
+avail|dsr|pecl/sam,phpdoc
+avail|jtansavatdi|pecl/amqp,phpdoc

 # Objective-C bridge
 avail|wez,jan|php/php-objc
@@ -355,7 +357,6 @@
 avail|wez,dbs|php/php-src/*/ext/pdo_odbc
 avail|gcc,cem,mfp,ansriniv,slaws,chm,rs|pecl/sdo
 avail|dbs,kraman,kfbombar,ambrish|pecl/pdo_ids,pecl/pdo_informix,pecl/pdo_ibm
-avail|dsr|pecl/sam,phpdoc

 # PDO Specs. CLA required to commit
 unavail||php/php-src/*/ext/pdo/specs

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/dl.c branches/PHP_5_4/ext/standard/dl.c trunk/ext/standard/dl.c

2011-05-26 Thread Pierre Joye
pajoye   Thu, 26 May 2011 14:37:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311444

Log:
-fix bug 54935, php_win_err can lead to crash

Bug: http://bugs.php.net/54935 (Open) php_win_err can lead to crash
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/dl.c
U   php/php-src/branches/PHP_5_4/ext/standard/dl.c
U   php/php-src/trunk/ext/standard/dl.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-05-26 14:17:51 UTC (rev 311443)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-05-26 14:37:13 UTC (rev 311444)
@@ -21,10 +21,13 @@
 (Dmitry)

 - Core:
-  . Fixed a crash inside dtor for error handling. (Ilia)
   . Implemented FR #54459 (Range function accuracy). (Adam)
   . Added PHP_MANDIR constant telling where the manpages were installed into,
 and an --man-dir argument to php-config. (Hannes)
+
+  . Fixed a crash inside dtor for error handling. (Ilia)
+
+  . Fixed bug #54935 php_win_err can lead to crash. (Pierre)
   . Fixed bug #54895 (Fix compiling with older gcc version without need for
 membar_producer macro). (mhei at heimpold dot de)
   . Fixed bug #54723 (getimagesize() doesn't check the full ico signature).
@@ -35,13 +38,13 @@
 (CVE-2011-1148)
   . Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment).
 (tomas dot brastavicius at quantum dot lt, Pierrick)
-  . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
-TMPDIR on Windows). (Pierre)
   . Fixed bug #54866 (incorrect accounting for realpath_cache_size) (Dustin 
Ward)
   . Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt 
size)
 (Pierre, os at irj dot ru)
   . Fixed bug #50363 (Invalid parsing in convert.quoted-printable-decode 
filter).
 (slusarz at curecanti dot org)
+  . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
+TMPDIR on Windows). (Pierre)

 - Apache2 Handler SAPI:
   . Fixed bug #54529 (SAPI crashes on apache_config.c:197).

Modified: php/php-src/branches/PHP_5_3/ext/standard/dl.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/dl.c  2011-05-26 14:17:51 UTC 
(rev 311443)
+++ php/php-src/branches/PHP_5_3/ext/standard/dl.c  2011-05-26 14:37:13 UTC 
(rev 311444)
@@ -148,7 +148,7 @@
if (!handle) {
 #if PHP_WIN32
char *err = GET_DL_ERROR();
-   if (err) {
+   if (err  (*err != )) {
php_error_docref(NULL TSRMLS_CC, error_type, Unable to 
load dynamic library '%s' - %s, libpath, err);
LocalFree(err);
} else {

Modified: php/php-src/branches/PHP_5_4/ext/standard/dl.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/dl.c  2011-05-26 14:17:51 UTC 
(rev 311443)
+++ php/php-src/branches/PHP_5_4/ext/standard/dl.c  2011-05-26 14:37:13 UTC 
(rev 311444)
@@ -145,7 +145,7 @@
if (!handle) {
 #if PHP_WIN32
char *err = GET_DL_ERROR();
-   if (err) {
+   if (err  (*err != )) {
php_error_docref(NULL TSRMLS_CC, error_type, Unable to 
load dynamic library '%s' - %s, libpath, err);
LocalFree(err);
} else {

Modified: php/php-src/trunk/ext/standard/dl.c
===
--- php/php-src/trunk/ext/standard/dl.c 2011-05-26 14:17:51 UTC (rev 311443)
+++ php/php-src/trunk/ext/standard/dl.c 2011-05-26 14:37:13 UTC (rev 311444)
@@ -145,7 +145,7 @@
if (!handle) {
 #if PHP_WIN32
char *err = GET_DL_ERROR();
-   if (err) {
+   if (err  (*err != )) {
php_error_docref(NULL TSRMLS_CC, error_type, Unable to 
load dynamic library '%s' - %s, libpath, err);
LocalFree(err);
} else {

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/standard/filestat.c branches/PHP_5_4/ext/standard/tests/file/userstreams_007.phpt branches/PHP_5_4/main/php_streams.h branch

2011-05-25 Thread Pierre Joye
hi,

Besides that, did we even approve that change? Gustavo and I were two
that did not like the current implemenation/design.

Cheers,

On Wed, May 25, 2011 at 11:24 PM, Stas Malyshev smalys...@gmail.com wrote:
 Hi!

 There seem to be a lot of unrelated code cleanup here, and I am in
 general a bit confused in this code.
 Could you review http://php.net/streamwrapper and write up the changes to
 it?


 There shouldn't be any changes except for adding one stream handler (see
 rfc: https://wiki.php.net/rfc/streammetadata) and adding support for it.
 I'll add docs for it soon.




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/standard/filestat.c branches/PHP_5_4/ext/standard/tests/file/userstreams_007.phpt branches/PHP_5_4/main/php_streams.h branch

2011-05-25 Thread Pierre Joye
On Thu, May 26, 2011 at 12:04 AM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Besides that, did we even approve that change? Gustavo and I were two
 that did not like the current implemenation/design.

 There were no objections and/or proposals for improving it since I posted
 the patch, which as about 2 months ago, so I assumed it's ok. If you have
 any specific ideas how to improve it, please tell.

No time to actually proper design and propose alternatives yet. That
does mean we have to accept something just because it is ready.
Sorry

-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/standard/tests/strings/ 006-win32.phpt 006.phpt

2011-05-24 Thread Pierre Joye
pajoye   Tue, 24 May 2011 09:44:55 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311383

Log:
- make svn-eol LF and use one test for unix and windows

Changed paths:
D   php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006-win32.phpt
UU  php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006.phpt

Deleted: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006-win32.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006-win32.phpt  
2011-05-24 09:40:35 UTC (rev 311382)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006-win32.phpt  
2011-05-24 09:44:55 UTC (rev 311383)
@@ -1,23 +0,0 @@
---TEST--
-highlight_file() and output buffer
---SKIPIF--
-?php if( substr(PHP_OS, 0, 3) != WIN) die('skip Windows only test');?
---INI--
-log_errors_max_len=4096
---FILE--
-?php
-
-$file = str_repeat(A, 1024);
-
-var_dump(highlight_file($file, true));
-var_dump(ob_get_contents());
-
-?
-===DONE===
---EXPECTF--
-Warning: 
highlight_file(!
 ): failed to open 
stream: No such file or directory in %s on line %d
-
-Warning: highlight_file(): Failed opening 
'A!
 
AAA'
 for highlighting in %s on line %d
-bool(false)
-bool(false)
-===DONE===

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006.phpt
2011-05-24 09:40:35 UTC (rev 311382)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006.phpt
2011-05-24 09:44:55 UTC (rev 311383)
@@ -1,7 +1,5 @@
 --TEST--
 highlight_file() and output buffer
---SKIPIF--
-?php if( substr(PHP_OS, 0, 3) == WIN) die('skip Non windows test');?
 --INI--
 log_errors_max_len=4096
 --FILE--


Property changes on: 
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/006.phpt
___
Modified: svn:eol-style
   - native
   + LF

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/standard/tests/strings/ addslashes_variation2.phpt addslashes_variation3.phpt bug21453.phpt chop_variation3.phpt chunk_split_variation11.phpt chunk_spl

2011-05-24 Thread Pierre Joye
pajoye   Tue, 24 May 2011 10:23:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311384

Log:
- fix tests, keep EOL as unix style as the str len is used in expectf

Changed paths:
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/addslashes_variation2.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/addslashes_variation3.phpt
_U  php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug21453.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chop_variation3.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation11.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation12.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crc32_variation2.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crc32_variation3.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crc32_variation4.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/highlight_file.phpt
_U  php/php-src/branches/PHP_5_3/ext/standard/tests/strings/lcfirst.phpt
_U  php/php-src/branches/PHP_5_3/ext/standard/tests/strings/ltrim.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/nl2br_variation2.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/php_strip_whitespace.phpt
_U  php/php-src/branches/PHP_5_3/ext/standard/tests/strings/rtrim.phpt
_U  php/php-src/branches/PHP_5_3/ext/standard/tests/strings/sprintf_f_2.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/sprintf_variation15.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/str_ireplace.phpt
_U  php/php-src/branches/PHP_5_3/ext/standard/tests/strings/str_replace.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/str_word_count.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strcspn_variation6.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strcspn_variation7.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strcspn_variation8.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripos_variation1.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripos_variation3.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripos_variation4.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripos_variation5.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripos_variation6.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripslashes_variation2.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripslashes_variation3.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripslashes_variation4.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/stripslashes_variation5.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strncasecmp_variation9.phpt
_U  php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strpos.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrchr_variation1.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrchr_variation2.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrchr_variation3.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrchr_variation4.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrchr_variation6.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrchr_variation7.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrev_variation3.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrev_variation4.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strripos_variation1.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strripos_variation2.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strripos_variation3.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strripos_variation4.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strripos_variation5.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrpos_variation1.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrpos_variation2.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrpos_variation3.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrpos_variation4.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrpos_variation5.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strrpos_variation6.phpt
_U  
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/strspn_variation5.phpt
_U  

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/php_crypt_r.c branches/PHP_5_3/ext/standard/tests/strings/bug54721.phpt branches/PHP_5_4/ext/standard/php_crypt_r.c bra

2011-05-24 Thread Pierre Joye
pajoye   Tue, 24 May 2011 13:48:04 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311390

Log:
- Fix #54721, different Hashes on Windows, BSD and Linux on wrong Salt size

Bug: http://bugs.php.net/54721 (Feedback) crypt function 
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c
A   php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54721.phpt
U   php/php-src/branches/PHP_5_4/ext/standard/php_crypt_r.c
A   php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug54721.phpt
U   php/php-src/trunk/ext/standard/php_crypt_r.c
A   php/php-src/trunk/ext/standard/tests/strings/bug54721.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-05-24 13:44:57 UTC (rev 311389)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-05-24 13:48:04 UTC (rev 311390)
@@ -37,8 +37,10 @@
 (tomas dot brastavicius at quantum dot lt, Pierrick)
   . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
 TMPDIR on Windows). (Pierre)
-  . Fixed bug 54866 (incorrect accounting for realpath_cache_size) (Dustin 
Ward)
-
+  . Fixed bug #54866 (incorrect accounting for realpath_cache_size) (Dustin 
Ward)
+  . Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt 
size)
+(Pierre, os at irj dot ru)
+
 - Apache2 Handler SAPI:
   . Fixed bug #54529 (SAPI crashes on apache_config.c:197).
 (hebergement at riastudio dot fr)

Modified: php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c 2011-05-24 
13:44:57 UTC (rev 311389)
+++ php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c 2011-05-24 
13:48:04 UTC (rev 311390)
@@ -197,7 +197,7 @@
goto _destroyCtx1;
}

-   dwHashLen = pwl + sl + pwl;
+   dwHashLen = 16;
CryptGetHashParam(ctx1, HP_HASHVAL, final, dwHashLen, 0);
/*  MD5(pw,salt,pw). Valid. */


Added: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54721.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54721.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54721.phpt   
2011-05-24 13:48:04 UTC (rev 311390)
@@ -0,0 +1,20 @@
+--TEST--
+Bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt size)
+--FILE--
+?php
+echo crypt(, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(b, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(bu, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(bug, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(pass, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(buged, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(a , '$1$dW0.is5.$10CH101gGOr1677ZYd517.') 
. \n;
+?
+--EXPECT--
+$1$dW0.is5.$I0iqTYHPzkP4YnRgnXxZW0
+$1$dW0.is5.$KaspRpPQ9U7Xb5Vv5c.WE/
+$1$dW0.is5.$X9G1x/Ep8zYQSrU4/lKUg.
+$1$dW0.is5.$wE5Rz/HxPtDMfqil6kK980
+$1$dW0.is5.$2E4/ZDY1vr73HqLl1bLs9.
+$1$dW0.is5.$lvGhphTQwqgKxWhWwYERr1
+$1$dW0.is5.$XzsWcLSBj2BvhOKH0xdpZ0

Modified: php/php-src/branches/PHP_5_4/ext/standard/php_crypt_r.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/php_crypt_r.c 2011-05-24 
13:44:57 UTC (rev 311389)
+++ php/php-src/branches/PHP_5_4/ext/standard/php_crypt_r.c 2011-05-24 
13:48:04 UTC (rev 311390)
@@ -197,7 +197,7 @@
goto _destroyCtx1;
}

-   dwHashLen = pwl + sl + pwl;
+   dwHashLen = 16;
CryptGetHashParam(ctx1, HP_HASHVAL, final, dwHashLen, 0);
/*  MD5(pw,salt,pw). Valid. */


Added: php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug54721.phpt
===
--- php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug54721.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug54721.phpt   
2011-05-24 13:48:04 UTC (rev 311390)
@@ -0,0 +1,20 @@
+--TEST--
+Bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt size)
+--FILE--
+?php
+echo crypt(, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(b, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(bu, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(bug, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(pass, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(buged, '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . \n;
+echo crypt(a , '$1$dW0.is5.$10CH101gGOr1677ZYd517.') 
. \n;
+?
+--EXPECT--
+$1$dW0.is5.$I0iqTYHPzkP4YnRgnXxZW0

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/build/libs_version.txt branches/PHP_5_4/win32/build/libs_version.txt trunk/win32/build/libs_version.txt

2011-05-19 Thread Pierre Joye
pajoye   Thu, 19 May 2011 13:36:29 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311255

Log:
- initial import, will add all libs later

Changed paths:
A   php/php-src/branches/PHP_5_3/win32/build/libs_version.txt
A   php/php-src/branches/PHP_5_4/win32/build/libs_version.txt
A   php/php-src/trunk/win32/build/libs_version.txt

Added: php/php-src/branches/PHP_5_3/win32/build/libs_version.txt
===
--- php/php-src/branches/PHP_5_3/win32/build/libs_version.txt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/win32/build/libs_version.txt   2011-05-19 
13:36:29 UTC (rev 311255)
@@ -0,0 +1 @@
+libcurl-7.21.6

Added: php/php-src/branches/PHP_5_4/win32/build/libs_version.txt
===
--- php/php-src/branches/PHP_5_4/win32/build/libs_version.txt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/win32/build/libs_version.txt   2011-05-19 
13:36:29 UTC (rev 311255)
@@ -0,0 +1 @@
+libcurl-7.21.6

Added: php/php-src/trunk/win32/build/libs_version.txt
===
--- php/php-src/trunk/win32/build/libs_version.txt  
(rev 0)
+++ php/php-src/trunk/win32/build/libs_version.txt  2011-05-19 13:36:29 UTC 
(rev 311255)
@@ -0,0 +1 @@
+libcurl-7.21.6

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c

2011-05-17 Thread Pierre Joye
pajoye   Tue, 17 May 2011 10:39:18 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311123

Log:
- WS

Changed paths:
U   php/php-src/branches/PHP_5_4/Zend/zend_compile.c
U   php/php-src/trunk/Zend/zend_compile.c

Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-05-17 09:44:11 UTC 
(rev 311122)
+++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-05-17 10:39:18 UTC 
(rev 311123)
@@ -2256,7 +2256,7 @@
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
CG(zend_lineno) = opline-lineno;
-   zend_error(E_COMPILE_ERROR, 'goto' to undefined label '%s', 
Z_STRVAL_P(label));
+   zend_error(E_COMPILE_ERROR, 'goto' to undefined label 
'%s', Z_STRVAL_P(label));
} else {
/* Label is not defined. Delay to pass 2. */
INC_BPC(op_array);

Modified: php/php-src/trunk/Zend/zend_compile.c
===
--- php/php-src/trunk/Zend/zend_compile.c   2011-05-17 09:44:11 UTC (rev 
311122)
+++ php/php-src/trunk/Zend/zend_compile.c   2011-05-17 10:39:18 UTC (rev 
311123)
@@ -2256,7 +2256,7 @@
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
CG(zend_lineno) = opline-lineno;
-   zend_error(E_COMPILE_ERROR, 'goto' to undefined label '%s', 
Z_STRVAL_P(label));
+   zend_error(E_COMPILE_ERROR, 'goto' to undefined label 
'%s', Z_STRVAL_P(label));
} else {
/* Label is not defined. Delay to pass 2. */
INC_BPC(op_array);

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

Re: [PHP-CVS] svn: /php/php-src/trunk/ UPGRADING ext/simplexml/simplexml.c ext/simplexml/tests/034.phpt ext/simplexml/tests/bug51615.phpt

2011-05-17 Thread Pierre Joye
hi,

Whatever fits for you for this commit.

For the next commits, please try to commit to all branches at once,
see https://wiki.php.net/vcs/svnfaq about how to do a sparse checkout,
then you can simply do a commit like:

cd php-src
svn commit branches/PHP_5_4 trunk/

Cheers,

On Tue, May 17, 2011 at 4:43 PM, Andrew Curioso acuri...@php.net wrote:
 I didn't realize that branch was created. It should be in PHP_5_4, yes.

 I'm new to the team... so can you help me out? What is the standard way to
 do that?
 Using svn merge or just patch the code directly in the branch?

 Thanks in advance,
 - Andrew


 On Tue, May 17, 2011 at 10:26 AM, Kalle Sommer Nielsen ka...@php.netwrote:

 Hi

 2011/5/17 Andrew Curioso acuri...@php.net:
  acurioso                                 Tue, 17 May 2011 13:50:48 +
 
  Revision: http://svn.php.net/viewvc?view=revisionrevision=311138
 
  Log:
  Use iterator when necessary to get the full properties hash - consistent
 with count (see test: ext/simplexml/tests/034.phpt)

 Shouldn't this be merged to PHP_5_4 aswell?

 --
 regards,

 Kalle Sommer Nielsen
 ka...@php.net





-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/main/ php_version.h

2011-05-15 Thread Pierre Joye
pajoye   Sun, 15 May 2011 20:07:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=311062

Log:
- version

Changed paths:
U   php/php-src/branches/PHP_5_4/main/php_version.h

Modified: php/php-src/branches/PHP_5_4/main/php_version.h
===
--- php/php-src/branches/PHP_5_4/main/php_version.h 2011-05-15 18:32:17 UTC 
(rev 311061)
+++ php/php-src/branches/PHP_5_4/main/php_version.h 2011-05-15 20:07:33 UTC 
(rev 311062)
@@ -1,8 +1,8 @@
 /* automatically generated by configure */
 /* edit configure.in to change version number */
 #define PHP_MAJOR_VERSION 5
-#define PHP_MINOR_VERSION 3
-#define PHP_RELEASE_VERSION 99
+#define PHP_MINOR_VERSION 4
+#define PHP_RELEASE_VERSION 0
 #define PHP_EXTRA_VERSION -dev
-#define PHP_VERSION 5.3.99-dev
-#define PHP_VERSION_ID 50399
+#define PHP_VERSION 5.4.0-dev
+#define PHP_VERSION_ID 50400

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/tokenizer/tokenizer_data.c trunk/ext/tokenizer/tokenizer_data.c

2011-05-14 Thread Pierre Joye
hi Stas,

what's that?


While we must begin soonish with 5.4 release process, we MUST adopt
the RFC before anything happen officially.

Cheers,

On Sun, May 15, 2011 at 2:48 AM, Stanislav Malyshev s...@php.net wrote:
 stas                                     Sun, 15 May 2011 00:48:05 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=311034

 Log:
 forgot tokenizer...

 Changed paths:
    U   php/php-src/branches/PHP_5_4/ext/tokenizer/tokenizer_data.c
    U   php/php-src/trunk/ext/tokenizer/tokenizer_data.c

 Modified: php/php-src/branches/PHP_5_4/ext/tokenizer/tokenizer_data.c
 ===
 --- php/php-src/branches/PHP_5_4/ext/tokenizer/tokenizer_data.c 2011-05-15 
 00:40:12 UTC (rev 311033)
 +++ php/php-src/branches/PHP_5_4/ext/tokenizer/tokenizer_data.c 2011-05-15 
 00:48:05 UTC (rev 311034)
 @@ -136,14 +136,6 @@
        REGISTER_LONG_CONSTANT(T_DOUBLE_ARROW, T_DOUBLE_ARROW, CONST_CS | 
 CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_LIST, T_LIST, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_ARRAY, T_ARRAY, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_BOOL_HINT, T_BOOL_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_STRING_HINT, T_STRING_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_INT_HINT, T_INT_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_DOUBLE_HINT, T_DOUBLE_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_RESOURCE_HINT, T_RESOURCE_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_OBJECT_HINT, T_OBJECT_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_SCALAR_HINT, T_SCALAR_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_NUMERIC_HINT, T_NUMERIC_HINT, CONST_CS | 
 CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_CLASS_C, T_CLASS_C, CONST_CS | 
 CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_METHOD_C, T_METHOD_C, CONST_CS | 
 CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_FUNC_C, T_FUNC_C, CONST_CS | 
 CONST_PERSISTENT);
 @@ -278,14 +270,6 @@
                case T_DOUBLE_ARROW: return T_DOUBLE_ARROW;
                case T_LIST: return T_LIST;
                case T_ARRAY: return T_ARRAY;
 -               case T_BOOL_HINT: return T_BOOL_HINT;
 -               case T_STRING_HINT: return T_STRING_HINT;
 -               case T_INT_HINT: return T_INT_HINT;
 -               case T_DOUBLE_HINT: return T_DOUBLE_HINT;
 -               case T_RESOURCE_HINT: return T_RESOURCE_HINT;
 -               case T_OBJECT_HINT: return T_OBJECT_HINT;
 -               case T_SCALAR_HINT: return T_SCALAR_HINT;
 -               case T_NUMERIC_HINT: return T_NUMERIC_HINT;
                case T_CLASS_C: return T_CLASS_C;
                case T_METHOD_C: return T_METHOD_C;
                case T_FUNC_C: return T_FUNC_C;

 Modified: php/php-src/trunk/ext/tokenizer/tokenizer_data.c
 ===
 --- php/php-src/trunk/ext/tokenizer/tokenizer_data.c    2011-05-15 00:40:12 
 UTC (rev 311033)
 +++ php/php-src/trunk/ext/tokenizer/tokenizer_data.c    2011-05-15 00:48:05 
 UTC (rev 311034)
 @@ -136,14 +136,6 @@
        REGISTER_LONG_CONSTANT(T_DOUBLE_ARROW, T_DOUBLE_ARROW, CONST_CS | 
 CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_LIST, T_LIST, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_ARRAY, T_ARRAY, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_BOOL_HINT, T_BOOL_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_STRING_HINT, T_STRING_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_INT_HINT, T_INT_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_DOUBLE_HINT, T_DOUBLE_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_RESOURCE_HINT, T_RESOURCE_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_OBJECT_HINT, T_OBJECT_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_SCALAR_HINT, T_SCALAR_HINT, CONST_CS | 
 CONST_PERSISTENT);
 -       REGISTER_LONG_CONSTANT(T_NUMERIC_HINT, T_NUMERIC_HINT, CONST_CS | 
 CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_CLASS_C, T_CLASS_C, CONST_CS | 
 CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_METHOD_C, T_METHOD_C, CONST_CS | 
 CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT(T_FUNC_C, T_FUNC_C, CONST_CS | 
 CONST_PERSISTENT);
 @@ -278,14 +270,6 @@
                case T_DOUBLE_ARROW: return T_DOUBLE_ARROW;
                case T_LIST: return T_LIST;
                case T_ARRAY: return T_ARRAY;
 -               case T_BOOL_HINT: return T_BOOL_HINT;
 -               case T_STRING_HINT: return T_STRING_HINT;
 -               case T_INT_HINT: return T_INT_HINT;
 -               case T_DOUBLE_HINT: return T_DOUBLE_HINT;
 -               case T_RESOURCE_HINT: return 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pcre/pcrelib/pcre_internal.h trunk/ext/pcre/pcrelib/pcre_internal.h

2011-05-13 Thread Pierre Joye
Patch has been sent upstream. That's why we have it as patch here and a
readme that should be read :)

On 13 May 2011 15:51, Scott MacVicar scott...@php.net wrote:
 scottmac Fri, 13 May 2011 13:51:07 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=310991

 Log:
 Fix Windows build, this really should be in a patch file / README.

 I'll fix this up later.

 Changed paths:
 U php/php-src/branches/PHP_5_3/ext/pcre/pcrelib/pcre_internal.h
 U php/php-src/trunk/ext/pcre/pcrelib/pcre_internal.h

 Modified: php/php-src/branches/PHP_5_3/ext/pcre/pcrelib/pcre_internal.h
 ===
 --- php/php-src/branches/PHP_5_3/ext/pcre/pcrelib/pcre_internal.h
2011-05-13 13:47:50 UTC (rev 310990)
 +++ php/php-src/branches/PHP_5_3/ext/pcre/pcrelib/pcre_internal.h
2011-05-13 13:51:07 UTC (rev 310991)
 @@ -192,7 +192,9 @@
 have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be
set
 by configure. */

 -#if HAVE_STDINT_H
 +#ifdef PHP_WIN32
 +#include win32/php_stdint.h
 +#elif HAVE_STDINT_H
 #include stdint.h
 #elif HAVE_INTTYPES_H
 #include inttypes.h

 Modified: php/php-src/trunk/ext/pcre/pcrelib/pcre_internal.h
 ===
 --- php/php-src/trunk/ext/pcre/pcrelib/pcre_internal.h 2011-05-13 13:47:50
UTC (rev 310990)
 +++ php/php-src/trunk/ext/pcre/pcrelib/pcre_internal.h 2011-05-13 13:51:07
UTC (rev 310991)
 @@ -192,7 +192,9 @@
 have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be
set
 by configure. */

 -#if HAVE_STDINT_H
 +#ifdef PHP_WIN32
 +#include win32/php_stdint.h
 +#elif HAVE_STDINT_H
 #include stdint.h
 #elif HAVE_INTTYPES_H
 #include inttypes.h



[PHP-CVS] svn: /SVNROOT/ global_avail

2011-05-09 Thread Pierre Joye
pajoye   Mon, 09 May 2011 16:28:02 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=310858

Log:
- gearman karma for Herman

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-05-09 16:22:54 UTC (rev 310857)
+++ SVNROOT/global_avail2011-05-09 16:28:02 UTC (rev 310858)
@@ -309,7 +309,7 @@
 avail|kannan,veeve,cjiang|pecl/xhprof,phpdoc
 avail|bhuisgen|pecl/htscanner
 avail|splanquart,fourd|pecl/pdo_4d
-avail|jluedke|pecl/gearman
+avail|jluedke,hradtke|pecl/gearman
 avail|jluedke|pecl/drizzle
 avail|vito,mkoppanen|pecl/gmagick
 avail|santiago|pecl/gupnp,pecl/sphinx

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/tidy/tidy.c trunk/ext/tidy/tidy.c

2011-04-25 Thread Pierre Joye
On Mon, Apr 25, 2011 at 9:46 AM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Mon, Apr 25, 2011 at 00:08, Pierre Joye paj...@php.net wrote:
 pajoye                                   Sun, 24 Apr 2011 22:08:11 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=310457

 Log:
 - fix use of unitiliazed var

 Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
    U   php/php-src/trunk/ext/tidy/tidy.c

 Modified: php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
 ===
 --- php/php-src/branches/PHP_5_3/ext/tidy/tidy.c        2011-04-24 20:47:22 
 UTC (rev 310456)
 +++ php/php-src/branches/PHP_5_3/ext/tidy/tidy.c        2011-04-24 22:08:11 
 UTC (rev 310457)
 @@ -985,10 +985,10 @@
                case is_body_node:
                        node = tidyGetBody(obj-ptdoc-doc);
                        break;
 -       }

 -       if (!node) {
 -               RETURN_NULL();
 +               default:
 +                       RETURN_NULL();
 +                       break;


 What happens if those functions actually fail?

There is  no functional change here, only that inode is now used only
if initialized. The behavior of this code when this function returns
NULL remains the same.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/tidy/tidy.c trunk/ext/tidy/tidy.c

2011-04-25 Thread Pierre Joye
pajoye   Mon, 25 Apr 2011 09:28:08 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=310466

Log:
- keep inode creation check

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
U   php/php-src/trunk/ext/tidy/tidy.c

Modified: php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
===
--- php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2011-04-25 07:50:07 UTC 
(rev 310465)
+++ php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2011-04-25 09:28:08 UTC 
(rev 310466)
@@ -991,6 +991,10 @@
break;
}

+   if (!inode) {
+   RETURN_NULL();
+   }
+
tidy_instanciate(tidy_ce_node, return_value TSRMLS_CC);
newobj = (PHPTidyObj *) zend_object_store_get_object(return_value 
TSRMLS_CC);
newobj-type  = is_node;

Modified: php/php-src/trunk/ext/tidy/tidy.c
===
--- php/php-src/trunk/ext/tidy/tidy.c   2011-04-25 07:50:07 UTC (rev 310465)
+++ php/php-src/trunk/ext/tidy/tidy.c   2011-04-25 09:28:08 UTC (rev 310466)
@@ -987,6 +987,10 @@
break;
}

+   if (!inode) {
+   RETURN_NULL();
+   }
+
tidy_instanciate(tidy_ce_node, return_value TSRMLS_CC);
newobj = (PHPTidyObj *) zend_object_store_get_object(return_value 
TSRMLS_CC);
newobj-type  = is_node;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/tidy/tidy.c trunk/ext/tidy/tidy.c

2011-04-25 Thread Pierre Joye
pajoye   Mon, 25 Apr 2011 09:31:00 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=310467

Log:
- keep node creation check

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
U   php/php-src/trunk/ext/tidy/tidy.c

Modified: php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
===
--- php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2011-04-25 09:28:08 UTC 
(rev 310466)
+++ php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2011-04-25 09:31:00 UTC 
(rev 310467)
@@ -991,7 +991,7 @@
break;
}

-   if (!inode) {
+   if (!node) {
RETURN_NULL();
}


Modified: php/php-src/trunk/ext/tidy/tidy.c
===
--- php/php-src/trunk/ext/tidy/tidy.c   2011-04-25 09:28:08 UTC (rev 310466)
+++ php/php-src/trunk/ext/tidy/tidy.c   2011-04-25 09:31:00 UTC (rev 310467)
@@ -987,7 +987,7 @@
break;
}

-   if (!inode) {
+   if (!node) {
RETURN_NULL();
}


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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/tidy/tidy.c trunk/ext/tidy/tidy.c

2011-04-24 Thread Pierre Joye
pajoye   Sun, 24 Apr 2011 22:08:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=310457

Log:
- fix use of unitiliazed var

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
U   php/php-src/trunk/ext/tidy/tidy.c

Modified: php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
===
--- php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2011-04-24 20:47:22 UTC 
(rev 310456)
+++ php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2011-04-24 22:08:11 UTC 
(rev 310457)
@@ -985,10 +985,10 @@
case is_body_node:
node = tidyGetBody(obj-ptdoc-doc);
break;
-   }

-   if (!node) {
-   RETURN_NULL();
+   default:
+   RETURN_NULL();
+   break;
}

tidy_instanciate(tidy_ce_node, return_value TSRMLS_CC);

Modified: php/php-src/trunk/ext/tidy/tidy.c
===
--- php/php-src/trunk/ext/tidy/tidy.c   2011-04-24 20:47:22 UTC (rev 310456)
+++ php/php-src/trunk/ext/tidy/tidy.c   2011-04-24 22:08:11 UTC (rev 310457)
@@ -981,10 +981,10 @@
case is_body_node:
node = tidyGetBody(obj-ptdoc-doc);
break;
-   }

-   if (!node) {
-   RETURN_NULL();
+   default:
+   RETURN_NULL();
+   break;
}

tidy_instanciate(tidy_ce_node, return_value TSRMLS_CC);

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/main.c trunk/main/main.c

2011-04-19 Thread Pierre Joye
pajoye   Tue, 19 Apr 2011 21:43:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=310369

Log:
- fix build (btw, has novell man pages too?)

Changed paths:
U   php/php-src/branches/PHP_5_3/main/main.c
U   php/php-src/trunk/main/main.c

Modified: php/php-src/branches/PHP_5_3/main/main.c
===
--- php/php-src/branches/PHP_5_3/main/main.c2011-04-19 18:57:55 UTC (rev 
310368)
+++ php/php-src/branches/PHP_5_3/main/main.c2011-04-19 21:43:22 UTC (rev 
310369)
@@ -1938,7 +1938,9 @@
REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTENSION_DIR, PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_PREFIX, PHP_PREFIX, 
sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_BINDIR, PHP_BINDIR, 
sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS);
+#ifndef PHP_WIN32
REGISTER_MAIN_STRINGL_CONSTANT(PHP_MANDIR, PHP_MANDIR, 
sizeof(PHP_MANDIR)-1, CONST_PERSISTENT | CONST_CS);
+#endif
REGISTER_MAIN_STRINGL_CONSTANT(PHP_LIBDIR, PHP_LIBDIR, 
sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_DATADIR, PHP_DATADIR, 
sizeof(PHP_DATADIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_SYSCONFDIR, PHP_SYSCONFDIR, 
sizeof(PHP_SYSCONFDIR)-1, CONST_PERSISTENT | CONST_CS);

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-04-19 18:57:55 UTC (rev 310368)
+++ php/php-src/trunk/main/main.c   2011-04-19 21:43:22 UTC (rev 310369)
@@ -1863,7 +1863,13 @@
 #else
php_os=PHP_OS;
 #endif
-
+   {
+   char dll_dir[MAX_PATH];
+   sprintf(dll_dir, %s\\%s, module_path, ..\\..\\deps\\bin);
+   SetDllDirectory(dll_dir);
+   }
+// GetModuleFileName (NULL, module_path, MAX_PATH);
+//__debugbreak();
 #ifdef ZTS
tsrm_ls = ts_resource(0);
 #endif
@@ -1979,7 +1985,9 @@
REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTENSION_DIR, PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_PREFIX, PHP_PREFIX, 
sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_BINDIR, PHP_BINDIR, 
sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS);
+#ifndef PHP_WIN32
REGISTER_MAIN_STRINGL_CONSTANT(PHP_MANDIR, PHP_MANDIR, 
sizeof(PHP_MANDIR)-1, CONST_PERSISTENT | CONST_CS);
+#endif
REGISTER_MAIN_STRINGL_CONSTANT(PHP_LIBDIR, PHP_LIBDIR, 
sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_DATADIR, PHP_DATADIR, 
sizeof(PHP_DATADIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_SYSCONFDIR, PHP_SYSCONFDIR, 
sizeof(PHP_SYSCONFDIR)-1, CONST_PERSISTENT | CONST_CS);

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2011-04-19 Thread Pierre Joye
pajoye   Tue, 19 Apr 2011 21:57:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=310370

Log:
- not desired yt

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-04-19 21:43:22 UTC (rev 310369)
+++ php/php-src/trunk/main/main.c   2011-04-19 21:57:01 UTC (rev 310370)
@@ -1863,13 +1863,7 @@
 #else
php_os=PHP_OS;
 #endif
-   {
-   char dll_dir[MAX_PATH];
-   sprintf(dll_dir, %s\\%s, module_path, ..\\..\\deps\\bin);
-   SetDllDirectory(dll_dir);
-   }
-// GetModuleFileName (NULL, module_path, MAX_PATH);
-//__debugbreak();
+
 #ifdef ZTS
tsrm_ls = ts_resource(0);
 #endif

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/string.c branches/PHP_5_3/ext/standard/tests/strings/bug54238.phpt trunk/ext/standard/string.c trunk/ext/standard/t

2011-04-13 Thread Pierre Joye
hi Stas,

please add the CVE to the news entry.

On Wed, Apr 13, 2011 at 8:32 AM, Stanislav Malyshev s...@php.net wrote:
 stas                                     Wed, 13 Apr 2011 06:32:41 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=310194

 Log:
 fix bug #54238 (use-after-free in substr_replace())

 Bug: http://bugs.php.net/54238 (error getting bug information)

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/standard/string.c
    A   php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54238.phpt
    U   php/php-src/trunk/ext/standard/string.c
    A   php/php-src/trunk/ext/standard/tests/strings/bug54238.phpt


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




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c

2011-04-01 Thread Pierre Joye
pajoye   Fri, 01 Apr 2011 17:10:52 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309880

Log:
- [doc] add ini option to set the default cainfo file, in case none was set at 
compile time

Changed paths:
U   php/php-src/trunk/ext/curl/interface.c

Modified: php/php-src/trunk/ext/curl/interface.c
===
--- php/php-src/trunk/ext/curl/interface.c  2011-04-01 16:00:11 UTC (rev 
309879)
+++ php/php-src/trunk/ext/curl/interface.c  2011-04-01 17:10:52 UTC (rev 
309880)
@@ -329,6 +329,13 @@
 ZEND_GET_MODULE (curl)
 #endif

+/* {{{ PHP_INI_BEGIN */
+PHP_INI_BEGIN()
+   PHP_INI_ENTRY(curl.cainfo, , PHP_INI_SYSTEM, NULL)
+PHP_INI_END()
+/* }}} */
+
+/* }}} */
 /* {{{ PHP_MINFO_FUNCTION
  */
 PHP_MINFO_FUNCTION(curl)
@@ -456,6 +463,8 @@
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, 
curl, module_number);
le_curl_multi_handle = 
zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl_multi, 
module_number);

+   REGISTER_INI_ENTRIES();
+
/* See http://curl.haxx.se/lxr/source/docs/libcurl/symbols-in-versions
   or curl src/docs/libcurl/symbols-in-versions for a (almost) complete 
list
   of options and which version they were introduced */
@@ -882,6 +891,7 @@
php_curl_openssl_tsl = NULL;
}
 #endif
+   UNREGISTER_INI_ENTRIES();
return SUCCESS;
 }
 /* }}} */
@@ -1430,6 +1440,7 @@
zval*clone;
char*url = NULL;
int url_len = 0;
+   char *cainfo;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, url, 
url_len) == FAILURE) {
return;
@@ -1468,6 +1479,12 @@
curl_easy_setopt(ch-cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
curl_easy_setopt(ch-cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
curl_easy_setopt(ch-cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite 
redirects */
+
+   cainfo = INI_STR(curl.cainfo);
+   if (cainfo  strlen(cainfo)  0) {
+   curl_easy_setopt(ch-cp, CURLOPT_CAINFO, cainfo);
+   }
+
 #if defined(ZTS)
curl_easy_setopt(ch-cp, CURLOPT_NOSIGNAL, 1);
 #endif

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c

2011-04-01 Thread Pierre Joye
pajoye   Fri, 01 Apr 2011 17:19:08 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309881

Log:
- add CURLINFO_REDIRECT_URL

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
U   php/php-src/trunk/ext/curl/interface.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-04-01 17:10:52 UTC (rev 309880)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-04-01 17:19:08 UTC (rev 309881)
@@ -13,6 +13,8 @@
 (tomas dot brastavicius at quantum dot lt, Pierrick)
. Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
  TMPDIR on Windows). (Pierre)
+- cURL
+  . Added CURLINFO_REDIRECT_URL support. (Daniel Stenberg, Pierre)

 - DateTime extension:
   . Fixed bug #54340 (DateTime::add() method bug). (Adam)

Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c   2011-04-01 17:10:52 UTC 
(rev 309880)
+++ php/php-src/branches/PHP_5_3/ext/curl/interface.c   2011-04-01 17:19:08 UTC 
(rev 309881)
@@ -331,6 +331,13 @@
 ZEND_GET_MODULE (curl)
 #endif

+/* {{{ PHP_INI_BEGIN */
+PHP_INI_BEGIN()
+   PHP_INI_ENTRY(curl.cainfo, , PHP_INI_SYSTEM, NULL)
+PHP_INI_END()
+/* }}} */
+
+/* }}} */
 /* {{{ PHP_MINFO_FUNCTION
  */
 PHP_MINFO_FUNCTION(curl)
@@ -458,6 +465,8 @@
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, 
curl, module_number);
le_curl_multi_handle = 
zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl_multi, 
module_number);

+   REGISTER_INI_ENTRIES();
+
/* See http://curl.haxx.se/lxr/source/docs/libcurl/symbols-in-versions
   or curl src/docs/libcurl/symbols-in-versions for a (almost) complete 
list
   of options and which version they were introduced */
@@ -632,7 +641,11 @@
 #if LIBCURL_VERSION_NUM   0x071301
REGISTER_CURL_CONSTANT(CURLINFO_CERTINFO);
 #endif
+#if LIBCURL_VERSION_NUM = 0x071202
+REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL);
+#endif

+
/* cURL protocol constants (curl_version) */
REGISTER_CURL_CONSTANT(CURL_VERSION_IPV6);
REGISTER_CURL_CONSTANT(CURL_VERSION_KERBEROS4);
@@ -879,6 +892,7 @@
php_curl_openssl_tsl = NULL;
}
 #endif
+   UNREGISTER_INI_ENTRIES();
return SUCCESS;
 }
 /* }}} */
@@ -1427,6 +1441,7 @@
zval*clone;
char*url = NULL;
int url_len = 0;
+   char *cainfo;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, url, 
url_len) == FAILURE) {
return;
@@ -1453,6 +1468,8 @@
MAKE_STD_ZVAL(clone);
ch-clone = clone;

+
+
curl_easy_setopt(ch-cp, CURLOPT_NOPROGRESS,1);
curl_easy_setopt(ch-cp, CURLOPT_VERBOSE,   0);
curl_easy_setopt(ch-cp, CURLOPT_ERRORBUFFER,   ch-err.str);
@@ -1465,6 +1482,12 @@
curl_easy_setopt(ch-cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
curl_easy_setopt(ch-cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
curl_easy_setopt(ch-cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite 
redirects */
+
+   cainfo = INI_STR(curl.cainfo);
+   if (cainfo  strlen(cainfo)  0) {
+   curl_easy_setopt(ch-cp, CURLOPT_CAINFO, cainfo);
+   }
+
 #if defined(ZTS)
curl_easy_setopt(ch-cp, CURLOPT_NOSIGNAL, 1);
 #endif
@@ -2306,6 +2329,11 @@
CAAZ(certinfo, listcode);
}
 #endif
+#if LIBCURL_VERSION_NUM = 0x071202
+   if (curl_easy_getinfo(ch-cp, CURLINFO_REDIRECT_URL, s_code) 
== CURLE_OK) {
+   CAAS(redirect_url, s_code);
+   }
+#endif
if (ch-header.str_len  0) {
CAAS(request_header, ch-header.str);
}
@@ -2313,7 +2341,11 @@
switch (option) {
case CURLINFO_PRIVATE:
case CURLINFO_EFFECTIVE_URL:
-   case CURLINFO_CONTENT_TYPE: {
+   case CURLINFO_CONTENT_TYPE:
+#if LIBCURL_VERSION_NUM = 0x071202
+   case CURLINFO_REDIRECT_URL:
+#endif
+   {
char *s_code = NULL;

if (curl_easy_getinfo(ch-cp, option, s_code) 
== CURLE_OK  s_code) {

Modified: php/php-src/trunk/ext/curl/interface.c
===
--- php/php-src/trunk/ext/curl/interface.c  2011-04-01 17:10:52 UTC (rev 
309880)
+++ php/php-src/trunk/ext/curl/interface.c  2011-04-01 17:19:08 UTC (rev 
309881)
@@ -644,7 +644,11 @@
 #if LIBCURL_VERSION_NUM   0x071301
REGISTER_CURL_CONSTANT(CURLINFO_CERTINFO);
 #endif
+#if LIBCURL_VERSION_NUM = 0x071202
+ 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/Zend/zend_API.c

2011-03-31 Thread Pierre Joye
Hi Tony,

This commit breaks the build, see:

http://windows.php.net/downloads/snaps/trunk-ts-windows-vc9-x86/logs/r309857/compile.txt

Not sure yet why it fails. Does it work for you?

On Thu, Mar 31, 2011 at 1:59 PM, Antony Dovgal tony2...@php.net wrote:
 tony2001                                 Thu, 31 Mar 2011 11:59:34 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=309853

 Log:
 fix bug #54423 (classes from dl()'ed extensions are not destroyed)

 Bug: http://bugs.php.net/54423 (Closed) classes from dl()'ed extensions are 
 not destroyed

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/Zend/zend_API.c
    U   php/php-src/trunk/Zend/zend_API.c

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-03-31 09:00:14 UTC (rev 309852)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-03-31 11:59:34 UTC (rev 309853)
 @@ -2,6 +2,8 @@
  |||
  ?? ??? 2011, PHP 5.3.7
  - Zend Engine:
 +  . Fixed bug #54423 (classes from dl()'ed extensions are not destroyed).
 +    (Tony, Dmitry)
   . Fixed bug #54262 (Crash when assigning value to a dimension in a 
 non-array).
     (Dmitry)


 Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
 ===
 --- php/php-src/branches/PHP_5_3/Zend/zend_API.c        2011-03-31 09:00:14 
 UTC (rev 309852)
 +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c        2011-03-31 11:59:34 
 UTC (rev 309853)
 @@ -2082,6 +2082,22 @@
  }
  /* }}} */

 +static int clean_module_class(const zend_class_entry **ce, int 
 *module_number TSRMLS_DC) /* {{{ */
 +{
 +       if ((*ce)-type == ZEND_INTERNAL_CLASS  
 (*ce)-module-module_number == *module_number) {
 +               return ZEND_HASH_APPLY_REMOVE;
 +       } else {
 +               return ZEND_HASH_APPLY_KEEP;
 +       }
 +}
 +/* }}} */
 +
 +static void clean_module_classes(int module_number TSRMLS_DC) /* {{{ */
 +{
 +       zend_hash_apply_with_argument(EG(class_table), (apply_func_arg_t) 
 clean_module_class, (void *) module_number TSRMLS_CC);
 +}
 +/* }}} */
 +
  void module_destructor(zend_module_entry *module) /* {{{ */
  {
        TSRMLS_FETCH();
 @@ -2089,6 +2105,7 @@
        if (module-type == MODULE_TEMPORARY) {
                zend_clean_module_rsrc_dtors(module-module_number TSRMLS_CC);
                clean_module_constants(module-module_number TSRMLS_CC);
 +               clean_module_classes(module-module_number TSRMLS_CC);
        }

        if (module-module_started  module-module_shutdown_func) {

 Modified: php/php-src/trunk/Zend/zend_API.c
 ===
 --- php/php-src/trunk/Zend/zend_API.c   2011-03-31 09:00:14 UTC (rev 309852)
 +++ php/php-src/trunk/Zend/zend_API.c   2011-03-31 11:59:34 UTC (rev 309853)
 @@ -2208,6 +2208,22 @@
  }
  /* }}} */

 +static int clean_module_class(const zend_class_entry **ce, int 
 *module_number TSRMLS_DC) /* {{{ */
 +{
 +       if ((*ce)-type == ZEND_INTERNAL_CLASS  
 (*ce)-module-module_number == *module_number) {
 +               return ZEND_HASH_APPLY_REMOVE;
 +       } else {
 +               return ZEND_HASH_APPLY_KEEP;
 +       }
 +}
 +/* }}} */
 +
 +static void clean_module_classes(int module_number TSRMLS_DC) /* {{{ */
 +{
 +       zend_hash_apply_with_argument(EG(class_table), (apply_func_arg_t) 
 clean_module_class, (void *) module_number TSRMLS_CC);
 +}
 +/* }}} */
 +
  void module_destructor(zend_module_entry *module) /* {{{ */
  {
        TSRMLS_FETCH();
 @@ -2215,6 +2231,7 @@
        if (module-type == MODULE_TEMPORARY) {
                zend_clean_module_rsrc_dtors(module-module_number TSRMLS_CC);
                clean_module_constants(module-module_number TSRMLS_CC);
 +               clean_module_classes(module-module_number TSRMLS_CC);
        }

        if (module-module_started  module-module_shutdown_func) {


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




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_API.c

2011-03-31 Thread Pierre Joye
pajoye   Thu, 31 Mar 2011 23:58:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309861

Log:
- fix bug #54423, fix build in trunk, introduce by previous related commit

Bug: http://bugs.php.net/54423 (Closed) classes from dl()'ed extensions are not 
destroyed
  
Changed paths:
U   php/php-src/trunk/Zend/zend_API.c

Modified: php/php-src/trunk/Zend/zend_API.c
===
--- php/php-src/trunk/Zend/zend_API.c   2011-03-31 18:56:06 UTC (rev 309860)
+++ php/php-src/trunk/Zend/zend_API.c   2011-03-31 23:58:06 UTC (rev 309861)
@@ -2210,7 +2210,7 @@

 static int clean_module_class(const zend_class_entry **ce, int *module_number 
TSRMLS_DC) /* {{{ */
 {
-   if ((*ce)-type == ZEND_INTERNAL_CLASS  (*ce)-module-module_number 
== *module_number) {
+   if ((*ce)-type == ZEND_INTERNAL_CLASS  
(*ce)-info.internal.module-module_number == *module_number) {
return ZEND_HASH_APPLY_REMOVE;
} else {
return ZEND_HASH_APPLY_KEEP;

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

[PHP-CVS] svn: /php/php-src/trunk/ext/mysqlnd/ config.w32

2011-03-30 Thread Pierre Joye
pajoye   Wed, 30 Mar 2011 09:25:09 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309839

Log:
- fix build

Changed paths:
U   php/php-src/trunk/ext/mysqlnd/config.w32

Modified: php/php-src/trunk/ext/mysqlnd/config.w32
===
--- php/php-src/trunk/ext/mysqlnd/config.w322011-03-30 07:37:26 UTC (rev 
309838)
+++ php/php-src/trunk/ext/mysqlnd/config.w322011-03-30 09:25:09 UTC (rev 
309839)
@@ -7,10 +7,10 @@
if (CHECK_LIB(ws2_32.lib, mysqlnd)) {
mysqlnd_source =
mysqlnd.c  +
-   mysqlnd_alloc.c +
+   mysqlnd_alloc.c  +
mysqlnd_auth.c  +
mysqlnd_block_alloc.c  +
-   mysqlnd_bt.c +
+   mysqlnd_bt.c  +
mysqlnd_charset.c  +
mysqlnd_debug.c  +
mysqlnd_loaddata.c  +
@@ -22,7 +22,7 @@
mysqlnd_result_meta.c  +
mysqlnd_statistics.c  +
mysqlnd_wireprotocol.c  +
-   php_mysqlnd.c;
+   php_mysqlnd.c ;
EXTENSION(mysqlnd, mysqlnd_source, false);
if (((PHP_ZLIB==no)  (CHECK_LIB(zlib_a.lib;zlib.lib, 
mysqlnd, PHP_MYSQLND))) ||
(PHP_ZLIB_SHARED  CHECK_LIB(zlib.lib, mysqlnd, 
PHP_MYSQLND)) || (PHP_ZLIB == yes  (!PHP_ZLIB_SHARED)))

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

[PHP-CVS] svn: /php/php-src/trunk/ext/sockets/ sockets.c

2011-03-30 Thread Pierre Joye
pajoye   Wed, 30 Mar 2011 09:42:21 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309840

Log:
- attempt to fix build, 1st error

Changed paths:
U   php/php-src/trunk/ext/sockets/sockets.c

Modified: php/php-src/trunk/ext/sockets/sockets.c
===
--- php/php-src/trunk/ext/sockets/sockets.c 2011-03-30 09:25:09 UTC (rev 
309839)
+++ php/php-src/trunk/ext/sockets/sockets.c 2011-03-30 09:42:21 UTC (rev 
309840)
@@ -2437,7 +2437,7 @@
 {
zval *zstream;
php_stream   *stream;
-   php_socket   *retsock = NULL;;
+   php_socket   *retsock = NULL;
PHP_SOCKET   socket; /* fd */
php_sockaddr_storage addr;
socklen_taddr_len = sizeof(addr);

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

[PHP-CVS] svn: /php/php-src/trunk/ext/sockets/ sockets.c

2011-03-30 Thread Pierre Joye
pajoye   Wed, 30 Mar 2011 09:46:20 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309841

Log:
- fix build, should fix that code too on non win (wondering if that part was 
working at all)

Changed paths:
U   php/php-src/trunk/ext/sockets/sockets.c

Modified: php/php-src/trunk/ext/sockets/sockets.c
===
--- php/php-src/trunk/ext/sockets/sockets.c 2011-03-30 09:42:21 UTC (rev 
309840)
+++ php/php-src/trunk/ext/sockets/sockets.c 2011-03-30 09:46:20 UTC (rev 
309841)
@@ -2479,7 +2479,7 @@
 * private data; otherwise assume it's in non-blocking mode */
if (php_stream_is(stream, PHP_STREAM_IS_SOCKET)) {
retsock-blocking =
-   
((php_netstream_data_t)stream-abstract)-is_blocked;
+   ((php_netstream_data_t 
*)stream-abstract)-is_blocked;
} else {
retsock-blocking = 1;
}

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

[PHP-CVS] svn: /php/php-src/trunk/ext/sockets/ sockets.c

2011-03-30 Thread Pierre Joye
pajoye   Wed, 30 Mar 2011 09:46:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309842

Log:
- not used on win

Changed paths:
U   php/php-src/trunk/ext/sockets/sockets.c

Modified: php/php-src/trunk/ext/sockets/sockets.c
===
--- php/php-src/trunk/ext/sockets/sockets.c 2011-03-30 09:46:20 UTC (rev 
309841)
+++ php/php-src/trunk/ext/sockets/sockets.c 2011-03-30 09:46:56 UTC (rev 
309842)
@@ -2441,8 +2441,10 @@
PHP_SOCKET   socket; /* fd */
php_sockaddr_storage addr;
socklen_taddr_len = sizeof(addr);
+#ifndef PHP_WIN32
int  t;
-
+#endif
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zstream) == 
FAILURE) {
return;
}

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/build/config.w32 trunk/win32/build/config.w32

2011-03-28 Thread Pierre Joye
pajoye   Mon, 28 Mar 2011 10:55:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309779

Log:
- re enable static analyzer, crash fixed with snapshot builds

Changed paths:
U   php/php-src/branches/PHP_5_3/win32/build/config.w32
U   php/php-src/trunk/win32/build/config.w32

Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32
===
--- php/php-src/branches/PHP_5_3/win32/build/config.w32 2011-03-28 10:53:13 UTC 
(rev 309778)
+++ php/php-src/branches/PHP_5_3/win32/build/config.w32 2011-03-28 10:55:34 UTC 
(rev 309779)
@@ -414,7 +414,7 @@
 }

 ARG_ENABLE(static-analyze, Enable the VC compiler static analyze, no);
-if (PHP_STATIC_ANALYZE == yes  PHP_SNAPSHOT_BUILD == no) {
+if (PHP_STATIC_ANALYZE == yes) {
ADD_FLAG(CFLAGS,  /analyze );
ADD_FLAG(CFLAGS,  /wd6308 );
 }

Modified: php/php-src/trunk/win32/build/config.w32
===
--- php/php-src/trunk/win32/build/config.w322011-03-28 10:53:13 UTC (rev 
309778)
+++ php/php-src/trunk/win32/build/config.w322011-03-28 10:55:34 UTC (rev 
309779)
@@ -414,7 +414,7 @@
 }

 ARG_ENABLE(static-analyze, Enable the VC compiler static analyze, no);
-if (PHP_STATIC_ANALYZE == yes  PHP_SNAPSHOT_BUILD == no) {
+if (PHP_STATIC_ANALYZE == yes) {
ADD_FLAG(CFLAGS,  /analyze );
ADD_FLAG(CFLAGS,  /wd6308 );
 }

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/main/php_open_temporary_file.c trunk/main/php_open_temporary_file.c

2011-03-28 Thread Pierre Joye
pajoye   Mon, 28 Mar 2011 16:43:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309792

Log:
-  Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent, windows fix

Bug: http://bugs.php.net/48465 (Assigned) sys_get_temp_dir() possibly 
inconsistent when using TMPDIR
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/main/php_open_temporary_file.c
U   php/php-src/trunk/main/php_open_temporary_file.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-03-28 16:34:07 UTC (rev 309791)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-03-28 16:43:49 UTC (rev 309792)
@@ -6,10 +6,16 @@
 (Dmitry)

 - Core:
+  . Fixed a crash inside dtor for error handling. (Ilia)
   . Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment).
 (tomas dot brastavicius at quantum dot lt, Pierrick)
-  . Fixed a crash inside dtor for error handling. (Ilia)
+   . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
+ TMPDIR on Windows). (Pierre)

+- cURL extension:
+  . Add curl.cainfo ini option to set the path to a defailt CA bundle file, 
used
+by CURLOPT_CAINFO option. (Pierre)
+
 - DateTime extension:
   . Fixed bug #54340 (DateTime::add() method bug). (Adam)
   . Fixed bug #54316 (DateTime::createFromFormat does not handle trailing '|'

Modified: php/php-src/branches/PHP_5_3/main/php_open_temporary_file.c
===
--- php/php-src/branches/PHP_5_3/main/php_open_temporary_file.c 2011-03-28 
16:34:07 UTC (rev 309791)
+++ php/php-src/branches/PHP_5_3/main/php_open_temporary_file.c 2011-03-28 
16:43:49 UTC (rev 309792)
@@ -204,9 +204,13 @@
 */
{
char sTemp[MAX_PATH];
-   DWORD n = GetTempPath(sizeof(sTemp),sTemp);
-   assert(0  n);  /* should *never* fail! */
-   temporary_directory = strdup(sTemp);
+   DWORD len = GetTempPath(sizeof(sTemp),sTemp);
+   assert(0  len);  /* should *never* fail! */
+   if (sTemp[len - 1] == DEFAULT_SLASH) {
+   temporary_directory = zend_strndup(sTemp, len - 1);
+   } else {
+   temporary_directory = zend_strndup(sTemp, len);
+   }
return temporary_directory;
}
 #else

Modified: php/php-src/trunk/main/php_open_temporary_file.c
===
--- php/php-src/trunk/main/php_open_temporary_file.c2011-03-28 16:34:07 UTC 
(rev 309791)
+++ php/php-src/trunk/main/php_open_temporary_file.c2011-03-28 16:43:49 UTC 
(rev 309792)
@@ -204,9 +204,13 @@
 */
{
char sTemp[MAX_PATH];
-   DWORD n = GetTempPath(sizeof(sTemp),sTemp);
-   assert(0  n);  /* should *never* fail! */
-   temporary_directory = strdup(sTemp);
+   DWORD len = GetTempPath(sizeof(sTemp),sTemp);
+   assert(0  len);  /* should *never* fail! */
+   if (sTemp[len - 1] == DEFAULT_SLASH) {
+   temporary_directory = zend_strndup(sTemp, len - 1);
+   } else {
+   temporary_directory = zend_strndup(sTemp, len);
+   }
return temporary_directory;
}
 #else

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2011-03-28 Thread Pierre Joye
pajoye   Mon, 28 Mar 2011 16:45:57 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309793

Log:
- not applied yet

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-03-28 16:43:49 UTC (rev 309792)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-03-28 16:45:57 UTC (rev 309793)
@@ -12,10 +12,6 @@
. Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
  TMPDIR on Windows). (Pierre)

-- cURL extension:
-  . Add curl.cainfo ini option to set the path to a defailt CA bundle file, 
used
-by CURLOPT_CAINFO option. (Pierre)
-
 - DateTime extension:
   . Fixed bug #54340 (DateTime::add() method bug). (Adam)
   . Fixed bug #54316 (DateTime::createFromFormat does not handle trailing '|'

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

Re: [PHP-CVS] svn: /php/php-src/trunk/ext/spl/ php_spl.c php_spl.h spl_directory.c spl_iterators.c tests/bug41828.phpt tests/bug54281.phpt tests/bug54384.phpt tests/iterator_031.phpt

2011-03-27 Thread Pierre Joye
2011/3/27 Gustavo André dos Santos Lopes cataphr...@php.net:
 cataphract                               Sun, 27 Mar 2011 04:21:06 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=309729

 Log:
 - Fixed bug #54384: Several SPL classes crash when parent constructor is
  not called.
 #Merge to 5.3 pending (slight BC break on AppendIterator, as it's no
 #longer possible to defer the call to the parent constructor until
 #after the constructor is performed).

Please add a note to the UPGRADING guide.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/spl/spl_iterators.c ext/spl/spl_iterators.h ext/spl/tests/CallbackFilterIteratorTest-002.phpt ext/spl/tests/CallbackFilterIteratorTest.phpt ext/spl/test

2011-03-27 Thread Pierre Joye
hi Arnaud,

Please add a note in the UPGRADING guide.

Thanks,


On Sun, Mar 27, 2011 at 10:13 PM, Arnaud Le Blanc lbarn...@php.net wrote:
 lbarnaud                                 Sun, 27 Mar 2011 20:13:27 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=309749

 Log:
 Added CallbackFilterIterator and RecursiveCallbackFilterIterator classes

 [DOC] This is a concrete FilterIterator which takes a callback as
 constructor parameter, and uses this callback for filtering. This allows
 to use FilterIterator without extending it.

 CallbackFilterIterator Example:

 $it = new ArrayIterator(range(1,100));
 $it = new CallbackFilterIterator($it, function($value) {
        return $value % 2;
 });
 foreach($it as $value) // ...

 RecursiveCallbackFilterIterator Example:

 $it = new RecursiveDirectoryIterator(/);
 $it = new RecursiveCallbackFilterIterator($it, function($file, $k, $it) {
        return $it-hasChildren() || $file-getSize()  1024;
 });
 foreach(new RecursiveIteratorIterator($it) as $file) // ...

 The callback takes the current value, the current key and the inner
 iterator as parameters.

 Changed paths:
    U   php/php-src/trunk/NEWS
    U   php/php-src/trunk/ext/spl/spl_iterators.c
    U   php/php-src/trunk/ext/spl/spl_iterators.h
    A   php/php-src/trunk/ext/spl/tests/CallbackFilterIteratorTest-002.phpt
    A   php/php-src/trunk/ext/spl/tests/CallbackFilterIteratorTest.phpt
    A   
 php/php-src/trunk/ext/spl/tests/RecursiveCallbackFilterIteratorTest.phpt


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




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /SVNROOT/ global_avail

2011-03-20 Thread Pierre Joye
pajoye   Sun, 20 Mar 2011 17:09:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309483

Log:
- peclweb should be here too

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-03-20 15:15:08 UTC (rev 309482)
+++ SVNROOT/global_avail2011-03-20 17:09:26 UTC (rev 309483)
@@ -52,7 +52,7 @@
 # The PHP Web Group maintains www.php.net, news.php.net, bugs.php.net,
 # people.php.net and master.php.net.

-avail|salathe,scottmac,jmertic,lsmith,johannes,ilia,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,jani,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams,tom,jacques,sebastian,georg,mj,imajes,cortesi,sander,markonen,edink,jan,victor,mfischer,wez,sesser,pollita,alindeman,magnus,iliaa,philip,didou,sfox,sean,dufuz,nlopess,pajoye,helly,tony2001,bjori,felipe,dsp,aharvey,danbrown,moacir,till|web/php,web/php-bugs,web/php-master,web/php-news,web/php-hosts,web/php-wiki,web/php-people
+avail|salathe,scottmac,jmertic,lsmith,johannes,ilia,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,jani,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams,tom,jacques,sebastian,georg,mj,imajes,cortesi,sander,markonen,edink,jan,victor,mfischer,wez,sesser,pollita,alindeman,magnus,iliaa,philip,didou,sfox,sean,dufuz,nlopess,pajoye,helly,tony2001,bjori,felipe,dsp,aharvey,danbrown,moacir,till|web/php,web/php-bugs,web/php-master,web/php-news,web/php-hosts,web/php-wiki,web/php-people,web/pecl

 avail|degeberg|web/php-bugs
 avail|danielc|web/php

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/Zend/tests/bug54262.phpt branches/PHP_5_2/Zend/zend_vm_def.h branches/PHP_5_2/Zend/zend_vm_execute.h branches/PHP_5_3/NEWS branc

2011-03-16 Thread Pierre Joye
hi Dmitry,

Can you revert this commit from 5.3 please? We are about to package
5.3.6 and as far as I can tell Johannes do not want more commits
before.

5.3.7 release process should follow shortly as we already have quite a
few issues already.

Cheers,

On Wed, Mar 16, 2011 at 12:14 PM, Dmitry Stogov dmi...@php.net wrote:
 dmitry                                   Wed, 16 Mar 2011 11:14:33 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=309300

 Log:
 Fixed bug #54262 (Crash when assigning value to a dimension in a non-array)

 Bug: http://bugs.php.net/54262 (error getting bug information)

 Changed paths:
    U   php/php-src/branches/PHP_5_2/NEWS
    A   php/php-src/branches/PHP_5_2/Zend/tests/bug54262.phpt
    U   php/php-src/branches/PHP_5_2/Zend/zend_vm_def.h
    U   php/php-src/branches/PHP_5_2/Zend/zend_vm_execute.h
    U   php/php-src/branches/PHP_5_3/NEWS
    A   php/php-src/branches/PHP_5_3/Zend/tests/bug54262.phpt
    U   php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h
    U   php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h
    U   php/php-src/branches/PHP_5_3/Zend/zend_vm_opcodes.h
    A   php/php-src/trunk/Zend/tests/bug54262.phpt
    U   php/php-src/trunk/Zend/zend_vm_def.h
    U   php/php-src/trunk/Zend/zend_vm_execute.h


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




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/main/ SAPI.c

2011-03-16 Thread Pierre Joye
pajoye   Wed, 16 Mar 2011 23:54:14 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309319

Log:
- MFH: make setlocale thread only, drastically reduce TS related crashes in 
error mgt and other parts like pcre, and actually a good thing (tm)

Changed paths:
U   php/php-src/branches/PHP_5_3/main/SAPI.c

Modified: php/php-src/branches/PHP_5_3/main/SAPI.c
===
--- php/php-src/branches/PHP_5_3/main/SAPI.c2011-03-16 21:20:47 UTC (rev 
309318)
+++ php/php-src/branches/PHP_5_3/main/SAPI.c2011-03-16 23:54:14 UTC (rev 
309319)
@@ -78,6 +78,9 @@

 #ifdef ZTS
ts_allocate_id(sapi_globals_id, sizeof(sapi_globals_struct), 
(ts_allocate_ctor) sapi_globals_ctor, (ts_allocate_dtor) sapi_globals_dtor);
+# ifdef PHP_WIN32
+   _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
+# endif
 #else
sapi_globals_ctor(sapi_globals);
 #endif

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2011-03-16 Thread Pierre Joye
pajoye   Wed, 16 Mar 2011 23:57:04 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309320

Log:
- news entry for the setlocale fix

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-03-16 23:54:14 UTC (rev 309319)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-03-16 23:57:04 UTC (rev 309320)
@@ -2,11 +2,14 @@
 |||
 ?? Mar 2011, PHP 5.3.6
 - Zend Engine:
+  . Fixed bug numerous crashes due to setlocale (crash on error, pcre, mysql
+etc.) on Windows in thread safe mode. (Pierre)
   . Fixed bug #54265 (crash when variable gets reassigned in error handler).
 (Dmitry)
   . Fixed bug #54262 (Crash when assigning value to a dimension in a 
non-array).
 (Dmitry)

+
 - Phar extension:
   . Fixed bug #54247 (format-string vulnerability on Phar). (Felipe)
 (CVE-2011-1153)

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

[PHP-CVS] svn: /php/php-src/trunk/main/ SAPI.c

2011-03-15 Thread Pierre Joye
pajoye   Tue, 15 Mar 2011 17:13:44 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309261

Log:
- make setlocale thread only, drastically reduce TS related crashes in error 
mgt and other parts like pcre, and actually a good thing (tm)

Changed paths:
U   php/php-src/trunk/main/SAPI.c

Modified: php/php-src/trunk/main/SAPI.c
===
--- php/php-src/trunk/main/SAPI.c   2011-03-15 17:03:59 UTC (rev 309260)
+++ php/php-src/trunk/main/SAPI.c   2011-03-15 17:13:44 UTC (rev 309261)
@@ -80,6 +80,7 @@

 #ifdef ZTS
ts_allocate_id(sapi_globals_id, sizeof(sapi_globals_struct), 
(ts_allocate_ctor) sapi_globals_ctor, (ts_allocate_dtor) sapi_globals_dtor);
+   _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
 #else
sapi_globals_ctor(sapi_globals);
 #endif

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

Re: [PHP-CVS] svn: /php/php-src/trunk/win32/build/ Makefile config.w32

2011-03-02 Thread Pierre Joye
hi,

Please merge to 5.3

On Wed, Mar 2, 2011 at 6:22 AM, Moriyoshi Koizumi moriyo...@php.net wrote:
 moriyoshi                                Wed, 02 Mar 2011 05:22:22 +

 Modified: php/php-src/trunk/win32/build/config.w32
 ===
 --- php/php-src/trunk/win32/build/config.w32    2011-03-02 03:59:38 UTC (rev 
 308838)
 +++ php/php-src/trunk/win32/build/config.w32    2011-03-02 05:22:22 UTC (rev 
 308839)
 @@ -271,7 +271,7 @@
  var php_usual_lib_suspects = PHP_PHP_BUILD+\\lib;

  ADD_FLAG(CFLAGS, '/I ' + php_usual_include_suspects + ' ');
 -ADD_FLAG(LDFLAGS, '/libpath:\\' + php_usual_lib_suspects + '\\ ');
 +ADD_FLAG(LDFLAGS, '/libpath:' + php_usual_lib_suspects + ' ');

Why this change?


Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/trunk/win32/build/ Makefile config.w32

2011-03-02 Thread Pierre Joye
hi,

On Wed, Mar 2, 2011 at 7:35 PM, Moriyoshi Koizumi m...@mozo.jp wrote:

 Please merge to 5.3

 Done.

Thanks!

 On Wed, Mar 2, 2011 at 6:22 AM, Moriyoshi Koizumi moriyo...@php.net wrote:
 moriyoshi                                Wed, 02 Mar 2011 05:22:22 +

 Modified: php/php-src/trunk/win32/build/config.w32
 ===
 --- php/php-src/trunk/win32/build/config.w32    2011-03-02 03:59:38 UTC 
 (rev 308838)
 +++ php/php-src/trunk/win32/build/config.w32    2011-03-02 05:22:22 UTC 
 (rev 308839)
 @@ -271,7 +271,7 @@
  var php_usual_lib_suspects = PHP_PHP_BUILD+\\lib;

  ADD_FLAG(CFLAGS, '/I ' + php_usual_include_suspects + ' ');
 -ADD_FLAG(LDFLAGS, '/libpath:\\' + php_usual_lib_suspects + '\\ ');
 +ADD_FLAG(LDFLAGS, '/libpath:' + php_usual_lib_suspects + ' ');

 Why this change?

 The library path needs to be quoted just once. It appears old compiler
 frontends (VC6, 7?) used to have a bug with which arguments to the
 linker containing whitespaces weren't properly dealt with.

Did you test this specific change with VC6?


Cheers
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/trunk/win32/build/ Makefile config.w32

2011-03-02 Thread Pierre Joye
Ah right, almost forgot I decided that, joy :)

On 2 Mar 2011 22:37, Johannes Schlüter johan...@schlueters.de wrote:
 On Thu, 2011-03-03 at 06:26 +0900, Moriyoshi Koizumi wrote:
 On Thu, Mar 3, 2011 at 3:42 AM, Pierre Joye pierre@gmail.com wrote:
  hi,
 
  On Wed, Mar 2, 2011 at 7:35 PM, Moriyoshi Koizumi m...@mozo.jp wrote:
  The library path needs to be quoted just once. It appears old compiler
  frontends (VC6, 7?) used to have a bug with which arguments to the
  linker containing whitespaces weren't properly dealt with.
 
  Did you test this specific change with VC6?

 Not yet, but trunk only supports VC9 or later versions. Is it really
 necessary for 5.3 to support VC6?

 PHP 5.3.6 won't support VC6 anymore.

 johannes

 Regards,
 Moriyoshi

 
  Cheers
  --
  Pierre
 
  @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
 




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



Re: [PHP-CVS] svn: /php/php-src/trunk/ext/snmp/ snmp.c

2011-02-26 Thread Pierre Joye
btw, you can use valgrind as well with the tests suite. That should
help you to catch other possible leaks or bad memory access.

On Sat, Feb 26, 2011 at 8:08 PM, Boris Lytochkin lytbo...@php.net wrote:
 lytboris                                 Sat, 26 Feb 2011 19:08:55 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=308710

 Log:
 remove compiler warnings
 fix various memory leaks seen with --enable-debug

 Changed paths:
    U   php/php-src/trunk/ext/snmp/snmp.c


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




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/trunk/ext/snmp/ snmp.c

2011-02-26 Thread Pierre Joye
can you open a bug at bugs.php.net with the patch please?

Thanks!

On Sat, Feb 26, 2011 at 9:31 PM, Lytochkin Boris lytbo...@gmail.com wrote:
 It is a pain to run it on FreeBSD, there is a bug in run-tests.php:
 ===
 --- run-tests.php       (revision 308673)
 +++ run-tests.php       (working copy)
 @@ -567,7 +567,7 @@
                                case 'm':
                                        $leak_check = true;
                                        $valgrind_cmd = valgrind --version;
 -                                       $valgrind_header =
 system_with_timeout($valgrind_cmd);
 +                                       $valgrind_header =
 system_with_timeout($valgrind_cmd, $_ENV);
                                        $replace_count = 0;
                                        if (!$valgrind_header) {
                                                error(Valgrind
 returned no version info, cannot proceed.\nPlease check if Valgrind is
 installed.);
 ===
 Without $_ENV system_with_timeout() will use bogus(system default)
 PATH environment variable and will not find valgrind executable.

 After fixing run-tests.php all 27 tests for ext/snmp passed with
 valgrind enabled.

 On Sat, Feb 26, 2011 at 10:19 PM, Pierre Joye pierre@gmail.com wrote:
 btw, you can use valgrind as well with the tests suite. That should
 help you to catch other possible leaks or bad memory access.

 On Sat, Feb 26, 2011 at 8:08 PM, Boris Lytochkin lytbo...@php.net wrote:
 lytboris                                 Sat, 26 Feb 2011 19:08:55 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=308710

 Log:
 remove compiler warnings
 fix various memory leaks seen with --enable-debug

 Changed paths:
    U   php/php-src/trunk/ext/snmp/snmp.c
 --
 Pierre

 @pierrejoye | http://blog.thepimp.net | http://www.libgd.org


 --
 Boris Lytochkin




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/trunk/main/ SAPI.c

2011-02-25 Thread Pierre Joye
pajoye   Fri, 25 Feb 2011 11:28:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308665

Log:
- fix regression (carsten_st...@gmx.de)

Changed paths:
U   php/php-src/trunk/main/SAPI.c

Modified: php/php-src/trunk/main/SAPI.c
===
--- php/php-src/trunk/main/SAPI.c   2011-02-25 11:07:06 UTC (rev 308664)
+++ php/php-src/trunk/main/SAPI.c   2011-02-25 11:28:33 UTC (rev 308665)
@@ -680,7 +680,7 @@
do {
header_line_len--;
} while(header_line_len  
isspace(header_line[header_line_len-1]));
-   header_line[--header_line_len]='\0';
+   header_line[header_line_len]='\0';
}

if (op == SAPI_HEADER_DELETE) {

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd.c branches/PHP_5_3/ext/mysqlnd/mysqlnd.h branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h trunk/ext/mysqlnd/mysqlnd.c trunk/ext/mysq

2011-02-25 Thread Pierre Joye
hi,

I know that this commit could be considered as cosmetic only but we
are in a RC phase, in case you did not notice it. And such commits
look dangerous to me.

On Fri, Feb 25, 2011 at 1:25 PM, Andrey Hristov and...@php.net wrote:
 andrey                                   Fri, 25 Feb 2011 12:25:36 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=308669

 Log:
 move from macros to functions, which can be overwritten, if needed

 Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd.h
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h


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




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ php_cli_readline.c php_cli_readline.h

2011-02-22 Thread Pierre Joye
pajoye   Tue, 22 Feb 2011 12:59:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308565

Log:
- missing files

Changed paths:
A   php/php-src/trunk/sapi/cli/php_cli_readline.c
A   php/php-src/trunk/sapi/cli/php_cli_readline.h

Added: php/php-src/trunk/sapi/cli/php_cli_readline.c
===
--- php/php-src/trunk/sapi/cli/php_cli_readline.c	(rev 0)
+++ php/php-src/trunk/sapi/cli/php_cli_readline.c	2011-02-22 12:59:50 UTC (rev 308565)
@@ -0,0 +1,448 @@
+/*
+   +--+
+   | PHP Version 5|
+   +--+
+   | Copyright (c) 1997-2011 The PHP Group|
+   +--+
+   | This source file is subject to version 3.01 of the PHP license,  |
+   | that is bundled with this package in the file LICENSE, and is|
+   | available through the world-wide-web at the following url:   |
+   | http://www.php.net/license/3_01.txt  |
+   | If you did not receive a copy of the PHP license and are unable to   |
+   | obtain it through the world-wide-web, please send a note to  |
+   | lice...@php.net so we can mail you a copy immediately.   |
+   +--+
+   | Author: Marcus Boerger he...@php.net   |
+   | Johannes Schlueter johan...@php.net|
+   +--+
+*/
+
+/* $Id: php_cli_readline.c 306939 2011-01-01 02:19:59Z felipe $ */
+
+#include php.h
+
+#if (HAVE_LIBREADLINE || HAVE_LIBEDIT)  !defined(COMPILE_DL_READLINE)
+
+#ifndef HAVE_RL_COMPLETION_MATCHES
+#define rl_completion_matches completion_matches
+#endif
+
+#include php_globals.h
+#include php_variables.h
+#include zend_hash.h
+#include zend_modules.h
+
+#include SAPI.h
+
+#if HAVE_SETLOCALE
+#include locale.h
+#endif
+#include zend.h
+#include zend_extensions.h
+#include php_ini.h
+#include php_globals.h
+#include php_main.h
+#include fopen_wrappers.h
+#include ext/standard/php_standard.h
+
+#ifdef __riscos__
+#include unixlib/local.h
+#endif
+
+#if HAVE_LIBEDIT
+#include editline/readline.h
+#else
+#include readline/readline.h
+#include readline/history.h
+#endif
+
+#include zend_compile.h
+#include zend_execute.h
+#include zend_highlight.h
+#include zend_indent.h
+
+typedef enum {
+	body,
+	sstring,
+	dstring,
+	sstring_esc,
+	dstring_esc,
+	comment_line,
+	comment_block,
+	heredoc_start,
+	heredoc,
+	outside,
+} php_code_type;
+
+int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{{ */
+{
+	int valid_end = 1, last_valid_end;
+	int brackets_count = 0;
+	int brace_count = 0;
+	int i;
+	php_code_type code_type = body;
+	char *heredoc_tag;
+	int heredoc_len;
+
+	for (i = 0; i  len; ++i) {
+		switch(code_type) {
+			default:
+switch(code[i]) {
+	case '{':
+		brackets_count++;
+		valid_end = 0;
+		break;
+	case '}':
+		if (brackets_count  0) {
+			brackets_count--;
+		}
+		valid_end = brackets_count ? 0 : 1;
+		break;
+	case '(':
+		brace_count++;
+		valid_end = 0;
+		break;
+	case ')':
+		if (brace_count  0) {
+			brace_count--;
+		}
+		valid_end = 0;
+		break;
+	case ';':
+		valid_end = brace_count == 0  brackets_count == 0;
+		break;
+	case ' ':
+	case '\r':
+	case '\n':
+	case '\t':
+		break;
+	case '\'':
+		code_type = sstring;
+		break;
+	case '':
+		code_type = dstring;
+		break;
+	case '#':
+		code_type = comment_line;
+		break;
+	case '/':
+		if (code[i+1] == '/') {
+			i++;
+			code_type = comment_line;
+			break;
+		}
+		if (code[i+1] == '*') {
+			last_valid_end = valid_end;
+			valid_end = 0;
+			code_type = comment_block;
+			i++;
+			break;
+		}
+		valid_end = 0;
+		break;
+	case '%':
+		if (!CG(asp_tags)) {
+			valid_end = 0;
+			break;
+		}
+		/* no break */
+	case '?':
+		if (code[i+1] == '') {
+			i++;
+			code_type = outside;
+			break;
+		}
+		valid_end = 0;
+		break;
+	case '':
+		valid_end = 0;
+		if (i + 2  len  code[i+1] == ''  code[i+2] == '') {
+			i += 2;
+			code_type = heredoc_start;
+			heredoc_len = 0;
+		}
+		break;
+	default:
+		valid_end = 0;
+		break;
+}
+break;
+			case sstring:
+if (code[i] == '\\') {
+	code_type = sstring_esc;
+} else {
+	if (code[i] == '\'') {
+		code_type = body;
+	}
+}
+break;
+			case 

[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ php_cli_readline.c php_cli_readline.h

2011-02-22 Thread Pierre Joye
pajoye   Tue, 22 Feb 2011 13:09:15 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308566

Log:
-not needed, buildconf helps...

Changed paths:
D   php/php-src/trunk/sapi/cli/php_cli_readline.c
D   php/php-src/trunk/sapi/cli/php_cli_readline.h

Deleted: php/php-src/trunk/sapi/cli/php_cli_readline.c
===
--- php/php-src/trunk/sapi/cli/php_cli_readline.c	2011-02-22 12:59:50 UTC (rev 308565)
+++ php/php-src/trunk/sapi/cli/php_cli_readline.c	2011-02-22 13:09:15 UTC (rev 308566)
@@ -1,448 +0,0 @@
-/*
-   +--+
-   | PHP Version 5|
-   +--+
-   | Copyright (c) 1997-2011 The PHP Group|
-   +--+
-   | This source file is subject to version 3.01 of the PHP license,  |
-   | that is bundled with this package in the file LICENSE, and is|
-   | available through the world-wide-web at the following url:   |
-   | http://www.php.net/license/3_01.txt  |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to  |
-   | lice...@php.net so we can mail you a copy immediately.   |
-   +--+
-   | Author: Marcus Boerger he...@php.net   |
-   | Johannes Schlueter johan...@php.net|
-   +--+
-*/
-
-/* $Id: php_cli_readline.c 306939 2011-01-01 02:19:59Z felipe $ */
-
-#include php.h
-
-#if (HAVE_LIBREADLINE || HAVE_LIBEDIT)  !defined(COMPILE_DL_READLINE)
-
-#ifndef HAVE_RL_COMPLETION_MATCHES
-#define rl_completion_matches completion_matches
-#endif
-
-#include php_globals.h
-#include php_variables.h
-#include zend_hash.h
-#include zend_modules.h
-
-#include SAPI.h
-
-#if HAVE_SETLOCALE
-#include locale.h
-#endif
-#include zend.h
-#include zend_extensions.h
-#include php_ini.h
-#include php_globals.h
-#include php_main.h
-#include fopen_wrappers.h
-#include ext/standard/php_standard.h
-
-#ifdef __riscos__
-#include unixlib/local.h
-#endif
-
-#if HAVE_LIBEDIT
-#include editline/readline.h
-#else
-#include readline/readline.h
-#include readline/history.h
-#endif
-
-#include zend_compile.h
-#include zend_execute.h
-#include zend_highlight.h
-#include zend_indent.h
-
-typedef enum {
-	body,
-	sstring,
-	dstring,
-	sstring_esc,
-	dstring_esc,
-	comment_line,
-	comment_block,
-	heredoc_start,
-	heredoc,
-	outside,
-} php_code_type;
-
-int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{{ */
-{
-	int valid_end = 1, last_valid_end;
-	int brackets_count = 0;
-	int brace_count = 0;
-	int i;
-	php_code_type code_type = body;
-	char *heredoc_tag;
-	int heredoc_len;
-
-	for (i = 0; i  len; ++i) {
-		switch(code_type) {
-			default:
-switch(code[i]) {
-	case '{':
-		brackets_count++;
-		valid_end = 0;
-		break;
-	case '}':
-		if (brackets_count  0) {
-			brackets_count--;
-		}
-		valid_end = brackets_count ? 0 : 1;
-		break;
-	case '(':
-		brace_count++;
-		valid_end = 0;
-		break;
-	case ')':
-		if (brace_count  0) {
-			brace_count--;
-		}
-		valid_end = 0;
-		break;
-	case ';':
-		valid_end = brace_count == 0  brackets_count == 0;
-		break;
-	case ' ':
-	case '\r':
-	case '\n':
-	case '\t':
-		break;
-	case '\'':
-		code_type = sstring;
-		break;
-	case '':
-		code_type = dstring;
-		break;
-	case '#':
-		code_type = comment_line;
-		break;
-	case '/':
-		if (code[i+1] == '/') {
-			i++;
-			code_type = comment_line;
-			break;
-		}
-		if (code[i+1] == '*') {
-			last_valid_end = valid_end;
-			valid_end = 0;
-			code_type = comment_block;
-			i++;
-			break;
-		}
-		valid_end = 0;
-		break;
-	case '%':
-		if (!CG(asp_tags)) {
-			valid_end = 0;
-			break;
-		}
-		/* no break */
-	case '?':
-		if (code[i+1] == '') {
-			i++;
-			code_type = outside;
-			break;
-		}
-		valid_end = 0;
-		break;
-	case '':
-		valid_end = 0;
-		if (i + 2  len  code[i+1] == ''  code[i+2] == '') {
-			i += 2;
-			code_type = heredoc_start;
-			heredoc_len = 0;
-		}
-		break;
-	default:
-		valid_end = 0;
-		break;
-}
-break;
-			case sstring:
-if (code[i] == '\\') {
-	code_type = sstring_esc;
-} else {
-	if (code[i] == '\'') {
-		code_type = body;
-	}
-}

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/openssl/openssl.c branches/PHP_5_3/ext/openssl/tests/bug54060.phpt trunk/ext/openssl/openssl.c trunk/ext/openssl/tests/bug54060.

2011-02-21 Thread Pierre Joye
pajoye   Mon, 21 Feb 2011 10:07:31 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308531

Log:
- fix bug #54060, memory leak in openssl_encrypt

Bug: http://bugs.php.net/54060 (Open) Memory leaks when openssl_encrypt called
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
A   php/php-src/branches/PHP_5_3/ext/openssl/tests/bug54060.phpt
U   php/php-src/trunk/ext/openssl/openssl.c
A   php/php-src/trunk/ext/openssl/tests/bug54060.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-02-21 08:12:33 UTC (rev 308530)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-02-21 10:07:31 UTC (rev 308531)
@@ -8,6 +8,8 @@
 - Exif extension:
   . Fixed bug #54002 (crash on crafted tag, reported by Luca Carettoni). 
(Pierre)
 (CVE-2011-0708)
+- OpenSSL extension:
+  . Fixed bug #54060 (Memory leaks when openssl_encrypt). (Pierre)

 - SPL extension:
   . Fixed memory leak in DirectoryIterator::getExtension() and

Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2011-02-21 08:12:33 UTC 
(rev 308530)
+++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2011-02-21 10:07:31 UTC 
(rev 308531)
@@ -4731,6 +4731,7 @@
if (free_iv) {
efree(iv);
}
+   EVP_CIPHER_CTX_cleanup(cipher_ctx);
 }
 /* }}} */


Added: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug54060.phpt
===
--- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug54060.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug54060.phpt
2011-02-21 10:07:31 UTC (rev 308531)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #54060 (Memory leak in openssl_encrypt)
+--SKIPIF--
+?php if (!extension_loaded(openssl)) die(skip); ?
+--FILE--
+?php
+
+$data = jfdslkjvflsdkjvlkfjvlkjfvlkdm,4w 043920r 9234r 32904r 09243
+r7-89437 r892374 r894372 r894 7289r7 f  frwerfh i iurf iuryw uyrfouiwy ruy
+972439 8478942 yrhfjkdhls;
+$pass = r23498rui324hjbnkj;
+
+openssl_encrypt($data, 'des3', $pass, false, '1qazxsw2');
+echo Done;
+?
+--EXPECT--
+Done

Modified: php/php-src/trunk/ext/openssl/openssl.c
===
--- php/php-src/trunk/ext/openssl/openssl.c 2011-02-21 08:12:33 UTC (rev 
308530)
+++ php/php-src/trunk/ext/openssl/openssl.c 2011-02-21 10:07:31 UTC (rev 
308531)
@@ -4741,6 +4741,7 @@
if (free_iv) {
efree(iv);
}
+   EVP_CIPHER_CTX_cleanup(cipher_ctx);
 }
 /* }}} */


Added: php/php-src/trunk/ext/openssl/tests/bug54060.phpt
===
--- php/php-src/trunk/ext/openssl/tests/bug54060.phpt   
(rev 0)
+++ php/php-src/trunk/ext/openssl/tests/bug54060.phpt   2011-02-21 10:07:31 UTC 
(rev 308531)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #54060 (Memory leak in openssl_encrypt)
+--SKIPIF--
+?php if (!extension_loaded(openssl)) die(skip); ?
+--FILE--
+?php
+
+$data = jfdslkjvflsdkjvlkfjvlkjfvlkdm,4w 043920r 9234r 32904r 09243
+r7-89437 r892374 r894372 r894 7289r7 f  frwerfh i iurf iuryw uyrfouiwy ruy
+972439 8478942 yrhfjkdhls;
+$pass = r23498rui324hjbnkj;
+
+openssl_encrypt($data, 'des3', $pass, false, '1qazxsw2');
+echo Done;
+?
+--EXPECT--
+Done

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/openssl/ openssl.c

2011-02-21 Thread Pierre Joye
pajoye   Mon, 21 Feb 2011 10:09:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308532

Log:
- fix test 025

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/openssl/openssl.c

Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2011-02-21 10:07:31 UTC 
(rev 308531)
+++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2011-02-21 10:09:50 UTC 
(rev 308532)
@@ -3543,14 +3543,13 @@
char * outfilename; int outfilename_len;
char * extracertsfilename = NULL; int extracertsfilename_len;

-   RETVAL_FALSE;
-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ssZZa!|ls,
infilename, infilename_len, outfilename, 
outfilename_len,
zcert, zprivkey, zheaders, flags, 
extracertsfilename,
extracertsfilename_len) == FAILURE) {
return;
}
+   RETVAL_FALSE;

if (strlen(infilename) != infilename_len) {
return;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/openssl/openssl.c trunk/ext/openssl/openssl.c

2011-02-21 Thread Pierre Joye
pajoye   Mon, 21 Feb 2011 12:47:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308534

Log:
- fix bug #54061, memory leak in openssl_decrypt

Bug: http://bugs.php.net/54061 (unknown) 
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
U   php/php-src/trunk/ext/openssl/openssl.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-02-21 10:19:38 UTC (rev 308533)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-02-21 12:47:38 UTC (rev 308534)
@@ -8,8 +8,10 @@
 - Exif extension:
   . Fixed bug #54002 (crash on crafted tag, reported by Luca Carettoni). 
(Pierre)
 (CVE-2011-0708)
+
 - OpenSSL extension:
   . Fixed bug #54060 (Memory leaks when openssl_encrypt). (Pierre)
+  . Fixed bug #54061 (Memory leaks when openssl_decrypt). (Pierre)

 - SPL extension:
   . Fixed memory leak in DirectoryIterator::getExtension() and

Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2011-02-21 10:19:38 UTC 
(rev 308533)
+++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2011-02-21 12:47:38 UTC 
(rev 308534)
@@ -4804,6 +4804,7 @@
if (base64_str) {
efree(base64_str);
}
+   EVP_CIPHER_CTX_cleanup(cipher_ctx);
 }
 /* }}} */


Modified: php/php-src/trunk/ext/openssl/openssl.c
===
--- php/php-src/trunk/ext/openssl/openssl.c 2011-02-21 10:19:38 UTC (rev 
308533)
+++ php/php-src/trunk/ext/openssl/openssl.c 2011-02-21 12:47:38 UTC (rev 
308534)
@@ -4815,6 +4815,7 @@
if (base64_str) {
efree(base64_str);
}
+   EVP_CIPHER_CTX_cleanup(cipher_ctx);
 }
 /* }}} */


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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/tests/bug54061.phpt trunk/ext/openssl/tests/bug54061.phpt

2011-02-21 Thread Pierre Joye
pajoye   Mon, 21 Feb 2011 12:50:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308535

Log:
- fix bug #54061, memory leak in openssl_decrypt

Bug: http://bugs.php.net/54061 (unknown) 
  
Changed paths:
A   php/php-src/branches/PHP_5_3/ext/openssl/tests/bug54061.phpt
A   php/php-src/trunk/ext/openssl/tests/bug54061.phpt

Added: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug54061.phpt
===
--- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug54061.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug54061.phpt
2011-02-21 12:50:26 UTC (rev 308535)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #54061 (Memory leak in openssl_decrypt)
+--SKIPIF--
+?php if (!extension_loaded(openssl)) die(skip); ?
+--FILE--
+?php
+$data = jfdslkjvflsdkjvlkfjvlkjfvlkdm,4w 043920r 9234r 32904r 09243
+r7-89437 r892374 r894372 r894 7289r7 f  frwerfh i iurf iuryw uyrfouiwy ruy
+972439 8478942 yrhfjkdhls;
+$pass = r23498rui324hjbnkj;
+
+$cr = openssl_encrypt($data, 'des3', $pass, false, '1qazxsw2');
+$dcr = openssl_decrypt($cr, 'des3', $pass, false, '1qazxsw2');
+echo Done;
+?
+--EXPECT--
+Done

Added: php/php-src/trunk/ext/openssl/tests/bug54061.phpt
===
--- php/php-src/trunk/ext/openssl/tests/bug54061.phpt   
(rev 0)
+++ php/php-src/trunk/ext/openssl/tests/bug54061.phpt   2011-02-21 12:50:26 UTC 
(rev 308535)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #54061 (Memory leak in openssl_decrypt)
+--SKIPIF--
+?php if (!extension_loaded(openssl)) die(skip); ?
+--FILE--
+?php
+$data = jfdslkjvflsdkjvlkfjvlkjfvlkdm,4w 043920r 9234r 32904r 09243
+r7-89437 r892374 r894372 r894 7289r7 f  frwerfh i iurf iuryw uyrfouiwy ruy
+972439 8478942 yrhfjkdhls;
+$pass = r23498rui324hjbnkj;
+
+$cr = openssl_encrypt($data, 'des3', $pass, false, '1qazxsw2');
+$dcr = openssl_decrypt($cr, 'des3', $pass, false, '1qazxsw2');
+echo Done;
+?
+--EXPECT--
+Done

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2011-02-18 Thread Pierre Joye
pajoye   Fri, 18 Feb 2011 17:22:27 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308473

Log:
- bug #54002 entry

Bug: http://bugs.php.net/54002 (error getting bug information)
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-02-18 17:14:01 UTC (rev 308472)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-02-18 17:22:27 UTC (rev 308473)
@@ -5,6 +5,9 @@
   . Fixed bug #43512 (same parameter name can be used multiple times in
 method/function definition). (Felipe)

+- Exif extension
+  . Fixed bug #54002 (crash on crafted tag, reported by Luca Carettoni). 
(Pierre). (CVE-2011-0708)
+
 17 Feb 2011, PHP 5.3.6RC1
 - Upgraded bundled Sqlite3 to version 3.7.4. (Ilia)
 - Upgraded bundled PCRE to version 8.11. (Ilia)

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

[PHP-CVS] svn: /php/php-src/trunk/ acinclude.m4 ext/intl/config.m4 ext/intl/php_intl.c

2011-02-15 Thread Pierre Joye
pajoye   Tue, 15 Feb 2011 08:28:03 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308351

Log:
- fix build with ICU  4.2, add ICU_VERSION for m4 checks

Changed paths:
U   php/php-src/trunk/acinclude.m4
U   php/php-src/trunk/ext/intl/config.m4
U   php/php-src/trunk/ext/intl/php_intl.c

Modified: php/php-src/trunk/acinclude.m4
===
--- php/php-src/trunk/acinclude.m4  2011-02-15 06:54:50 UTC (rev 308350)
+++ php/php-src/trunk/acinclude.m4  2011-02-15 08:28:03 UTC (rev 308351)
@@ -2243,6 +2243,7 @@
   AC_MSG_ERROR([ICU version 3.4 or later is required])
 fi

+ICU_VERSION=$icu_version
 ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
 ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
 PHP_EVAL_INCLINE($ICU_INCS)

Modified: php/php-src/trunk/ext/intl/config.m4
===
--- php/php-src/trunk/ext/intl/config.m42011-02-15 06:54:50 UTC (rev 
308350)
+++ php/php-src/trunk/ext/intl/config.m42011-02-15 08:28:03 UTC (rev 
308351)
@@ -9,7 +9,14 @@
   PHP_SETUP_ICU(INTL_SHARED_LIBADD)
   PHP_SUBST(INTL_SHARED_LIBADD)
   PHP_REQUIRE_CXX()
-
+  if test $icu_version -ge 4002; then
+icu_spoof_src= spoofchecker/spoofchecker_class.c \
+spoofchecker/spoofchecker.c\
+spoofchecker/spoofchecker_create.c\
+spoofchecker/spoofchecker_main.c
+  else
+icu_spoof_src=
+  fi
   PHP_NEW_EXTENSION(intl, php_intl.c \
 intl_error.c \
 intl_convert.c \
@@ -59,11 +66,7 @@
 transliterator/transliterator_class.c \
 transliterator/transliterator_methods.c \
 idn/idn.c \
-spoofchecker/spoofchecker_class.c \
-spoofchecker/spoofchecker.c\
-spoofchecker/spoofchecker_create.c\
-spoofchecker/spoofchecker_main.c, $ext_shared,,$ICU_INCS)
-
+$icu_spoof_src, $ext_shared,,$ICU_INCS)
   PHP_ADD_BUILD_DIR($ext_builddir/collator)
   PHP_ADD_BUILD_DIR($ext_builddir/common)
   PHP_ADD_BUILD_DIR($ext_builddir/formatter)

Modified: php/php-src/trunk/ext/intl/php_intl.c
===
--- php/php-src/trunk/ext/intl/php_intl.c   2011-02-15 06:54:50 UTC (rev 
308350)
+++ php/php-src/trunk/ext/intl/php_intl.c   2011-02-15 08:28:03 UTC (rev 
308351)
@@ -70,10 +70,12 @@

 #include idn/idn.h

-#include spoofchecker/spoofchecker_class.h
-#include spoofchecker/spoofchecker.h
-#include spoofchecker/spoofchecker_create.h
-#include spoofchecker/spoofchecker_main.h
+#if U_ICU_VERSION_MAJOR_NUM  3  U_ICU_VERSION_MINOR_NUM =2
+# include spoofchecker/spoofchecker_class.h
+# include spoofchecker/spoofchecker.h
+# include spoofchecker/spoofchecker_create.h
+# include spoofchecker/spoofchecker_main.h
+#endif

 #include msgformat/msgformat.h
 #include common/common_error.h
@@ -638,12 +640,13 @@
/* Expose IDN constants to PHP scripts. */
idn_register_constants(INIT_FUNC_ARGS_PASSTHRU);

+#if U_ICU_VERSION_MAJOR_NUM  3  U_ICU_VERSION_MINOR_NUM =2
/* Register 'Spoofchecker' PHP class */
spoofchecker_register_Spoofchecker_class( TSRMLS_C );

/* Expose Spoofchecker constants to PHP scripts */
spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU );
-
+#endif
/* Global error handling. */
intl_error_init( NULL TSRMLS_CC );


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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ acinclude.m4

2011-02-15 Thread Pierre Joye
pajoye   Tue, 15 Feb 2011 08:28:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308352

Log:
- fix build with ICU  4.2, add ICU_VERSION for m4 checks

Changed paths:
U   php/php-src/branches/PHP_5_3/acinclude.m4

Modified: php/php-src/branches/PHP_5_3/acinclude.m4
===
--- php/php-src/branches/PHP_5_3/acinclude.m4   2011-02-15 08:28:03 UTC (rev 
308351)
+++ php/php-src/branches/PHP_5_3/acinclude.m4   2011-02-15 08:28:22 UTC (rev 
308352)
@@ -2228,6 +2228,7 @@
   AC_MSG_ERROR([ICU version 3.4 or later is required])
 fi

+ICU_VERSION=$icu_version
 ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
 ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
 PHP_EVAL_INCLINE($ICU_INCS)

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

[PHP-CVS] svn: /php/php-src/trunk/ext/intl/ config.w32

2011-02-15 Thread Pierre Joye
pajoye   Tue, 15 Feb 2011 08:48:24 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308353

Log:
- fix intl build with ICU  4.2, windows part

Changed paths:
U   php/php-src/trunk/ext/intl/config.w32

Modified: php/php-src/trunk/ext/intl/config.w32
===
--- php/php-src/trunk/ext/intl/config.w32   2011-02-15 08:28:22 UTC (rev 
308352)
+++ php/php-src/trunk/ext/intl/config.w32   2011-02-15 08:48:24 UTC (rev 
308353)
@@ -71,12 +71,17 @@
resourcebundle_class.c \
resourcebundle_iterator.c,
intl);
-   ADD_SOURCES(configure_module_dirname + /spoofchecker, \
-   spoofchecker.c \
-   spoofchecker_class.c \
-   spoofchecker_create.c \
-   spoofchecker_main.c,
-   intl);
+
+   if (CHECK_HEADER_ADD_INCLUDE(unicode/uspoof.h, 
CFLAGS_INTL)) {
+   ADD_SOURCES(configure_module_dirname + /spoofchecker, 
\
+   spoofchecker.c \
+   spoofchecker_class.c \
+   spoofchecker_create.c \
+   spoofchecker_main.c,
+   intl);
+   AC_DEFINE(HAVE_INTL, 1, 
Internationalization support enabled);
+   }
+
ADD_SOURCES(configure_module_dirname + /transliterator, \
transliterator.c \
transliterator_class.c \

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c trunk/ext/intl/resourcebundle/resourcebundle.c

2011-02-15 Thread Pierre Joye
pajoye   Tue, 15 Feb 2011 09:07:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308354

Log:
- unused var

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c
U   php/php-src/trunk/ext/intl/resourcebundle/resourcebundle.c

Modified: php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c
===
--- php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c   
2011-02-15 08:48:24 UTC (rev 308353)
+++ php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle.c   
2011-02-15 09:07:34 UTC (rev 308354)
@@ -29,7 +29,6 @@
UResType   restype;
const UChar*   ufield;
const uint8_t* bfield;
-   char * cfield;
const int32_t* vfield;
int32_tilen;
inti;

Modified: php/php-src/trunk/ext/intl/resourcebundle/resourcebundle.c
===
--- php/php-src/trunk/ext/intl/resourcebundle/resourcebundle.c  2011-02-15 
08:48:24 UTC (rev 308353)
+++ php/php-src/trunk/ext/intl/resourcebundle/resourcebundle.c  2011-02-15 
09:07:34 UTC (rev 308354)
@@ -29,7 +29,6 @@
UResType   restype;
const UChar*   ufield;
const uint8_t* bfield;
-   char * cfield;
const int32_t* vfield;
int32_tilen;
inti;

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Pierre Joye
On Tue, Feb 15, 2011 at 10:17 AM, Dmitry Stogov dmi...@zend.com wrote:
 Hi Pierre,

 The check for (byte_count_signed  2147483648) looks ugly and it's even
 wrong.

It is not ugly nor wrong. See my post in when I proposed the patch. It
should actually be something much lower but I did not find a reliable
reference for this value (max length of a tag value).


 It should be changed to something like (byte_count_signed  INT32_MAX) where
 INT32_MAX = 0x7fff (or 2147483647).

Yes, using a constant could be nice, I will check if that one is
actually always available.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Pierre Joye
On Tue, Feb 15, 2011 at 12:54 PM, Dmitry Stogov dmi...@zend.com wrote:

 I don't know all the logic but it looks very strange

 2147483648 == 0x8000 != 0x7fff == 2147483647

 so byte_count_signed may be 0x8000 == -1

negative value are checked before. Btw, byte_count_signed  is a 64bit
signed integer, for this reason :)

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Pierre Joye
why don't you fix it the way you want instead of arguing endlessly? I
gave all info to explain the reasoning behind that code, if it is
wrong, and that's totally possible, then fix it and let move on :)

Cheers,

On Tue, Feb 15, 2011 at 2:21 PM, Dmitry Stogov dmi...@zend.com wrote:
 On 02/15/2011 03:31 PM, Pierre Joye wrote:

 On Tue, Feb 15, 2011 at 12:54 PM, Dmitry Stogovdmi...@zend.com  wrote:

 I don't know all the logic but it looks very strange

 2147483648 == 0x8000 != 0x7fff == 2147483647

 so byte_count_signed may be 0x8000 == -1

 negative value are checked before. Btw, byte_count_signed  is a 64bit
 signed integer, for this reason :)

 Lets byte_count_signed = 0x8000

 it's not less than zero and not greater than 2147483648.
 So the following condition is false.

 if (byte_count_signed  0 || (byte_count_signed  2147483648)) {

 Then you convert it to size_t.

 byte_count = (size_t)byte_count_signed;

 In case size_t is defined as signed int32 you will get byte_count = -1.


-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Pierre Joye
and btw, as I said earlier, I would prefer to use the largest possible
value, which is likely to be 64K and not maxint. If only one could
point us to the specs for this exact value...

On Tue, Feb 15, 2011 at 2:27 PM, Pierre Joye pierre@gmail.com wrote:
 why don't you fix it the way you want instead of arguing endlessly? I
 gave all info to explain the reasoning behind that code, if it is
 wrong, and that's totally possible, then fix it and let move on :)

 Cheers,

 On Tue, Feb 15, 2011 at 2:21 PM, Dmitry Stogov dmi...@zend.com wrote:
 On 02/15/2011 03:31 PM, Pierre Joye wrote:

 On Tue, Feb 15, 2011 at 12:54 PM, Dmitry Stogovdmi...@zend.com  wrote:

 I don't know all the logic but it looks very strange

 2147483648 == 0x8000 != 0x7fff == 2147483647

 so byte_count_signed may be 0x8000 == -1

 negative value are checked before. Btw, byte_count_signed  is a 64bit
 signed integer, for this reason :)

 Lets byte_count_signed = 0x8000

 it's not less than zero and not greater than 2147483648.
 So the following condition is false.

 if (byte_count_signed  0 || (byte_count_signed  2147483648)) {

 Then you convert it to size_t.

 byte_count = (size_t)byte_count_signed;

 In case size_t is defined as signed int32 you will get byte_count = -1.


 --
 Pierre

 @pierrejoye | http://blog.thepimp.net | http://www.libgd.org




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c trunk/ext/exif/exif.c

2011-02-15 Thread Pierre Joye
pajoye   Tue, 15 Feb 2011 14:02:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308362

Log:
- fix the fix (Dmitry) and ensure that it builds everywhere, can someone test 
on solarisco pls?

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/exif/exif.c
U   php/php-src/trunk/ext/exif/exif.c

Modified: php/php-src/branches/PHP_5_3/ext/exif/exif.c
===
--- php/php-src/branches/PHP_5_3/ext/exif/exif.c2011-02-15 13:46:34 UTC 
(rev 308361)
+++ php/php-src/branches/PHP_5_3/ext/exif/exif.c2011-02-15 14:02:26 UTC 
(rev 308362)
@@ -40,8 +40,14 @@
 #include php.h
 #include ext/standard/file.h

+#ifdef HAVE_STDINT_H
+# include stdint.h
+#endif
+#ifdef HAVE_INTTYPES_H
+# include inttypes.h
+#endif
 #ifdef PHP_WIN32
-#include win32/php_stdint.h
+# include win32/php_stdint.h
 #endif

 #if HAVE_EXIF
@@ -2857,7 +2863,7 @@

byte_count_signed = (int64_t)components * 
php_tiff_bytes_per_format[format];

-   if (byte_count_signed  0 || (byte_count_signed  2147483648)) {
+   if (byte_count_signed  0 || (byte_count_signed  INT32_MAX)) {
exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count, tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC));
return FALSE;
}

Modified: php/php-src/trunk/ext/exif/exif.c
===
--- php/php-src/trunk/ext/exif/exif.c   2011-02-15 13:46:34 UTC (rev 308361)
+++ php/php-src/trunk/ext/exif/exif.c   2011-02-15 14:02:26 UTC (rev 308362)
@@ -40,8 +40,14 @@
 #include php.h
 #include ext/standard/file.h

+#ifdef HAVE_STDINT_H
+# include stdint.h
+#endif
+#ifdef HAVE_INTTYPES_H
+# include inttypes.h
+#endif
 #ifdef PHP_WIN32
-#include win32/php_stdint.h
+# include win32/php_stdint.h
 #endif

 #if HAVE_EXIF
@@ -2853,7 +2859,7 @@

byte_count_signed = (int64_t)components * 
php_tiff_bytes_per_format[format];

-   if (byte_count_signed  0 || (byte_count_signed  2147483648)) {
+   if (byte_count_signed  0 || (byte_count_signed  INT32_MAX)) {
exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count, tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC));
return FALSE;
}

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002_2.j

2011-02-14 Thread Pierre Joye
pajoye   Mon, 14 Feb 2011 09:08:44 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308316

Log:
- fix bug #54002, exif_read_data crashes on crafted tags

Bug: http://bugs.php.net/54002 (error getting bug information)
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/exif/exif.c
A   php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt
A   php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg
A   php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002_2.jpeg
U   php/php-src/trunk/ext/exif/exif.c
A   php/php-src/trunk/ext/exif/tests/bug54002.phpt
A   php/php-src/trunk/ext/exif/tests/bug54002_1.jpeg
A   php/php-src/trunk/ext/exif/tests/bug54002_2.jpeg

Modified: php/php-src/branches/PHP_5_3/ext/exif/exif.c
===
--- php/php-src/branches/PHP_5_3/ext/exif/exif.c2011-02-14 08:46:53 UTC 
(rev 308315)
+++ php/php-src/branches/PHP_5_3/ext/exif/exif.c2011-02-14 09:08:44 UTC 
(rev 308316)
@@ -40,6 +40,10 @@
 #include php.h
 #include ext/standard/file.h

+#ifdef PHP_WIN32
+include win32/php_stdint.h
+#endif
+
 #if HAVE_EXIF

 /* When EXIF_DEBUG is defined the module generates a lot of debug messages
@@ -2821,6 +2825,7 @@
int tag, format, components;
char *value_ptr, tagname[64], cbuf[32], *outside=NULL;
size_t byte_count, offset_val, fpos, fgot;
+   int64_t byte_count_signed;
xp_field_type *tmp_xp;
 #ifdef EXIF_DEBUG
char *dump_data;
@@ -2845,13 +2850,20 @@
/*return TRUE;*/
}

-   byte_count = components * php_tiff_bytes_per_format[format];
+   if (components  0) {
+   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count(%ld), tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
+   return FALSE;
+   }

-   if ((ssize_t)byte_count  0) {
+   byte_count_signed = (int64_t)components * 
php_tiff_bytes_per_format[format];
+
+   if (byte_count_signed  0 || (byte_count_signed  2147483648)) {
exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count(%ld), tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
return FALSE;
}

+   byte_count = (size_t)byte_count_signed;
+
if (byte_count  4) {
offset_val = php_ifd_get32u(dir_entry+8, 
ImageInfo-motorola_intel);
/* If its bigger than 4 bytes, the dir entry contains an 
offset. */
@@ -2916,6 +2928,7 @@
efree(dump_data);
}
 #endif
+
if (section_index==SECTION_THUMBNAIL) {
if (!ImageInfo-Thumbnail.data) {
switch(tag) {

Added: php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt
===
--- php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt   2011-02-14 
09:08:44 UTC (rev 308316)
@@ -0,0 +1,20 @@
+--TEST--
+Bug #54002 (crash on crafted tag)
+--INI--
+memory_limit=-1
+--SKIPIF--
+?php if (!extension_loaded('exif')) print 'skip exif extension not 
available';?
+--FILE--
+?php
+exif_read_data(__DIR__ . '/bug54002_1.jpeg');
+exif_read_data(__DIR__ . '/bug54002_2.jpeg');
+
+?
+--EXPECTF--
+Warning: exif_read_data(bug54002_1.jpeg): Process tag(x0205=UndefinedTa): 
Illegal byte_count(8) in %sbug54002.php on line %d
+
+Warning: exif_read_data(bug54002_1.jpeg): Process tag(xA000=FlashPixVer): 
Illegal pointer offset(%s) in %sbug54002.php on line %d
+
+Warning: exif_read_data(bug54002_2.jpeg): Process tag(x0205=UndefinedTa): 
Illegal byte_count(8) in %sbug54002.php on line %d
+
+Warning: exif_read_data(bug54002_2.jpeg): Process tag(xA000=FlashPixVer): 
Illegal pointer offset(%s) in %sbug54002.php on line %d

Added: php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg
===
(Binary files differ)


Property changes on: php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg
___
Added: svn:mime-type
   + application/octet-stream

Added: php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002_2.jpeg
===
(Binary files differ)


Property changes on: php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002_2.jpeg
___
Added: svn:mime-type
   + application/octet-stream

Modified: php/php-src/trunk/ext/exif/exif.c
===
--- php/php-src/trunk/ext/exif/exif.c   2011-02-14 08:46:53 UTC (rev 308315)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt trunk/ext/exif/exif.c trunk/ext/exif/tests/bug54002.phpt

2011-02-14 Thread Pierre Joye
pajoye   Mon, 14 Feb 2011 09:40:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308317

Log:
-Bug #54002, fix windows build, use the relevant values in the warnings

Bug: http://bugs.php.net/54002 (error getting bug information)
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/exif/exif.c
U   php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt
U   php/php-src/trunk/ext/exif/exif.c
U   php/php-src/trunk/ext/exif/tests/bug54002.phpt

Modified: php/php-src/branches/PHP_5_3/ext/exif/exif.c
===
--- php/php-src/branches/PHP_5_3/ext/exif/exif.c2011-02-14 09:08:44 UTC 
(rev 308316)
+++ php/php-src/branches/PHP_5_3/ext/exif/exif.c2011-02-14 09:40:10 UTC 
(rev 308317)
@@ -41,7 +41,7 @@
 #include ext/standard/file.h

 #ifdef PHP_WIN32
-include win32/php_stdint.h
+#include win32/php_stdint.h
 #endif

 #if HAVE_EXIF
@@ -2851,14 +2851,14 @@
}

if (components  0) {
-   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count(%ld), tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
+   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal components(%ld), tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), components);
return FALSE;
}

byte_count_signed = (int64_t)components * 
php_tiff_bytes_per_format[format];

if (byte_count_signed  0 || (byte_count_signed  2147483648)) {
-   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count(%ld), tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
+   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count, tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC));
return FALSE;
}


Modified: php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt
===
--- php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt   2011-02-14 
09:08:44 UTC (rev 308316)
+++ php/php-src/branches/PHP_5_3/ext/exif/tests/bug54002.phpt   2011-02-14 
09:40:10 UTC (rev 308317)
@@ -11,10 +11,10 @@

 ?
 --EXPECTF--
-Warning: exif_read_data(bug54002_1.jpeg): Process tag(x0205=UndefinedTa): 
Illegal byte_count(8) in %sbug54002.php on line %d
+Warning: exif_read_data(bug54002_1.jpeg): Process tag(x0205=UndefinedTa): 
Illegal byte_count in %sbug54002.php on line %d

 Warning: exif_read_data(bug54002_1.jpeg): Process tag(xA000=FlashPixVer): 
Illegal pointer offset(%s) in %sbug54002.php on line %d

-Warning: exif_read_data(bug54002_2.jpeg): Process tag(x0205=UndefinedTa): 
Illegal byte_count(8) in %sbug54002.php on line %d
+Warning: exif_read_data(bug54002_2.jpeg): Process tag(x0205=UndefinedTa): 
Illegal byte_count in %sbug54002.php on line %d

 Warning: exif_read_data(bug54002_2.jpeg): Process tag(xA000=FlashPixVer): 
Illegal pointer offset(%s) in %sbug54002.php on line %d

Modified: php/php-src/trunk/ext/exif/exif.c
===
--- php/php-src/trunk/ext/exif/exif.c   2011-02-14 09:08:44 UTC (rev 308316)
+++ php/php-src/trunk/ext/exif/exif.c   2011-02-14 09:40:10 UTC (rev 308317)
@@ -41,7 +41,7 @@
 #include ext/standard/file.h

 #ifdef PHP_WIN32
-include win32/php_stdint.h
+#include win32/php_stdint.h
 #endif

 #if HAVE_EXIF
@@ -2847,13 +2847,14 @@
}

if (components  0) {
-   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count(%ld), tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
+   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal components(%ld), tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), components);
return FALSE;
}
+
byte_count_signed = (int64_t)components * 
php_tiff_bytes_per_format[format];

if (byte_count_signed  0 || (byte_count_signed  2147483648)) {
-   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count(%ld), tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
+   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, 
ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count, tag, 
exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC));
return FALSE;
}


Modified: php/php-src/trunk/ext/exif/tests/bug54002.phpt
===
--- 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2011-02-12 Thread Pierre Joye
pajoye   Sat, 12 Feb 2011 20:25:48 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308298

Log:
-  add CVE

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-02-12 19:31:46 UTC (rev 308297)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-02-12 20:25:48 UTC (rev 308298)
@@ -174,8 +174,9 @@
 - Zip extension:
   . Added the filename into the return value of stream_get_meta_data(). 
(Hannes)
   . Fixed bug #53923 (Zip functions assume HAVE_GLOB is defined). (Adam)
+  . Fixed bug #53893 (Wrong return value for ZipArchive::extractTo()). (Pierre)
   . Fixed bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive).
-(Stas, Maksymilian Arciemowicz).
+(Stas, Maksymilian Arciemowicz). (CVE-2011-0421)
   . Fixed bug #53854 (Missing constants for compression type). (Richard, Adam)
   . Fixed bug #53603 (ZipArchive should quiet stat errors). (brad dot froehle 
at
 gmail dot com, Gustavo)

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

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS UPGRADING ext/spl/spl_directory.c ext/spl/tests/DirectoryIterator_getExtension_basic.phpt ext/spl/tests/SplFileInfo_getExtension_basic.phpt

2011-02-11 Thread Pierre Joye
hi,

Please add it to UPGRADING too :)

Cheers,

On Fri, Feb 11, 2011 at 11:07 PM, Peter Cowburn sala...@php.net wrote:
 salathe                                  Fri, 11 Feb 2011 22:07:22 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=308264

 Log:
 MFH - Added SplFileInfo::getExtension() (FR #48767)

 Bug: http://bugs.php.net/48767 (To be documented) SplFileInfo::getExtension()

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/UPGRADING
    U   php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c
    A   
 php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getExtension_basic.phpt
    A   
 php/php-src/branches/PHP_5_3/ext/spl/tests/SplFileInfo_getExtension_basic.phpt

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-02-11 21:13:16 UTC (rev 308263)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-02-11 22:07:22 UTC (rev 308264)
 @@ -148,7 +148,8 @@
   . Fixed bug #53914 (SPL assumes HAVE_GLOB is defined). (Chris Jones)
   . Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0
     values). (Felipe)
 -
 +  . Added SplFileInfo::getExtension(). FR #48767. (Peter Cowburn)
 +
  - SQLite3 extension:
   . Fixed memory leaked introduced by the NULL poisoning patch.
     (Mateusz Kocielski, Pierre)

 Modified: php/php-src/branches/PHP_5_3/UPGRADING
 ===
 --- php/php-src/branches/PHP_5_3/UPGRADING      2011-02-11 21:13:16 UTC (rev 
 308263)
 +++ php/php-src/branches/PHP_5_3/UPGRADING      2011-02-11 22:07:22 UTC (rev 
 308264)
 @@ -670,7 +670,9 @@
                        ReflectionClass::inNamespace()
                        ReflectionClass::getNamespaceName()
                        ReflectionClass::getShortName()
 -       - SPL           SplObjectStorage::addAll()
 +       - SPL:          DirectoryIterator::getExtension()
 +                       SplFileObject::getExtension()
 +                       SplObjectStorage::addAll()
                        SplObjectStorage::removeAll()
        - XSL:          XSLTProcessor::setProfiling()


 Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c
 ===
 --- php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c        2011-02-11 
 21:13:16 UTC (rev 308263)
 +++ php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c        2011-02-11 
 22:07:22 UTC (rev 308264)
 @@ -849,6 +849,66 @@
  }
  /* }}} */

 +/* {{{ proto string SplFileInfo::getExtension()
 +   Returns file extension component of path */
 +SPL_METHOD(SplFileInfo, getExtension)
 +{
 +       spl_filesystem_object *intern = 
 (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
 +       char *fname, *p;
 +       size_t flen;
 +       int path_len, idx;
 +
 +       if (zend_parse_parameters_none() == FAILURE) {
 +               return;
 +       }
 +
 +       spl_filesystem_object_get_path(intern, path_len TSRMLS_CC);
 +
 +       if (path_len  path_len  intern-file_name_len) {
 +               fname = intern-file_name + path_len + 1;
 +               flen = intern-file_name_len - (path_len + 1);
 +       } else {
 +               fname = intern-file_name;
 +               flen = intern-file_name_len;
 +       }
 +
 +       php_basename(fname, flen, NULL, 0, fname, flen TSRMLS_CC);
 +
 +       p = zend_memrchr(fname, '.', flen);
 +       if (p) {
 +               idx = p - fname;
 +               RETURN_STRINGL(fname + idx + 1, flen - idx - 1, 1);
 +       }
 +
 +       RETURN_EMPTY_STRING();
 +}
 +/* }}}*/
 +
 +/* {{{ proto string DirectoryIterator::getExtension()
 +   Returns the file extension component of path */
 +SPL_METHOD(DirectoryIterator, getExtension)
 +{
 +       spl_filesystem_object *intern = 
 (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
 +       char *fname, *p;
 +       size_t flen;
 +       int idx;
 +
 +       if (zend_parse_parameters_none() == FAILURE) {
 +               return;
 +       }
 +
 +       php_basename(intern-u.dir.entry.d_name, 
 strlen(intern-u.dir.entry.d_name), NULL, 0, fname, flen TSRMLS_CC);
 +
 +       p = zend_memrchr(fname, '.', flen);
 +       if (p) {
 +               idx = p - fname;
 +               RETURN_STRINGL(fname + idx + 1, flen - idx - 1, 1);
 +       }
 +
 +       RETURN_EMPTY_STRING();
 +}
 +/* }}} */
 +
  /* {{{ proto string SplFileInfo::getBasename([string $suffix]) U
    Returns filename component of path */
  SPL_METHOD(SplFileInfo, getBasename)
 @@ -1786,6 +1846,7 @@
        SPL_ME(SplFileInfo,       __construct,   arginfo_info___construct, 
 ZEND_ACC_PUBLIC)
        SPL_ME(SplFileInfo,       getPath,       arginfo_splfileinfo_void, 
 ZEND_ACC_PUBLIC)
        SPL_ME(SplFileInfo,       getFilename,   arginfo_splfileinfo_void, 
 ZEND_ACC_PUBLIC)
 +       SPL_ME(SplFileInfo,       

[PHP-CVS] svn: /php/php-src/trunk/win32/build/ Makefile.phpize

2011-02-10 Thread Pierre Joye
pajoye   Thu, 10 Feb 2011 21:40:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308229

Log:
- missing

Changed paths:
A   php/php-src/trunk/win32/build/Makefile.phpize

Added: php/php-src/trunk/win32/build/Makefile.phpize
===
--- php/php-src/trunk/win32/build/Makefile.phpize   
(rev 0)
+++ php/php-src/trunk/win32/build/Makefile.phpize   2011-02-10 21:40:50 UTC 
(rev 308229)
@@ -0,0 +1,38 @@
+CC=$(PHP_CL)
+LD=$(LINK)
+MC=$(MC)
+MT=$(MT)
+
+PHPSDK_DIR=$(PHP_DIR)
+PHPLIB=$(PHPSDK_DIR)\lib\$(PHPLIB)
+LDFLAGS=/libpath:$(PHPSDK_DIR)\lib\;$(PHPSDK_DIR)
+
+CFLAGS=/nologo /FD $(BASE_INCLUDES) /D _WINDOWS /D ZEND_WIN32=1 /D PHP_WIN32=1 
/D WIN32 /D_USE_32BIT_TIME_T=1 /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0 
/D ZTS=1 /D FD_SETSIZE=256
+CFLAGS_PHP=/D _USRDLL /D PHP5DLLTS_EXPORTS /D PHP_EXPORTS /D TSRM_EXPORTS /D 
SAPI_EXPORTS /D WINVER=0x500 /D COMPILE_DL_AJAXMIN
+
+all: $(EXT_TARGETS) $(PECL_TARGETS)
+
+build_dirs: $(BUILD_DIR) $(BUILD_DIRS_SUB)
+
+clean-pecl:
+   @echo Cleaning PECL targets only
+   -rd /s /q $(BUILD_DIR)\pecl
+
+clean-all:
+   @echo Cleaning standard build dirs
+   @for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @rd /s /q %D
+   -@del /f /q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.manifest 
$(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp 
$(PHPDEF) $(BUILD_DIR)\*.rc $(BUILD_DIR)\*.dbg $(BUILD_DIR)\*.bin 
$(BUILD_DIR)\php*.dll $(BUILD_DIR)\php*.exe  NUL
+
+clean: clean-pecl
+   @echo Cleaning distribution build dirs
+   @for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.*  
NUL
+   -@del /F /Q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk 
$(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) 
$(BUILD_DIR)\php-$(PHP_VERSION_STRING)-Win32.zip 
$(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip  NUL
+
+!if $(MT) == 
+_VC_MANIFEST_EMBED_EXE=
+_VC_MANIFEST_EMBED_DLL=
+!else
+_VC_MANIFEST_EMBED_EXE= if exist $@.manifest $(MT) -nologo -manifest 
$@.manifest -outputresource:$@;1
+_VC_MANIFEST_EMBED_DLL= if exist $@.manifest $(MT) -nologo -manifest 
$@.manifest -outputresource:$@;2
+!endif
+

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

[PHP-CVS] svn: /php/php-src/trunk/win32/build/ phpize.bat

2011-02-10 Thread Pierre Joye
pajoye   Thu, 10 Feb 2011 21:42:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308230

Log:
- missing

Changed paths:
A   php/php-src/trunk/win32/build/phpize.bat

Added: php/php-src/trunk/win32/build/phpize.bat
===
--- php/php-src/trunk/win32/build/phpize.bat(rev 0)
+++ php/php-src/trunk/win32/build/phpize.bat2011-02-10 21:42:13 UTC (rev 
308230)
@@ -0,0 +1,6 @@
+@echo off
+SET PHP_BUILDCONF_PATH=%~dp0
+cscript /nologo %PHP_BUILDCONF_PATH%\script\phpize.js %*
+copy %PHP_BUILDCONF_PATH%\win32\build\configure.bat %PHP_BUILDCONF_PATH%  nul
+IF NOT EXIST %PHP_BUILDCONF_PATH% (echo Error generating configure script, 
configure script was not copied) ELSE (echo Now run 'configure --help')
+SET PHP_BUILDCONF_PATH=

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/build/config.w32 trunk/win32/build/config.w32

2011-02-07 Thread Pierre Joye
pajoye   Mon, 07 Feb 2011 10:17:14 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308089

Log:
- disable realloc warning about not checking its return value, 100% valid but 
way too many of them for now, reduce noises

Changed paths:
U   php/php-src/branches/PHP_5_3/win32/build/config.w32
U   php/php-src/trunk/win32/build/config.w32

Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32
===
--- php/php-src/branches/PHP_5_3/win32/build/config.w32 2011-02-07 08:51:52 UTC 
(rev 308088)
+++ php/php-src/branches/PHP_5_3/win32/build/config.w32 2011-02-07 10:17:14 UTC 
(rev 308089)
@@ -416,4 +416,5 @@
 ARG_ENABLE(static-analyze, Enable the VC compiler static analyze, no);
 if (PHP_STATIC_ANALYZE == yes  PHP_SNAPSHOT_BUILD == no) {
ADD_FLAG(CFLAGS,  /analyze );
+   ADD_FLAG(CFLAGS,  /wd6308 );
 }

Modified: php/php-src/trunk/win32/build/config.w32
===
--- php/php-src/trunk/win32/build/config.w322011-02-07 08:51:52 UTC (rev 
308088)
+++ php/php-src/trunk/win32/build/config.w322011-02-07 10:17:14 UTC (rev 
308089)
@@ -416,4 +416,5 @@
 ARG_ENABLE(static-analyze, Enable the VC compiler static analyze, no);
 if (PHP_STATIC_ANALYZE == yes  PHP_SNAPSHOT_BUILD == no) {
ADD_FLAG(CFLAGS,  /analyze );
+   ADD_FLAG(CFLAGS,  /wd6308 );
 }

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_alloc.c trunk/Zend/zend_alloc.c

2011-02-07 Thread Pierre Joye
pajoye   Mon, 07 Feb 2011 10:25:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308090

Log:
- null deref fix

Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
U   php/php-src/trunk/Zend/zend_alloc.c

Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2011-02-07 10:17:14 UTC 
(rev 308089)
+++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2011-02-07 10:25:34 UTC 
(rev 308090)
@@ -241,6 +241,10 @@
return NULL;
}
storage = (zend_mm_storage*)malloc(sizeof(zend_mm_storage));
+   if (storage == NULL) {
+   HeapDestroy(heap);
+   return NULL;
+   }
storage-data = (void*) heap;
return storage;
 }
@@ -1066,7 +1070,13 @@
storage-handlers = handlers;

heap = malloc(sizeof(struct _zend_mm_heap));
-
+   if (heap == NULL) {
+   fprintf(stderr, Cannot allocate heap for zend_mm storage 
[%s]\n, handlers-name);
+#ifdef PHP_WIN32
+   fflush(stderr);
+#endif
+   exit(255);
+   }
heap-storage = storage;
heap-block_size = block_size;
heap-compact_size = 0;

Modified: php/php-src/trunk/Zend/zend_alloc.c
===
--- php/php-src/trunk/Zend/zend_alloc.c 2011-02-07 10:17:14 UTC (rev 308089)
+++ php/php-src/trunk/Zend/zend_alloc.c 2011-02-07 10:25:34 UTC (rev 308090)
@@ -241,6 +241,10 @@
return NULL;
}
storage = (zend_mm_storage*)malloc(sizeof(zend_mm_storage));
+   if (storage == NULL) {
+   HeapDestroy(heap);
+   return NULL;
+   }
storage-data = (void*) heap;
return storage;
 }
@@ -1088,7 +1092,13 @@
storage-handlers = handlers;

heap = malloc(sizeof(struct _zend_mm_heap));
-
+   if (heap == NULL) {
+   fprintf(stderr, Cannot allocate heap for zend_mm storage 
[%s]\n, handlers-name);
+#ifdef PHP_WIN32
+   fflush(stderr);
+#endif
+   exit(255);
+   }
heap-storage = storage;
heap-block_size = block_size;
heap-compact_size = 0;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/zip/php_zip.c branches/PHP_5_3/ext/zip/tests/bug53603.phpt trunk/ext/zip/php_zip.c trunk/ext/zip/tests/bug53603.phpt

2011-02-07 Thread Pierre Joye
pajoye   Mon, 07 Feb 2011 16:20:16 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308107

Log:
- Fixed bug #53893 (Wrong return value for ZipArchive::extractTo())

Bug: http://bugs.php.net/53893 (Open) Wrong return value for 
ZipArchive::extractTo()
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/zip/php_zip.c
U   php/php-src/branches/PHP_5_3/ext/zip/tests/bug53603.phpt
U   php/php-src/trunk/ext/zip/php_zip.c
U   php/php-src/trunk/ext/zip/tests/bug53603.phpt

Modified: php/php-src/branches/PHP_5_3/ext/zip/php_zip.c
===
--- php/php-src/branches/PHP_5_3/ext/zip/php_zip.c  2011-02-07 16:08:44 UTC 
(rev 308106)
+++ php/php-src/branches/PHP_5_3/ext/zip/php_zip.c  2011-02-07 16:20:16 UTC 
(rev 308107)
@@ -232,9 +232,14 @@
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot build full 
extract path);
return 0;
} else if (len  MAXPATHLEN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Full extraction 
path exceed MAXPATHLEN (%i), MAXPATHLEN);
+   efree(file_dirname_fullpath);
+   efree(file_basename);
+   free(new_state.cwd);
+   return 0;
}

/* check again the full path, not sure if it
@@ -249,27 +254,42 @@
return 0;
}

+#if PHP_API_VERSION  20100412
+   stream = php_stream_open_wrapper(fullpath, w+b, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+#else
+   stream = php_stream_open_wrapper(fullpath, w+b, REPORT_ERRORS, NULL);
+#endif
+
+   if (stream == NULL) {
+   n = -1;
+   goto done;
+   }
+
zf = zip_fopen(za, file, 0);
if (zf == NULL) {
+   n = -1;
+   php_stream_close(stream);
+   goto done;
+   }
+
+   n = 0;
+   if (stream == NULL) {
+   int ret = zip_fclose(zf);
efree(fullpath);
+   efree(file_basename);
efree(file_dirname_fullpath);
-   efree(file_basename);
free(new_state.cwd);
return 0;
}

-#if PHP_API_VERSION  20100412
-   stream = php_stream_open_wrapper(fullpath, w+b, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
-#else
-   stream = php_stream_open_wrapper(fullpath, w+b, REPORT_ERRORS, NULL);
-#endif
-   n = 0;
-   if (stream) {
-   while ((n=zip_fread(zf, b, sizeof(b)))  0) 
php_stream_write(stream, b, n);
-   php_stream_close(stream);
+   while ((n=zip_fread(zf, b, sizeof(b)))  0) {
+   php_stream_write(stream, b, n);
}
+
+   php_stream_close(stream);
n = zip_fclose(zf);

+done:
efree(fullpath);
efree(file_basename);
efree(file_dirname_fullpath);

Modified: php/php-src/branches/PHP_5_3/ext/zip/tests/bug53603.phpt
===
--- php/php-src/branches/PHP_5_3/ext/zip/tests/bug53603.phpt2011-02-07 
16:08:44 UTC (rev 308106)
+++ php/php-src/branches/PHP_5_3/ext/zip/tests/bug53603.phpt2011-02-07 
16:20:16 UTC (rev 308107)
@@ -29,10 +29,7 @@
 var_dump($a);

 --EXPECTF--
+
 Warning: ZipArchive::extractTo(teststream://test/foo): failed to open stream: 
TestStream::stream_open call failed in %s on line %d
+bool(false)

-Warning: ZipArchive::extractTo(teststream://test/bar): failed to open stream: 
TestStream::stream_open call failed in %s on line %d
-
-Warning: ZipArchive::extractTo(teststream://test/foobar/baz): failed to open 
stream: TestStream::stream_open call failed in %s on line %d
-bool(true)
-

Modified: php/php-src/trunk/ext/zip/php_zip.c
===
--- php/php-src/trunk/ext/zip/php_zip.c 2011-02-07 16:08:44 UTC (rev 308106)
+++ php/php-src/trunk/ext/zip/php_zip.c 2011-02-07 16:20:16 UTC (rev 308107)
@@ -235,6 +235,10 @@
return 0;
} else if (len  MAXPATHLEN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Full extraction 
path exceed MAXPATHLEN (%i), MAXPATHLEN);
+   efree(file_dirname_fullpath);
+   efree(file_basename);
+   free(new_state.cwd);
+   return 0;
}

/* check again the full path, not sure if it
@@ -249,27 +253,42 @@
return 0;
}

+#if PHP_API_VERSION  20100412
+   stream = php_stream_open_wrapper(fullpath, w+b, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+#else
+   stream = php_stream_open_wrapper(fullpath, w+b, REPORT_ERRORS, NULL);
+#endif
+
+   if (stream == NULL) {
+   n = -1;
+   goto done;
+   }
+
zf = zip_fopen(za, file, 0);
if (zf == NULL) {
+   n = -1;
+   

Re: [PHP-CVS] svn: /php/php-src/trunk/ext/snmp/ snmp.c

2011-02-01 Thread Pierre Joye
hi,

I wonder why you need that as we don't release snmp outside php. I
would suggest to either drop these backward compatible checks (cleaner
code) or consider to do release through pecl as well and then these
checks make sense.

Cheers,

On Tue, Feb 1, 2011 at 9:20 AM, Boris Lytochkin lytbo...@php.net wrote:
 lytboris                                 Tue, 01 Feb 2011 08:20:13 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=307898

 Log:
 preprocessed changes made in rev.307894:
 keeping ext/snmp backwards compatible

 Changed paths:
    U   php/php-src/trunk/ext/snmp/snmp.c

 Modified: php/php-src/trunk/ext/snmp/snmp.c
 ===
 --- php/php-src/trunk/ext/snmp/snmp.c   2011-02-01 07:45:30 UTC (rev 307897)
 +++ php/php-src/trunk/ext/snmp/snmp.c   2011-02-01 08:20:13 UTC (rev 307898)
 @@ -506,6 +506,9 @@

  static zend_object_value php_snmp_object_new(zend_class_entry *class_type 
 TSRMLS_DC) /* {{{ */
  {
 +#if PHP_VERSION_ID  503099
 +       zval *tmp;
 +#endif
        zend_object_value retval;
        php_snmp_object *intern;

 @@ -514,7 +517,11 @@
        memset(intern-zo, 0, sizeof(php_snmp_object));

        zend_object_std_init(intern-zo, class_type TSRMLS_CC);
 +#if PHP_VERSION_ID  503099
 +       zend_hash_copy(intern-zo.properties, 
 class_type-default_properties, (copy_ctor_func_t) zval_add_ref,(void *) 
 tmp, sizeof(zval *));
 +#else
        object_properties_init(intern-zo, class_type);
 +#endif

        retval.handle = zend_objects_store_put(intern, 
 (zend_objects_store_dtor_t)zend_objects_destroy_object, 
 (zend_objects_free_object_storage_t) php_snmp_object_free_storage, NULL 
 TSRMLS_CC);
        retval.handlers = (zend_object_handlers *) php_snmp_object_handlers;
 @@ -1795,9 +1802,13 @@
  }
  /* }}} */

 -/* {{{ php_snmp_read_property(zval *object, zval *member, int type)
 +/* {{{ php_snmp_read_property(zval *object, zval *member, int type[, const 
 zend_literal *key])
    Generic object property reader */
 +#if PHP_VERSION_ID  503099
 +zval *php_snmp_read_property(zval *object, zval *member, int type TSRMLS_DC)
 +#else
  zval *php_snmp_read_property(zval *object, zval *member, int type, const 
 zend_literal *key TSRMLS_DC)
 +#endif
  {
        zval tmp_member;
        zval *retval;
 @@ -1827,7 +1838,11 @@
                }
        } else {
                zend_object_handlers * std_hnd = 
 zend_get_std_object_handlers();
 +#if PHP_VERSION_ID  503099
 +               retval = std_hnd-read_property(object, member, type 
 TSRMLS_CC);
 +#else
                retval = std_hnd-read_property(object, member, type, key 
 TSRMLS_CC);
 +#endif
        }

        if (member == tmp_member) {
 @@ -1837,9 +1852,13 @@
  }
  /* }}} */

 -/* {{{ php_snmp_write_property(zval *object, zval *member, zval *value)
 +/* {{{ php_snmp_write_property(zval *object, zval *member, zval *value[, 
 const zend_literal *key])
    Generic object property writer */
 +#if PHP_VERSION_ID  503099
 +void php_snmp_write_property(zval *object, zval *member, zval *value 
 TSRMLS_DC)
 +#else
  void php_snmp_write_property(zval *object, zval *member, zval *value, const 
 zend_literal *key TSRMLS_DC)
 +#endif
  {
        zval tmp_member;
        php_snmp_object *obj;
 @@ -1866,7 +1885,11 @@
                }
        } else {
                zend_object_handlers * std_hnd = 
 zend_get_std_object_handlers();
 +#if PHP_VERSION_ID  503099
 +               std_hnd-write_property(object, member, value TSRMLS_CC);
 +#else
                std_hnd-write_property(object, member, value, key TSRMLS_CC);
 +#endif
        }

        if (member == tmp_member) {
 @@ -1875,9 +1898,13 @@
  }
  /* }}} */

 -/* {{{ php_snmp_has_property(zval *object, zval *member, int has_set_exists)
 +/* {{{ php_snmp_has_property(zval *object, zval *member, int 
 has_set_exists[, const zend_literal *key])
    Generic object property checker */
 +#if PHP_VERSION_ID  503099
 +static int php_snmp_has_property(zval *object, zval *member, int 
 has_set_exists TSRMLS_DC)
 +#else
  static int php_snmp_has_property(zval *object, zval *member, int 
 has_set_exists, const zend_literal *key TSRMLS_DC)
 +#endif
  {
        php_snmp_object *obj = (php_snmp_object 
 *)zend_objects_get_address(object TSRMLS_CC);
        php_snmp_prop_handler *hnd;
 @@ -1889,7 +1916,11 @@
                                ret = 1;
                                break;
                        case 0: {
 +#if PHP_VERSION_ID  503099
 +                               zval *value = php_snmp_read_property(object, 
 member, BP_VAR_IS TSRMLS_CC);
 +#else
                                zval *value = php_snmp_read_property(object, 
 member, BP_VAR_IS, key TSRMLS_CC);
 +#endif
                                if (value != EG(uninitialized_zval_ptr)) {
                                        ret = Z_TYPE_P(value) != IS_NULL? 1:0;
                                        /* refcount is 0 */
 @@ -1899,7 +1930,11 @@
                          

Re: [PHP-CVS] svn: /php/php-src/trunk/ext/snmp/ snmp.c

2011-02-01 Thread Pierre Joye
yes, but this branch is trunk and is not supposed to be 5.2
compatible. If you want to get it out with previous versions support,
then go through pecl as well. But without such external releases it
will just clutter the codes.

Cheers,

On Tue, Feb 1, 2011 at 9:51 AM, Lytochkin Boris lytbo...@gmail.com wrote:
 Hi.

 I use this module in my production Cacti environment, which uses 5.2 branch.
 As I use FreeBSD, I'm able to build snmp extension separately from
 base php as .so module and I use this possibility :)

 As long as Cacti would need 5.2 to run I will mantain those ugly
 checks (I believe this legacy will be corrected in next Cacti
 release).
 That is the only reason to make ext/snmp module be backwards
 compatible down-to php5.2

 On Tue, Feb 1, 2011 at 11:34 AM, Pierre Joye pierre@gmail.com wrote:
 hi,

 I wonder why you need that as we don't release snmp outside php. I
 would suggest to either drop these backward compatible checks (cleaner
 code) or consider to do release through pecl as well and then these
 checks make sense.

 Cheers,

 On Tue, Feb 1, 2011 at 9:20 AM, Boris Lytochkin lytbo...@php.net wrote:
 lytboris                                 Tue, 01 Feb 2011 08:20:13 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=307898

 Log:
 preprocessed changes made in rev.307894:
 keeping ext/snmp backwards compatible

 Changed paths:
    U   php/php-src/trunk/ext/snmp/snmp.c


 --
 Boris




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] svn: /php/php-src/trunk/ext/mysqlnd/ mysqlnd_auth.c

2011-02-01 Thread Pierre Joye
On Mon, Jan 31, 2011 at 3:55 PM, Andrey Hristov p...@hristov.com wrote:

 this will return emalloc-ed memory, right? Later this memory will be
 freed with free() and guess what happens :)

Is it used outside php? if not then it is a documentation matter no?
returned value has to be freed using efree.


Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/zip/php_zip.c trunk/ext/zip/php_zip.c

2011-02-01 Thread Pierre Joye
pajoye   Tue, 01 Feb 2011 10:57:51 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307905

Log:
- WS

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/zip/php_zip.c
U   php/php-src/trunk/ext/zip/php_zip.c

Modified: php/php-src/branches/PHP_5_3/ext/zip/php_zip.c
===
--- php/php-src/branches/PHP_5_3/ext/zip/php_zip.c  2011-02-01 10:52:23 UTC 
(rev 307904)
+++ php/php-src/branches/PHP_5_3/ext/zip/php_zip.c  2011-02-01 10:57:51 UTC 
(rev 307905)
@@ -2418,21 +2418,21 @@
break;
}
} else {
-/* Extract all files */
-int filecount = zip_get_num_files(intern);
+   /* Extract all files */
+   int filecount = zip_get_num_files(intern);

-if (filecount == -1) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, Illegal archive);
-RETURN_FALSE;
-}
+   if (filecount == -1) {
+   php_error_docref(NULL 
TSRMLS_CC, E_WARNING, Illegal archive);
+   RETURN_FALSE;
+   }

-for (i = 0; i  filecount; i++) {
-   char *file = (char*)zip_get_name(intern, i, 
ZIP_FL_UNCHANGED);
-if (!php_zip_extract_file(intern, pathto, file, strlen(file) 
TSRMLS_CC)) {
-RETURN_FALSE;
-}
-}
-}
+   for (i = 0; i  filecount; i++) {
+   char *file = 
(char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED);
+   if 
(!php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+   }
+   }
RETURN_TRUE;
 }
 /* }}} */

Modified: php/php-src/trunk/ext/zip/php_zip.c
===
--- php/php-src/trunk/ext/zip/php_zip.c 2011-02-01 10:52:23 UTC (rev 307904)
+++ php/php-src/trunk/ext/zip/php_zip.c 2011-02-01 10:57:51 UTC (rev 307905)
@@ -2379,12 +2379,12 @@
RETURN_FALSE;
}

-if (php_stream_stat_path_ex(pathto, PHP_STREAM_URL_STAT_QUIET, ssb, NULL) 
 0) {
-ret = php_stream_mkdir(pathto, 0777,  PHP_STREAM_MKDIR_RECURSIVE, 
NULL);
-if (!ret) {
-RETURN_FALSE;
-}
-}
+   if (php_stream_stat_path_ex(pathto, PHP_STREAM_URL_STAT_QUIET, ssb, 
NULL)  0) {
+   ret = php_stream_mkdir(pathto, 0777,  
PHP_STREAM_MKDIR_RECURSIVE, NULL);
+   if (!ret) {
+   RETURN_FALSE;
+   }
+   }

ZIP_FROM_OBJECT(intern, this);
if (zval_files  (Z_TYPE_P(zval_files) != IS_NULL)) {
@@ -2419,21 +2419,21 @@
break;
}
} else {
-/* Extract all files */
-int filecount = zip_get_num_files(intern);
+   /* Extract all files */
+   int filecount = zip_get_num_files(intern);

-if (filecount == -1) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, Illegal archive);
-RETURN_FALSE;
-}
+   if (filecount == -1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Illegal archive);
+   RETURN_FALSE;
+   }

-for (i = 0; i  filecount; i++) {
+   for (i = 0; i  filecount; i++) {
char *file = (char*)zip_get_name(intern, i, 
ZIP_FL_UNCHANGED);
-if (!php_zip_extract_file(intern, pathto, file, strlen(file) 
TSRMLS_CC)) {
-RETURN_FALSE;
-}
-}
-}
+   if (!php_zip_extract_file(intern, pathto, file, 
strlen(file) TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
+   }
+   }
RETURN_TRUE;
 }
 /* }}} */

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

[PHP-CVS] svn: /php/php-src/trunk/ext/snmp/ snmp.c

2011-02-01 Thread Pierre Joye
pajoye   Tue, 01 Feb 2011 13:57:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307914

Log:
- fix build, wrong version id

Changed paths:
U   php/php-src/trunk/ext/snmp/snmp.c

Modified: php/php-src/trunk/ext/snmp/snmp.c
===
--- php/php-src/trunk/ext/snmp/snmp.c   2011-02-01 12:16:32 UTC (rev 307913)
+++ php/php-src/trunk/ext/snmp/snmp.c   2011-02-01 13:57:06 UTC (rev 307914)
@@ -506,7 +506,7 @@

 static zend_object_value php_snmp_object_new(zend_class_entry *class_type 
TSRMLS_DC) /* {{{ */
 {
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
zval *tmp;
 #endif
zend_object_value retval;
@@ -517,7 +517,7 @@
memset(intern-zo, 0, sizeof(php_snmp_object));

zend_object_std_init(intern-zo, class_type TSRMLS_CC);
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
zend_hash_copy(intern-zo.properties, class_type-default_properties, 
(copy_ctor_func_t) zval_add_ref,(void *) tmp, sizeof(zval *));
 #else
object_properties_init(intern-zo, class_type);
@@ -1804,7 +1804,7 @@

 /* {{{ php_snmp_read_property(zval *object, zval *member, int type[, const 
zend_literal *key])
Generic object property reader */
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
 zval *php_snmp_read_property(zval *object, zval *member, int type TSRMLS_DC)
 #else
 zval *php_snmp_read_property(zval *object, zval *member, int type, const 
zend_literal *key TSRMLS_DC)
@@ -1838,7 +1838,7 @@
}
} else {
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
retval = std_hnd-read_property(object, member, type TSRMLS_CC);
 #else
retval = std_hnd-read_property(object, member, type, key 
TSRMLS_CC);
@@ -1854,7 +1854,7 @@

 /* {{{ php_snmp_write_property(zval *object, zval *member, zval *value[, const 
zend_literal *key])
Generic object property writer */
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
 void php_snmp_write_property(zval *object, zval *member, zval *value TSRMLS_DC)
 #else
 void php_snmp_write_property(zval *object, zval *member, zval *value, const 
zend_literal *key TSRMLS_DC)
@@ -1885,7 +1885,7 @@
}
} else {
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
std_hnd-write_property(object, member, value TSRMLS_CC);
 #else
std_hnd-write_property(object, member, value, key TSRMLS_CC);
@@ -1900,7 +1900,7 @@

 /* {{{ php_snmp_has_property(zval *object, zval *member, int has_set_exists[, 
const zend_literal *key])
Generic object property checker */
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
 static int php_snmp_has_property(zval *object, zval *member, int 
has_set_exists TSRMLS_DC)
 #else
 static int php_snmp_has_property(zval *object, zval *member, int 
has_set_exists, const zend_literal *key TSRMLS_DC)
@@ -1916,7 +1916,7 @@
ret = 1;
break;
case 0: {
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
zval *value = php_snmp_read_property(object, 
member, BP_VAR_IS TSRMLS_CC);
 #else
zval *value = php_snmp_read_property(object, 
member, BP_VAR_IS, key TSRMLS_CC);
@@ -1930,7 +1930,7 @@
break;
}
default: {
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
zval *value = php_snmp_read_property(object, 
member, BP_VAR_IS TSRMLS_CC);
 #else
zval *value = php_snmp_read_property(object, 
member, BP_VAR_IS, key TSRMLS_CC);
@@ -1947,7 +1947,7 @@
}
} else {
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
-#if PHP_VERSION_ID  503099
+#if PHP_VERSION_ID  50399
ret = std_hnd-has_property(object, member, has_set_exists 
TSRMLS_CC);
 #else
ret = std_hnd-has_property(object, member, has_set_exists, key 
TSRMLS_CC);

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

[PHP-CVS] svn: /SVNROOT/ global_avail

2011-01-31 Thread Pierre Joye
pajoye   Mon, 31 Jan 2011 11:17:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307875

Log:
- NEWS karma for Lytochkin

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-01-31 11:15:12 UTC (rev 307874)
+++ SVNROOT/global_avail2011-01-31 11:17:22 UTC (rev 307875)
@@ -163,7 +163,7 @@
 avail|veebert,musone,askalski,chagenbu,rjs3|php/php-src/*/ext/imap
 avail|danny,nyenyon,borg73,nobbie|php/php-src/*/ext/informix
 avail|jah,aeschbacher,daniela,ludoo,abies|php/php-src/*/ext/interbase
-avail|jamuel,thewitness,lytboris|php/php-src/*/ext/snmp,phpdoc
+avail|jamuel,thewitness,lytboris|php/php-src/*/ext/snmp,phpdoc,php/php-src/*/NEWS
 avail|akilov,stoddard,wenz,tjw|php/php-src/*/ext/java
 avail|amitay,cardoe|php/php-src/*/ext/ldap
 avail|yohgaki,fujimoto,dets|php/php-src/*/ext/mbstring,php/php-src/*/ext/pgsql

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

<    1   2   3   4   5   6   7   8   9   10   >