[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/proc_open.c trunk/ext/standard/proc_open.c
pajoye Mon, 06 Sep 2010 10:28:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303067 Log: - kill warning Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/proc_open.c U php/php-src/trunk/ext/standard/proc_open.c Modified: php/php-src/branches/PHP_5_3/ext/standard/proc_open.c === --- php/php-src/branches/PHP_5_3/ext/standard/proc_open.c 2010-09-06 06:44:28 UTC (rev 303066) +++ php/php-src/branches/PHP_5_3/ext/standard/proc_open.c 2010-09-06 10:28:04 UTC (rev 303067) @@ -205,7 +205,7 @@ } } - assert(p - env.envp = sizeenv); + assert((uint)(p - env.envp) = sizeenv); zend_hash_internal_pointer_reset_ex(target_hash, pos); Modified: php/php-src/trunk/ext/standard/proc_open.c === --- php/php-src/trunk/ext/standard/proc_open.c 2010-09-06 06:44:28 UTC (rev 303066) +++ php/php-src/trunk/ext/standard/proc_open.c 2010-09-06 10:28:04 UTC (rev 303067) @@ -177,7 +177,7 @@ } } - assert(p - env.envp = sizeenv); + assert((uint)(p - env.envp) = sizeenv); zend_hash_internal_pointer_reset_ex(target_hash, pos); -- 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/streamsfuncs.c trunk/ext/standard/streamsfuncs.c
pajoye Mon, 06 Sep 2010 10:39:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303068 Log: - timeval element are always 32bit long on Windows Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c U php/php-src/trunk/ext/standard/streamsfuncs.c Modified: php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c === --- php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2010-09-06 10:28:04 UTC (rev 303067) +++ php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2010-09-06 10:39:26 UTC (rev 303068) @@ -116,9 +116,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 100.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 100); + tv.tv_usec =(long)(conv % 100); +#else tv.tv_sec = conv / 100; tv.tv_usec = conv % 100; - +#endif if (zerrno) { zval_dtor(zerrno); ZVAL_LONG(zerrno, 0); @@ -258,9 +262,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 100.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 100); + tv.tv_usec = (long)(conv % 100); +#else tv.tv_sec = conv / 100; tv.tv_usec = conv % 100; - +#endif if (zpeername) { zval_dtor(zpeername); ZVAL_NULL(zpeername); Modified: php/php-src/trunk/ext/standard/streamsfuncs.c === --- php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-06 10:28:04 UTC (rev 303067) +++ php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-06 10:39:26 UTC (rev 303068) @@ -116,9 +116,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 100.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 100); + tv.tv_usec =(long)(conv % 100); +#else tv.tv_sec = conv / 100; tv.tv_usec = conv % 100; - +#endif if (zerrno) { zval_dtor(zerrno); ZVAL_LONG(zerrno, 0); @@ -258,9 +262,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 100.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 100); + tv.tv_usec = (long)(conv % 100); +#else tv.tv_sec = conv / 100; tv.tv_usec = conv % 100; - +#endif if (zpeername) { zval_dtor(zpeername); ZVAL_NULL(zpeername); -- 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/dns_win32.c trunk/ext/standard/dns_win32.c
pajoye Mon, 06 Sep 2010 10:57:42 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303069 Log: - fix bug #52260, catch all DNS not found error Bug: http://bugs.php.net/52260 (Assigned) Windows implementation of dns_get_record fails with non-existing domain Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c U php/php-src/trunk/ext/standard/dns_win32.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-06 10:39:26 UTC (rev 303068) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-06 10:57:42 UTC (rev 303069) @@ -67,6 +67,8 @@ - Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer range). (Stas) - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe) +- Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows). + (a_jelly_doughnut at phpbb dot com, Pierre) 22 Jul 2010, PHP 5.3.3 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c === --- php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c 2010-09-06 10:39:26 UTC (rev 303068) +++ php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c 2010-09-06 10:57:42 UTC (rev 303069) @@ -418,7 +418,7 @@ status = DnsQuery_A(hostname, type_to_fetch, DNS_QUERY_STANDARD, NULL, pResult, NULL); if (status) { - if (status == DNS_INFO_NO_RECORDS) { + if (status == DNS_INFO_NO_RECORDS || status == DNS_ERROR_RCODE_NAME_ERROR) { continue; } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, Dns Query failed); Modified: php/php-src/trunk/ext/standard/dns_win32.c === --- php/php-src/trunk/ext/standard/dns_win32.c 2010-09-06 10:39:26 UTC (rev 303068) +++ php/php-src/trunk/ext/standard/dns_win32.c 2010-09-06 10:57:42 UTC (rev 303069) @@ -420,7 +420,7 @@ status = DnsQuery_A(hostname, type_to_fetch, DNS_QUERY_STANDARD, NULL, pResult, NULL); if (status) { - if (status == DNS_INFO_NO_RECORDS) { + if (status == DNS_INFO_NO_RECORDS || status == DNS_ERROR_RCODE_NAME_ERROR) { continue; } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, Dns Query failed); -- 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/cgi/ fastcgi.c
dmitry Mon, 06 Sep 2010 11:11:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303072 Log: Fixed bug #46723 (FastCGI persistent connection is incredibly slow due to TCP ack delay). Bug: http://bugs.php.net/46723 (Assigned) FastCGI is incredibly slow due to TCP ack delay Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-06 11:08:43 UTC (rev 303071) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-06 11:11:40 UTC (rev 303072) @@ -67,6 +67,7 @@ # include sys/socket.h # include sys/un.h # include netinet/in.h +# include netinet/tcp.h # include arpa/inet.h # include netdb.h # include signal.h @@ -337,12 +338,13 @@ struct _fcgi_request { intlisten_socket; -#ifdef _WIN32 inttcp; -#endif intfd; intid; intkeep; +#ifdef TCP_NODELAY + intnodelay; +#endif intclosed; intin_len; @@ -746,6 +748,10 @@ req-tcp = !GetNamedPipeInfo((HANDLE)_get_osfhandle(req-listen_socket), NULL, NULL, NULL, NULL); #endif +#ifdef TCP_NODELAY + req-nodelay = 0; +#endif + fcgi_hash_init(req-env); return req; @@ -908,6 +914,18 @@ } req-keep = (((fcgi_begin_request*)buf)-flags FCGI_KEEP_CONN); +#ifdef TCP_NODELAY + if (req-keep req-tcp !req-nodelay) { +# ifdef _WIN32 + BOOL on = 1; +# else + int on = 1; +# endif + + setsockopt(req-fd, IPPROTO_TCP, TCP_NODELAY, (char*)on, sizeof(on)); + req-nodelay = 1; + } +#endif switch fcgi_begin_request*)buf)-roleB1 8) + ((fcgi_begin_request*)buf)-roleB0) { case FCGI_RESPONDER: fcgi_hash_set(req-env, FCGI_HASH_FUNC(FCGI_ROLE, sizeof(FCGI_ROLE)-1), FCGI_ROLE, sizeof(FCGI_ROLE)-1, RESPONDER, sizeof(RESPONDER)-1); @@ -1108,6 +1126,9 @@ } close(req-fd); #endif +#ifdef TCP_NODELAY + req-nodelay = 0; +#endif req-fd = -1; } } @@ -1158,25 +1179,34 @@ FCGI_LOCK(req-listen_socket); req-fd = accept(listen_socket, (struct sockaddr *)sa, len); FCGI_UNLOCK(req-listen_socket); - if (req-fd = 0 - allowed_clients - ((struct sockaddr *)sa)-sa_family == AF_INET) { - int n = 0; - int allowed = 0; + if (req-fd = 0) { + if (((struct sockaddr *)sa)-sa_family == AF_INET) { +#ifndef _WIN32 + req-tcp = 1; +#endif + if (allowed_clients) { + int n = 0; + int allowed = 0; - while (allowed_clients[n] != INADDR_NONE) { - if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) { - allowed = 1; - break; + while (allowed_clients[n] != INADDR_NONE) { + if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) { + allowed = 1; + break; + } + n++; + } + if (!allowed) { + fprintf(stderr, Connection from disallowed IP address '%s' is dropped.\n, inet_ntoa(sa.sa_inet.sin_addr)); + closesocket(req-fd); + req-fd = -1; +
[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ dns_win32.c
pajoye Mon, 06 Sep 2010 14:43:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303080 Log: - WS Changed paths: U php/php-src/trunk/ext/standard/dns_win32.c Modified: php/php-src/trunk/ext/standard/dns_win32.c === --- php/php-src/trunk/ext/standard/dns_win32.c 2010-09-06 14:43:32 UTC (rev 303079) +++ php/php-src/trunk/ext/standard/dns_win32.c 2010-09-06 14:43:44 UTC (rev 303080) @@ -124,8 +124,6 @@ status = DnsQuery_A(hostname, type, DNS_QUERY_STANDARD, NULL, pResult, NULL); - - if (status) { 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/ NEWS
pajoye Mon, 06 Sep 2010 14:54:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303086 Log: - links related fixes 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 2010-09-06 14:54:23 UTC (rev 303085) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-06 14:54:43 UTC (rev 303086) @@ -8,6 +8,7 @@ (Pierre) - Added new character sets to mysqlnd, which are available in MySQL 5.5 (Andrey) +- Improved support for is_link and related functions on Windows. (Pierre) - Fixed symbolic resolution support when the target is a DFS share. (Pierre) - Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre) @@ -61,6 +62,8 @@ - Fixed bug #52302 (mysqli_fetch_all does not work with MYSQLI_USE_RESULT). (Andrey) - Fixed bug #52221 (Misbehaviour of magic_quotes_runtime (get/set)). (Andrey) +- Fixed bug #51763 (SplFileInfo::getType() does not work symbolic link + and directory). (Pierre) - Fixed bug #51610 (Using oci_connect causes PHP to take a long time to exit). Requires Oracle bug fix 9891199 for this patch to have an effect. (Oracle Corp.) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php