[PHP-CVS] com php-src: - BFN: NEWS

2013-10-05 Thread Felipe Pena
Commit:248afd1c3c0c923c15d7544b4a588396ad0c136e
Author:Felipe Pena felipe...@gmail.com Sat, 5 Oct 2013 12:52:32 
-0300
Parents:   6a823071f9b321ca8580d082c99829b1caffa8a3
Branches:  PHP-5.4 PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=248afd1c3c0c923c15d7544b4a588396ad0c136e

Log:
- BFN

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 7a7ceca..fcf34c3 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP
NEWS
 |||
 ?? ??? 2013, PHP 5.4.22
 
+- CLI server:
+  . Fixed bug #65818 (Segfault with built-in webserver and chunked transfer 
+encoding). (Felipe)
+
 - FTP:
   . Fixed bug #65667 (ftp_nb_continue produces segfault). (Philip Hofstetter)


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



[PHP-CVS] com php-src: - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding): sapi/cli/php_cli_server.c

2013-10-05 Thread Felipe Pena
Commit:3aaee86ee33af276d2e879f5a645cc6dc850de22
Author:Felipe Pena felipe...@gmail.com Sat, 5 Oct 2013 12:52:55 
-0300
Parents:   248afd1c3c0c923c15d7544b4a588396ad0c136e
Branches:  PHP-5.4 PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=3aaee86ee33af276d2e879f5a645cc6dc850de22

Log:
- Fixed bug #65818 (Segfault with built-in webserver and chunked transfer 
encoding)

Bugs:
https://bugs.php.net/65818

Changed paths:
  M  sapi/cli/php_cli_server.c


Diff:
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 4da55ac..aa4b2cd 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -1589,6 +1589,7 @@ static int 
php_cli_server_client_read_request_on_body(php_http_parser *parser, c
}
client-request.content_len = 0;
}
+   client-request.content = perealloc(client-request.content, 
client-request.content_len + length, 1);
memmove(client-request.content + client-request.content_len, at, 
length);
client-request.content_len += length;
return 0;


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: sapi/cli/php_cli_server.c

2013-10-05 Thread Felipe Pena
Commit:93f3ba66a7e238f82706cc38006836022a53aeb4
Author:Felipe Pena felipe...@gmail.com Sat, 5 Oct 2013 12:53:10 
-0300
Parents:   5bc377457e155ceaddd27a536467a4d353fdcd4f 
3aaee86ee33af276d2e879f5a645cc6dc850de22
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=93f3ba66a7e238f82706cc38006836022a53aeb4

Log:
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer 
encoding)
  - BFN

Bugs:
https://bugs.php.net/65818

Changed paths:
  MM  sapi/cli/php_cli_server.c


Diff:



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



[PHP-CVS] com php-src: FIX BUG #65219 - USE DB not being sent for FreeTDS version 0.92 FreeTDS 0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to dbus

2013-10-05 Thread Stanley Sufficool
Commit:690bbe170d9ed4597629e4e986575fbe0a2cb796
Author:Stanley Sufficool ssuffic...@php.net Sat, 5 Oct 2013 
09:54:45 -0700
Parents:   ac05cfb49912dd87264573df930d0ead3c3e0cca
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=690bbe170d9ed4597629e4e986575fbe0a2cb796

Log:
FIX BUG #65219 - USE DB not being sent for FreeTDS version  0.92
FreeTDS 0.92 does not support DBSETLDBNAME option and therefore
will not work with SQL Azure. Fallback to dbuse command in
letter versions.

Bugs:
https://bugs.php.net/65219

Changed paths:
  M  ext/pdo_dblib/dblib_driver.c


Diff:
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 2aaf397..13444b8 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -350,9 +350,10 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
 
DBSETLAPP(H-login, vars[1].optval);
 
+/* DBSETLDBNAME is only available in FreeTDS 0.92 or above */
 #ifdef DBSETLDBNAME
if (vars[3].optval) {
-   DBSETLDBNAME(H-login, vars[3].optval);
+   if(FAIL == DBSETLDBNAME(H-login, vars[3].optval)) goto cleanup;
}
 #endif
 
@@ -362,6 +363,16 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
goto cleanup;
}
 
+/*
+ * FreeTDS  0.92 does not support the DBSETLDBNAME option
+ * Send use database here after login (Will not work with SQL Azure)
+ */
+#ifndef DBSETLDBNAME
+   if (vars[3].optval) {
+   if(FAIL == dbuse(H-link, vars[3].optval)) goto gleanup;
+   }
+#endif
+
 #if PHP_DBLIB_IS_MSSQL
/* dblib do not return more than this length from text/image */
DBSETOPT(H-link, DBTEXTLIMIT, 2147483647);
@@ -377,23 +388,6 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
dbh-max_escaped_char_length = 2;
dbh-alloc_own_columns = 1;
 
-#if 0
-   /* Cache the supported data types from the servers systypes table */
-   if(dbcmd(H-link, select usertype, name from systypes order by 
usertype) != FAIL) {
-   if(dbsqlexec(H-link) != FAIL) {
-   dbresults(H-link);
-   while (dbnextrow(H-link) == SUCCESS) {
-   val = dbdata(H-link, 1);   

-   add_index_string(pdo_dblib_datatypes, *val, 
dbdata(H-link, 2), 1);
-   }
-   }
-   /* Throw out any remaining resultsets */
-   dbcancel(H-link);
-   }
-#endif
-   
-
-
 cleanup:
for (i = 0; i  nvars; i++) {
if (vars[i].freeme) {


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



[PHP-CVS] com php-src: FIX BUG #65219 - USE DB not being sent for FreeTDS version 0.92 FreeTDS 0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to dbus

2013-10-05 Thread Stanley Sufficool
Commit:5ce23f39d51b1fc53a731d9fd7d419714d3de9fb
Author:Stanley Sufficool ssuffic...@php.net Sat, 5 Oct 2013 
09:54:45 -0700
Parents:   93f3ba66a7e238f82706cc38006836022a53aeb4
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5ce23f39d51b1fc53a731d9fd7d419714d3de9fb

Log:
FIX BUG #65219 - USE DB not being sent for FreeTDS version  0.92
FreeTDS 0.92 does not support DBSETLDBNAME option and therefore
will not work with SQL Azure. Fallback to dbuse command in
letter versions.

Bugs:
https://bugs.php.net/65219

Changed paths:
  M  ext/pdo_dblib/dblib_driver.c


Diff:
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 2aaf397..13444b8 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -350,9 +350,10 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
 
DBSETLAPP(H-login, vars[1].optval);
 
+/* DBSETLDBNAME is only available in FreeTDS 0.92 or above */
 #ifdef DBSETLDBNAME
if (vars[3].optval) {
-   DBSETLDBNAME(H-login, vars[3].optval);
+   if(FAIL == DBSETLDBNAME(H-login, vars[3].optval)) goto cleanup;
}
 #endif
 
@@ -362,6 +363,16 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
goto cleanup;
}
 
+/*
+ * FreeTDS  0.92 does not support the DBSETLDBNAME option
+ * Send use database here after login (Will not work with SQL Azure)
+ */
+#ifndef DBSETLDBNAME
+   if (vars[3].optval) {
+   if(FAIL == dbuse(H-link, vars[3].optval)) goto gleanup;
+   }
+#endif
+
 #if PHP_DBLIB_IS_MSSQL
/* dblib do not return more than this length from text/image */
DBSETOPT(H-link, DBTEXTLIMIT, 2147483647);
@@ -377,23 +388,6 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
dbh-max_escaped_char_length = 2;
dbh-alloc_own_columns = 1;
 
-#if 0
-   /* Cache the supported data types from the servers systypes table */
-   if(dbcmd(H-link, select usertype, name from systypes order by 
usertype) != FAIL) {
-   if(dbsqlexec(H-link) != FAIL) {
-   dbresults(H-link);
-   while (dbnextrow(H-link) == SUCCESS) {
-   val = dbdata(H-link, 1);   

-   add_index_string(pdo_dblib_datatypes, *val, 
dbdata(H-link, 2), 1);
-   }
-   }
-   /* Throw out any remaining resultsets */
-   dbcancel(H-link);
-   }
-#endif
-   
-
-
 cleanup:
for (i = 0; i  nvars; i++) {
if (vars[i].freeme) {


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



Re: [PHP-CVS] com php-src: FIX BUG #65219 - USE DB not being sent for FreeTDS version 0.92 FreeTDS 0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to

2013-10-05 Thread Nikita Popov
On Sat, Oct 5, 2013 at 6:54 PM, Stanley Sufficool ssuffic...@php.netwrote:

 Commit:690bbe170d9ed4597629e4e986575fbe0a2cb796
 Author:Stanley Sufficool ssuffic...@php.net Sat, 5 Oct 2013
 09:54:45 -0700
 Parents:   ac05cfb49912dd87264573df930d0ead3c3e0cca
 Branches:  PHP-5.4

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=690bbe170d9ed4597629e4e986575fbe0a2cb796

 Log:
 FIX BUG #65219 - USE DB not being sent for FreeTDS version  0.92
 FreeTDS 0.92 does not support DBSETLDBNAME option and therefore
 will not work with SQL Azure. Fallback to dbuse command in
 letter versions.

 Bugs:
 https://bugs.php.net/65219

 Changed paths:
   M  ext/pdo_dblib/dblib_driver.c


 Diff:
 diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
 index 2aaf397..13444b8 100644
 --- a/ext/pdo_dblib/dblib_driver.c
 +++ b/ext/pdo_dblib/dblib_driver.c
 @@ -350,9 +350,10 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh,
 zval *driver_options TSRMLS_

 DBSETLAPP(H-login, vars[1].optval);

 +/* DBSETLDBNAME is only available in FreeTDS 0.92 or above */
  #ifdef DBSETLDBNAME
 if (vars[3].optval) {
 -   DBSETLDBNAME(H-login, vars[3].optval);
 +   if(FAIL == DBSETLDBNAME(H-login, vars[3].optval)) goto
 cleanup;
 }
  #endif

 @@ -362,6 +363,16 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh,
 zval *driver_options TSRMLS_
 goto cleanup;
 }

 +/*
 + * FreeTDS  0.92 does not support the DBSETLDBNAME option
 + * Send use database here after login (Will not work with SQL Azure)
 + */
 +#ifndef DBSETLDBNAME
 +   if (vars[3].optval) {
 +   if(FAIL == dbuse(H-link, vars[3].optval)) goto gleanup;
 +   }
 +#endif


Is that supposed to be gleanup?

Furthermore this does not look properly merged, see
https://github.com/php/php-src/network (PHP-5.4 not merged into PHP-5.5,
PHP-5.5 not merged into master).

Nikita


[PHP-CVS] com php-src: Fix bug #64338 pdo_dblib can't connect to Azure SQL: ext/pdo_dblib/dblib_driver.c

2013-10-05 Thread Stanley Sufficool
Commit:9c7dbb0487f5991fde03873ea8f5e66d6688415f
Author:Stanley Sufficool ssuffic...@php.net Sat, 5 Oct 2013 
18:26:25 -0700
Parents:   3e023c3ddf9e80046803a989f4951ee16d3b8f9b
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=9c7dbb0487f5991fde03873ea8f5e66d6688415f

Log:
Fix bug #64338 pdo_dblib can't connect to Azure SQL

Bugs:
https://bugs.php.net/64338

Changed paths:
  M  ext/pdo_dblib/dblib_driver.c


Diff:
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 8e4cbb7..daf5494 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -350,9 +350,10 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
 
DBSETLAPP(H-login, vars[1].optval);
 
+/* DBSETLDBNAME is only available in FreeTDS 0.92 or above */
 #ifdef DBSETLDBNAME
if (vars[3].optval) {
-   DBSETLDBNAME(H-login, vars[3].optval);
+   if(FAIL == DBSETLDBNAME(H-login, vars[3].optval)) goto cleanup;
}
 #endif
 
@@ -362,6 +363,16 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
goto cleanup;
}
 
+/*
+ * FreeTDS  0.92 does not support the DBSETLDBNAME option
+ * Send use database here after login (Will not work with SQL Azure)
+ */
+#ifndef DBSETLDBNAME
+   if (vars[3].optval) {
+   if(FAIL == dbuse(H-link, vars[3].optval)) goto cleanup;
+   }
+#endif
+
 #if PHP_DBLIB_IS_MSSQL
/* dblib do not return more than this length from text/image */
DBSETOPT(H-link, DBTEXTLIMIT, 2147483647);
@@ -371,29 +382,12 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
DBSETOPT(H-link, DBTEXTSIZE, 2147483647);
 
/* allow double quoted indentifiers */
-   DBSETOPT(H-link, DBQUOTEDIDENT, NULL);
+   DBSETOPT(H-link, DBQUOTEDIDENT, 1);
 
ret = 1;
dbh-max_escaped_char_length = 2;
dbh-alloc_own_columns = 1;
 
-#if 0
-   /* Cache the supported data types from the servers systypes table */
-   if(dbcmd(H-link, select usertype, name from systypes order by 
usertype) != FAIL) {
-   if(dbsqlexec(H-link) != FAIL) {
-   dbresults(H-link);
-   while (dbnextrow(H-link) == SUCCESS) {
-   val = dbdata(H-link, 1);   

-   add_index_string(pdo_dblib_datatypes, *val, 
dbdata(H-link, 2), 1);
-   }
-   }
-   /* Throw out any remaining resultsets */
-   dbcancel(H-link);
-   }
-#endif
-   
-
-
 cleanup:
for (i = 0; i  nvars; i++) {
if (vars[i].freeme) {


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



[PHP-CVS] com php-src: FIX BUG #65219 - Typo correction: ext/pdo_dblib/dblib_driver.c

2013-10-05 Thread Stanley Sufficool
Commit:fa40290fb76370c923e8f048daf1af144ff87604
Author:Stanley Sufficool ssuffic...@php.net Sat, 5 Oct 2013 
21:00:47 -0700
Parents:   5ce23f39d51b1fc53a731d9fd7d419714d3de9fb
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=fa40290fb76370c923e8f048daf1af144ff87604

Log:
FIX BUG #65219 - Typo correction

Bugs:
https://bugs.php.net/65219

Changed paths:
  M  ext/pdo_dblib/dblib_driver.c


Diff:
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 13444b8..daf5494 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -369,7 +369,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
  */
 #ifndef DBSETLDBNAME
if (vars[3].optval) {
-   if(FAIL == dbuse(H-link, vars[3].optval)) goto gleanup;
+   if(FAIL == dbuse(H-link, vars[3].optval)) goto cleanup;
}
 #endif


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



[PHP-CVS] com php-src: FIX BUG #65219 - Typo correction: ext/pdo_dblib/dblib_driver.c

2013-10-05 Thread Stanley Sufficool
Commit:63f242178d33fa22346d2e976b06a76455dbd6ab
Author:Stanley Sufficool ssuffic...@php.net Sat, 5 Oct 2013 
20:59:20 -0700
Parents:   d74b9cfee528936a50af7772c3dc56843a068c7f
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=63f242178d33fa22346d2e976b06a76455dbd6ab

Log:
FIX BUG #65219 - Typo correction

Bugs:
https://bugs.php.net/65219

Changed paths:
  M  ext/pdo_dblib/dblib_driver.c


Diff:
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 13444b8..daf5494 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -369,7 +369,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
  */
 #ifndef DBSETLDBNAME
if (vars[3].optval) {
-   if(FAIL == dbuse(H-link, vars[3].optval)) goto gleanup;
+   if(FAIL == dbuse(H-link, vars[3].optval)) goto cleanup;
}
 #endif


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