[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/oci8/tests/xmltype_02.phpt trunk/ext/oci8/tests/xmltype_01.phpt trunk/ext/oci8/tests/xmltype_02.phpt

2009-09-30 Thread Christopher Jones
sixd Thu, 01 Oct 2009 06:22:32 +

Revision: http://svn.php.net/viewvc?view=revision&revision=289042

Log:
Add xmltype_02.phpt.  Add XFAIL to xmltype_01 for PHP 6

Changed paths:
A   php/php-src/branches/PHP_5_3/ext/oci8/tests/xmltype_02.phpt
U   php/php-src/trunk/ext/oci8/tests/xmltype_01.phpt
A   php/php-src/trunk/ext/oci8/tests/xmltype_02.phpt

Added: php/php-src/branches/PHP_5_3/ext/oci8/tests/xmltype_02.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/xmltype_02.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/xmltype_02.phpt	2009-10-01 06:22:32 UTC (rev 289042)
@@ -0,0 +1,197 @@
+--TEST--
+Basic XMLType test #2
+--SKIPIF--
+
+--FILE--
+
+
+1
+Southlake, Texas
+Owned
+25000
+2
+Rear load
+true
+N
+Street
+10
+
+EOF;
+
+echo "Test 1 Insert new XML data using a temporary CLOB\n";
+$s = oci_parse($c,
+"insert into xmltype_02_tab (warehouse_id, warehouse_spec)
+ values (:id, XMLType(:clob))");
+oci_bind_by_name($s, ':id', $id);
+$lob = oci_new_descriptor($c, OCI_D_LOB);
+oci_bind_by_name($s, ':clob', $lob, -1, OCI_B_CLOB);
+$lob->writeTemporary($xml);
+oci_execute($s);
+$lob->close();
+
+// Query the row back
+$s = oci_parse($c, 'select xmltype.getclobval(warehouse_spec)
+from xmltype_02_tab where warehouse_id = :id');
+$r = oci_bind_by_name($s, ':id', $id);
+oci_execute($s);
+$row = oci_fetch_array($s, OCI_NUM);
+
+var_dump($row);
+
+echo "Test 2 Manipulate the data using SimpleXML\n";
+
+$sx = simplexml_load_string((binary)$row[0]->load());
+$row[0]->free();
+var_dump($sx);
+
+$sx->Docks -= 1;  // change the data
+
+var_dump($sx);
+
+echo "Test 3: Update changes using a temporary CLOB\n";
+
+$s = oci_parse($c, 'update xmltype_02_tab
+set warehouse_spec = XMLType(:clob)
+where warehouse_id = :id');
+oci_bind_by_name($s, ':id', $id);
+$lob = oci_new_descriptor($c, OCI_D_LOB);
+oci_bind_by_name($s, ':clob', $lob, -1, OCI_B_CLOB);
+$lob->writeTemporary($sx->asXml());
+oci_execute($s);
+$lob->close();
+
+// Query the changed row back and print it
+$s = oci_parse($c, 'select xmltype.getclobval(warehouse_spec)
+from xmltype_02_tab where warehouse_id = :id');
+$r = oci_bind_by_name($s, ':id', $id);
+oci_execute($s);
+$row = oci_fetch_array($s, OCI_NUM);
+var_dump($row[0]->load());
+$row[0]->free();
+
+// Clean up
+
+//require(dirname(__FILE__).'/drop_table.inc');
+
+$stmtarray = array(
+	"drop table xmltype_02_tab"
+);
+
+foreach ($stmtarray as $stmt) {
+	$s = oci_parse($c, $stmt);
+	oci_execute($s);
+}
+
+oci_close($c);
+
+?>
+===DONE===
+
+--EXPECTF--
+Test 1 Insert new XML data using a temporary CLOB
+array(1) {
+  [0]=>
+  object(OCI-Lob)#%d (1) {
+[%u|b%"descriptor"]=>
+resource(%d) of type (oci8 descriptor)
+  }
+}
+Test 2 Manipulate the data using SimpleXML
+object(SimpleXMLElement)#%d (10) {
+  [%u|b%"WarehouseId"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"WarehouseName"]=>
+  %unicode|string%(16) "Southlake, Texas"
+  [%u|b%"Building"]=>
+  %unicode|string%(5) "Owned"
+  [%u|b%"Area"]=>
+  %unicode|string%(5) "25000"
+  [%u|b%"Docks"]=>
+  %unicode|string%(1) "2"
+  [%u|b%"DockType"]=>
+  %unicode|string%(9) "Rear load"
+  [%u|b%"WaterAccess"]=>
+  %unicode|string%(4) "true"
+  [%u|b%"RailAccess"]=>
+  %unicode|string%(1) "N"
+  [%u|b%"Parking"]=>
+  %unicode|string%(6) "Street"
+  [%u|b%"VClearance"]=>
+  %unicode|string%(2) "10"
+}
+object(SimpleXMLElement)#%d (10) {
+  [%u|b%"WarehouseId"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"WarehouseName"]=>
+  %unicode|string%(16) "Southlake, Texas"
+  [%u|b%"Building"]=>
+  %unicode|string%(5) "Owned"
+  [%u|b%"Area"]=>
+  %unicode|string%(5) "25000"
+  [%u|b%"Docks"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"DockType"]=>
+  %unicode|string%(9) "Rear load"
+  [%u|b%"WaterAccess"]=>
+  %unicode|string%(4) "true"
+  [%u|b%"RailAccess"]=>
+  %unicode|string%(1) "N"
+  [%u|b%"Parking"]=>
+  %unicode|string%(6) "Street"
+  [%u|b%"VClearance"]=>
+  %unicode|string%(2) "10"
+}
+Test 3: Update changes using a temporary CLOB
+%unicode|string%(331) "
+
+1
+Southlake, Texas
+Owned
+25000
+1
+Rear load
+true
+N
+Street
+10
+
+"
+===DONE===
\ No newline at end of file


Property changes on: php/php-src/branches/PHP_5_3/ext/oci8/tests/xmltype_02.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Modified: php/php-src/trunk/ext/oci8/tests/xmltype_01.phpt
===
--- php/php-src/trunk/ext/oci8/tests/xmltype_01.phpt	2009-10-01 06:20:24 UTC (rev 289041)
+++ php/php-src/trunk/ext/oci8/tests/xmltype_01.phpt	2009-10-01 06:22:32 UTC (rev 289042)
@@ -90,6 +90,8 @@
 echo "Done\n";

 ?>
+--XFAIL--
+Fails in PHP 6 due to an Oracle XML issue with the character set
 --EXPECT--
 Initial Dat

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

2009-09-30 Thread Christopher Jones
sixd Thu, 01 Oct 2009 06:06:41 +

Revision: http://svn.php.net/viewvc?view=revision&revision=289040

Log:
Eliminate type warnings. This change is not needed in other branches

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

Modified: php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c
===
--- php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c  2009-10-01 
05:51:11 UTC (rev 289039)
+++ php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c  2009-10-01 
06:06:41 UTC (rev 289040)
@@ -1584,7 +1584,7 @@
Return the last error of stmt|connection|global. If no error happened 
returns false. */
 PHP_FUNCTION(oci_error)
 {
-   zval *arg;
+   zval *arg = NULL;
php_oci_statement *statement;
php_oci_connection *connection;
text *errbuf;
@@ -1721,7 +1721,7 @@
 PHP_FUNCTION(oci_password_change)
 {
zval *z_connection;
-   text *user, *pass_old, *pass_new, *dbname;
+   char *user, *pass_old, *pass_new, *dbname;
int user_len, pass_old_len, pass_new_len, dbname_len;
php_oci_connection *connection;

@@ -1747,7 +1747,7 @@
RETURN_FALSE;
}

-   if (php_oci_password_change(connection, (char *)user, user_len, 
(char *)pass_old, pass_old_len, (char *)pass_new, pass_new_len TSRMLS_CC)) {
+   if (php_oci_password_change(connection, user, user_len, 
pass_old, pass_old_len, pass_new, pass_new_len TSRMLS_CC)) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -1766,7 +1766,7 @@
RETURN_FALSE;
}

-   connection = php_oci_do_connect_ex((char *)user, user_len, 
(char *)pass_old, pass_old_len, (char *)pass_new, pass_new_len, (char *)dbname, 
dbname_len, NULL, OCI_DEFAULT, 0, 0 TSRMLS_CC);
+   connection = php_oci_do_connect_ex(user, user_len, pass_old, 
pass_old_len, pass_new, pass_new_len, dbname, dbname_len, NULL, OCI_DEFAULT, 0, 
0 TSRMLS_CC);
if (!connection) {
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/oci8/oci8.c branches/PHP_5_3/ext/oci8/tests/pecl_bug16842.phpt trunk/ext/oci8/oci8.c trunk/ext/oci8/tests/pecl_bug16842.phpt

2009-09-30 Thread Christopher Jones
sixd Thu, 01 Oct 2009 05:51:11 +

Revision: http://svn.php.net/viewvc?view=revision&revision=289039

Log:
PECL Bug #16842 (oci_error return false when NO_DATA_FOUND is raised)

Bug: http://pecl.php.net/bugs/16842 (unknown) 
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/oci8/oci8.c
A   php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug16842.phpt
U   php/php-src/trunk/ext/oci8/oci8.c
A   php/php-src/trunk/ext/oci8/tests/pecl_bug16842.phpt

Modified: php/php-src/branches/PHP_5_3/ext/oci8/oci8.c
===
--- php/php-src/branches/PHP_5_3/ext/oci8/oci8.c2009-10-01 05:08:47 UTC 
(rev 289038)
+++ php/php-src/branches/PHP_5_3/ext/oci8/oci8.c2009-10-01 05:51:11 UTC 
(rev 289039)
@@ -1529,6 +1529,12 @@
break;
case OCI_NO_DATA:
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"OCI_NO_DATA");
+   errcode = php_oci_fetch_errmsg(err_p, &errbuf 
TSRMLS_CC);
+   if (errbuf) {
+   efree(errbuf);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"OCI_NO_DATA: failed to fetch error message");
+   }
break;
case OCI_ERROR:
errcode = php_oci_fetch_errmsg(err_p, &errbuf 
TSRMLS_CC);

Added: php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug16842.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug16842.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug16842.phpt  
2009-10-01 05:51:11 UTC (rev 289039)
@@ -0,0 +1,69 @@
+--TEST--
+PECL Bug #16842 (NO_DATA_FOUND exception is a warning)
+--SKIPIF--
+
+--INI--
+error_reporting = E_WARNING
+--FILE--
+
+===DONE===
+
+--EXPECTF--
+Test 1
+Raises NO_DATA_FOUND
+
+Warning: oci_execute(): OCI_NO_DATA in %s on line 11
+bool(false)
+array(4) {
+  [%u|b%"code"]=>
+  int(1403)
+  [%u|b%"message"]=>
+  %unicode|string%(45) "ORA-01403: %s
+ORA-06512: at line 1"
+  [%u|b%"offset"]=>
+  int(0)
+  [%u|b%"sqltext"]=>
+  %unicode|string%(31) "begin raise NO_DATA_FOUND; end;"
+}
+Test 2
+Raises ZERO_DIVIDE
+
+Warning: oci_execute(): ORA-01476: %s
+ORA-06512: at line 1 in %s on line 19
+bool(false)
+array(4) {
+  [%u|b%"code"]=>
+  int(1476)
+  [%u|b%"message"]=>
+  %unicode|string%(56) "ORA-01476: %s
+ORA-06512: at line 1"
+  [%u|b%"offset"]=>
+  int(0)
+  [%u|b%"sqltext"]=>
+  %unicode|string%(29) "begin raise ZERO_DIVIDE; end;"
+}
+===DONE===


Property changes on: 
php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug16842.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Modified: php/php-src/trunk/ext/oci8/oci8.c
===
--- php/php-src/trunk/ext/oci8/oci8.c   2009-10-01 05:08:47 UTC (rev 289038)
+++ php/php-src/trunk/ext/oci8/oci8.c   2009-10-01 05:51:11 UTC (rev 289039)
@@ -1371,6 +1371,12 @@
break;
case OCI_NO_DATA:
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"OCI_NO_DATA");
+   errcode = php_oci_fetch_errmsg(err_p, &errbuf 
TSRMLS_CC);
+   if (errbuf) {
+   efree(errbuf);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"OCI_NO_DATA: failed to fetch error message");
+   }
break;
case OCI_ERROR:
errcode = php_oci_fetch_errmsg(err_p, &errbuf 
TSRMLS_CC);

Added: php/php-src/trunk/ext/oci8/tests/pecl_bug16842.phpt
===
--- php/php-src/trunk/ext/oci8/tests/pecl_bug16842.phpt 
(rev 0)
+++ php/php-src/trunk/ext/oci8/tests/pecl_bug16842.phpt 2009-10-01 05:51:11 UTC 
(rev 289039)
@@ -0,0 +1,69 @@
+--TEST--
+PECL Bug #16842 (NO_DATA_FOUND exception is a warning)
+--SKIPIF--
+
+--INI--
+error_reporting = E_WARNING
+--FILE--
+
+===DONE===
+
+--EXPECTF--
+Test 1
+Raises NO_DATA_FOUND
+
+Warning: oci_execute(): OCI_NO_DATA in %s on line 11
+bool(false)
+array(4) {
+  [%u|b%"code"]=>
+  int(1403)
+  [%u|b%"message"]=>
+  %unicode|string%(45) "ORA-01403: %s
+ORA-06512: at line 1"
+  [%u|b%"offset"]=>
+  int(0)
+  [%u|b%"sqltext"]=>
+  %unicode|string%(31) "begin raise NO_DATA_FOUND; end;"
+}
+Test 2
+Raises ZERO_DIVIDE
+
+Warning: oci_execute(): ORA-01476: %s
+ORA-06512: at line 1 in %s on line 19
+bool(false)
+array(4) {
+  [%u|b%"code"]=>
+  int(1476)
+  [%u|b%"message"]=>
+  %unicode|string%(56) "ORA-01476: %s
+ORA-06512: at line 1"
+  [%u|b%"offset"]=>
+

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.ini branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.phpt branches/PHP_5_3/ext/standard/

2009-09-30 Thread Kalle Sommer Nielsen
Hi Rafael

2009/9/29 Rafael Machado Dohms :
> +--SKIPIF--
> + +       if (!extension_loaded("gd")) die("skip GD not present");
> +?>

Without looking at the test then it looks like a copy paste mistake
here. GD required for an ini test in ext/standard tests? :)

-- 
regrads,

Kalle Sommer Nielsen
ka...@php.net

--
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/ext/standard/tests/general_functions/bug49692.ini branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.phpt branches/PHP_5_3/ext/standard/

2009-09-30 Thread Kalle Sommer Nielsen
2009/10/1 Kalle Sommer Nielsen :
> Hi Rafael
>
> Without looking at the test then it looks like a copy paste mistake
> here. GD required for an ini test in ext/standard tests? :)
>

Guess I was too fast to reply to this email before seeing you already removed it



-- 
regrads,

Kalle Sommer Nielsen
ka...@php.net

-- 
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/mysqlnd/mysqlnd.h branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_struc

2009-09-30 Thread Andrey Hristov
andrey   Wed, 30 Sep 2009 23:34:56 +

Revision: http://svn.php.net/viewvc?view=revision&revision=289030

Log:
Fix ZTS build

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

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h	2009-09-30 23:19:32 UTC (rev 289029)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h	2009-09-30 23:34:56 UTC (rev 289030)
@@ -228,8 +228,8 @@
 /*/


-PHPAPI void mysqlnd_efree_param_bind_dtor(MYSQLND_PARAM_BIND * param_bind);
-PHPAPI void mysqlnd_efree_result_bind_dtor(MYSQLND_RESULT_BIND * result_bind);
+PHPAPI void mysqlnd_efree_param_bind_dtor(MYSQLND_PARAM_BIND * param_bind TSRMLS_DC);
+PHPAPI void mysqlnd_efree_result_bind_dtor(MYSQLND_RESULT_BIND * result_bind TSRMLS_DC);


 PHPAPI const char * mysqlnd_field_type_name(enum mysqlnd_field_types field_type);

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c	2009-09-30 23:19:32 UTC (rev 289029)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c	2009-09-30 23:34:56 UTC (rev 289030)
@@ -1329,7 +1329,7 @@
 		SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
 		DBG_ERR("not prepared");
 		if (param_bind && stmt->param_bind_dtor) {
-			stmt->param_bind_dtor(param_bind);
+			stmt->param_bind_dtor(param_bind TSRMLS_CC);
 		}
 		DBG_RETURN(FAIL);
 	}
@@ -1362,7 +1362,7 @@
 }
 			}
 			if (stmt->param_bind != param_bind && stmt->param_bind_dtor) {
-stmt->param_bind_dtor(stmt->param_bind);
+stmt->param_bind_dtor(stmt->param_bind TSRMLS_CC);
 			}
 		}

@@ -1465,7 +1465,7 @@
 /* {{{ mysqlnd_stmt::set_bind_param_dtor */
 static void
 MYSQLND_METHOD(mysqlnd_stmt, set_param_bind_dtor)(MYSQLND_STMT * const stmt,
-  void (*param_bind_dtor)(MYSQLND_PARAM_BIND *dtor) TSRMLS_DC)
+  void (*param_bind_dtor)(MYSQLND_PARAM_BIND * dtor TSRMLS_DC) TSRMLS_DC)
 {
 	DBG_ENTER("mysqlnd_stmt::set_bind_param_dtor");
 	DBG_INF_FMT("stmt=%p", param_bind_dtor);
@@ -1487,7 +1487,7 @@
 	if (stmt->state < MYSQLND_STMT_PREPARED) {
 		SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
 		if (result_bind && stmt->result_bind_dtor) {
-			stmt->result_bind_dtor(result_bind);
+			stmt->result_bind_dtor(result_bind TSRMLS_CC);
 		}
 		DBG_ERR("not prepared");
 		DBG_RETURN(FAIL);
@@ -1519,7 +1519,7 @@
 			stmt->result_bind[i].bound = TRUE;
 		}
 	} else if (result_bind && stmt->result_bind_dtor) {
-		stmt->result_bind_dtor(result_bind);
+		stmt->result_bind_dtor(result_bind TSRMLS_CC);
 	}
 	DBG_INF("PASS");
 	DBG_RETURN(PASS);
@@ -1574,7 +1574,7 @@
 /* {{{ mysqlnd_stmt::set_bind_result_dtor */
 static void
 MYSQLND_METHOD(mysqlnd_stmt, set_result_bind_dtor)(MYSQLND_STMT * const stmt,
-   void (*result_bind_dtor)(MYSQLND_RESULT_BIND *dtor) TSRMLS_DC)
+   void (*result_bind_dtor)(MYSQLND_RESULT_BIND * dtor TSRMLS_DC) TSRMLS_DC)
 {
 	DBG_ENTER("mysqlnd_stmt::set_bind_param_dtor");
 	DBG_INF_FMT("stmt=%p", result_bind_dtor);
@@ -1898,7 +1898,7 @@
 		}
 	}
 	if (stmt->result_bind_dtor) {
-		stmt->result_bind_dtor(stmt->result_bind);
+		stmt->result_bind_dtor(stmt->result_bind TSRMLS_CC);
 	}
 	stmt->result_bind = NULL;

@@ -1979,7 +1979,7 @@
 			}
 		}
 		if (stmt->param_bind_dtor) {
-			stmt->param_bind_dtor(stmt->param_bind);
+			stmt->param_bind_dtor(stmt->param_bind TSRMLS_CC);
 		}
 		stmt->param_bind = NULL;
 	}
@@ -2177,7 +2177,7 @@

 /* {{{ mysqlnd_efree_param_bind_dtor */
 PHPAPI void
-mysqlnd_efree_param_bind_dtor(MYSQLND_PARAM_BIND * param_bind)
+mysqlnd_efree_param_bind_dtor(MYSQLND_PARAM_BIND * param_bind TSRMLS_DC)
 {
 	mnd_efree(param_bind);
 }
@@ -2186,7 +2186,7 @@

 /* {{{ mysqlnd_efree_result_bind_dtor */
 PHPAPI void
-mysqlnd_efree_result_bind_dtor(MYSQLND_RESULT_BIND * result_bind)
+mysqlnd_efree_result_bind_dtor(MYSQLND_RESULT_BIND * result_bind TSRMLS_DC)
 {
 	mnd_efree(result_bind);
 }

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c
===
--- php/php-src/branches/PHP_5_3/

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h branches/PHP_5_3/ext/mysqlnd/mysqlnd_palloc.c branches/PHP_5_3/ext/mysqlnd/mysqlnd

2009-09-30 Thread Andrey Hristov
andrey   Wed, 30 Sep 2009 23:13:43 +

Revision: http://svn.php.net/viewvc?view=revision&revision=289028

Log:
Use mnd_ wrappers wherever possible. Needed for
statistics.

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_enum_n_def.h
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_palloc.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_palloc.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c	2009-09-30 22:26:19 UTC (rev 289027)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c	2009-09-30 23:13:43 UTC (rev 289028)
@@ -96,7 +96,7 @@
 		unsigned int i;
 		for (i = 0; i < conn->options.num_commands; i++) {
 			/* allocated with pestrdup */
-			pefree(conn->options.init_commands[i], pers);
+			mnd_pefree(conn->options.init_commands[i], pers);
 		}
 		mnd_pefree(conn->options.init_commands, pers);
 		conn->options.init_commands = NULL;
@@ -669,7 +669,12 @@

 	conn->greet_charset = mysqlnd_find_charset_nr(greet_packet.charset_no);
 	/* we allow load data local infile by default */
-	mysql_flags  |= CLIENT_LOCAL_FILES;
+	mysql_flags  |= CLIENT_LOCAL_FILES | CLIENT_PS_MULTI_RESULTS;
+#ifndef MYSQLND_COMPRESSION_ENABLED
+	if (mysql_flags & CLIENT_COMPRESS) {
+		mysql_flags &= ~CLIENT_COMPRESS;
+	}
+#endif

 	auth_packet->user		= user;
 	auth_packet->password	= passwd;

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h	2009-09-30 22:26:19 UTC (rev 289027)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h	2009-09-30 23:13:43 UTC (rev 289028)
@@ -73,6 +73,7 @@
 #define CLIENT_SECURE_CONNECTION	32768	/* New 4.1 authentication */
 #define CLIENT_MULTI_STATEMENTS		(1UL << 16) /* Enable/disable multi-stmt support */
 #define CLIENT_MULTI_RESULTS		(1UL << 17) /* Enable/disable multi-results */
+#define CLIENT_PS_MULTI_RESULTS		(1UL << 18) /* Multi-results in PS-protocol */

 typedef enum mysqlnd_extension
 {

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_palloc.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_palloc.c	2009-09-30 22:26:19 UTC (rev 289027)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_palloc.c	2009-09-30 23:13:43 UTC (rev 289028)
@@ -42,7 +42,7 @@
 /* {{{ _mysqlnd_palloc_init_cache */
 PHPAPI MYSQLND_ZVAL_PCACHE* _mysqlnd_palloc_init_cache(unsigned int cache_size TSRMLS_DC)
 {
-	MYSQLND_ZVAL_PCACHE *ret = calloc(1, sizeof(MYSQLND_ZVAL_PCACHE));
+	MYSQLND_ZVAL_PCACHE *ret = mnd_calloc(1, sizeof(MYSQLND_ZVAL_PCACHE));
 	unsigned int i;

 	DBG_ENTER("_mysqlnd_palloc_init_cache");
@@ -58,13 +58,13 @@

 	/* 1. First initialize the free list part of the structure */
 	/* One more for empty position of last_added - always 0x0, bounds checking */
-	ret->free_list.ptr_line = calloc(ret->max_items + 1, sizeof(mysqlnd_zval *));
+	ret->free_list.ptr_line = mnd_calloc(ret->max_items + 1, sizeof(mysqlnd_zval *));
 	ret->free_list.last_added = ret->free_list.ptr_line + ret->max_items;
 	ret->free_list.canary1 = (void*)0xBEEF;
 	ret->free_list.canary2 = (void*)0xAFFE;

 	/* 3. Allocate and initialize our zvals and initialize the free list */
-	ret->block = calloc(ret->max_items, sizeof(mysqlnd_zval));
+	ret->block = mnd_calloc(ret->max_items, sizeof(mysqlnd_zval));
 	ret->last_in_block = &(ret->block[ret->max_items]);
 	for (i = 0; i < ret->max_items; i++) {
 		/* 1. Initialize */
@@ -124,7 +124,7 @@
 /* {{{ _mysqlnd_palloc_init_thd_cache */
 PHPAPI MYSQLND_THD_ZVAL_PCACHE* _mysqlnd_palloc_init_thd_cache(MYSQLND_ZVAL_PCACHE * const cache TSRMLS_DC)
 {
-	MYSQLND_THD_ZVAL_PCACHE *ret = calloc(1, sizeof(MYSQLND_THD_ZVAL_PCACHE));
+	MYSQLND_THD_ZVAL_PCACHE *ret = mnd_calloc(1, sizeof(MYSQLND_THD_ZVAL_PCACHE));
 	DBG_ENTER("_mysqlnd_palloc_init_thd_cache");
 	DBG_INF_FMT("ret = %p", ret);

@@ -146,7 +146,7 @@
 	ret->references = 1;

 	/* 1. Initialize the GC list */
-	ret->gc_list.ptr_line = calloc(cache->max_items, sizeof(mysqlnd_zval *));
+	ret->gc_list.ptr_line = mnd_calloc(cache->max_items, sizeof(mysqlnd_zval *));
 	/* Backward and forward looping is possible */
 	ret->gc_list.last_added = ret->gc_list.ptr_line;
 	ret->gc_list.canary1 = (void*)0

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

2009-09-30 Thread Andrey Hristov
andrey   Wed, 30 Sep 2009 22:26:19 +

Revision: http://svn.php.net/viewvc?view=revision&revision=289027

Log:
Fix trace output. DBG_RETURN should be used in traced
functions.

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

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c   2009-09-30 
21:58:19 UTC (rev 289026)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c   2009-09-30 
22:26:19 UTC (rev 289027)
@@ -1882,9 +1882,9 @@

if (result->m.fetch_row) {
if (result->m.fetch_row == result->m.fetch_row_normal_buffered) 
{
-   return mysqlnd_fetch_row_buffered_c(result TSRMLS_CC);
+   DBG_RETURN(mysqlnd_fetch_row_buffered_c(result 
TSRMLS_CC));
} else if (result->m.fetch_row == 
result->m.fetch_row_normal_unbuffered) {
-   return mysqlnd_fetch_row_unbuffered_c(result TSRMLS_CC);
+   DBG_RETURN(mysqlnd_fetch_row_unbuffered_c(result 
TSRMLS_CC));
} else {
*((int*)NULL) = 1;
}

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
===
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c  2009-09-30 21:58:19 UTC 
(rev 289026)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c  2009-09-30 22:26:19 UTC 
(rev 289027)
@@ -1882,9 +1882,9 @@

if (result->m.fetch_row) {
if (result->m.fetch_row == result->m.fetch_row_normal_buffered) 
{
-   return mysqlnd_fetch_row_buffered_c(result TSRMLS_CC);
+   DBG_RETURN(mysqlnd_fetch_row_buffered_c(result 
TSRMLS_CC));
} else if (result->m.fetch_row == 
result->m.fetch_row_normal_unbuffered) {
-   return mysqlnd_fetch_row_unbuffered_c(result TSRMLS_CC);
+   DBG_RETURN(mysqlnd_fetch_row_unbuffered_c(result 
TSRMLS_CC));
} else {
*((int*)NULL) = 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_2/NEWS branches/PHP_5_2/main/network.c branches/PHP_5_3/NEWS branches/PHP_5_3/main/network.c trunk/main/network.c

2009-09-30 Thread Ilia Alshanetsky
iliaaWed, 30 Sep 2009 20:48:41 +

Revision: http://svn.php.net/viewvc?view=revision&revision=289019

Log:
Fixed bug #48805 (IPv6 socket transport is not working).

Bug: http://bugs.php.net/48805 (Assigned) IPv6 socket transport is not working
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/main/network.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/main/network.c
U   php/php-src/trunk/main/network.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-09-30 20:20:04 UTC (rev 289018)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-09-30 20:48:41 UTC (rev 289019)
@@ -19,6 +19,7 @@
   of a multibyte character). (Moriyoshi)
 - Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrondly converted).
   (Moriyoshi)
+- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)

 17 Sep 2009, PHP 5.2.11
 - Fixed certificate validation inside php_openssl_apply_verification_policy.

Modified: php/php-src/branches/PHP_5_2/main/network.c
===
--- php/php-src/branches/PHP_5_2/main/network.c 2009-09-30 20:20:04 UTC (rev 
289018)
+++ php/php-src/branches/PHP_5_2/main/network.c 2009-09-30 20:48:41 UTC (rev 
289019)
@@ -786,7 +786,7 @@
switch (sa->sa_family) {
 #if HAVE_GETADDRINFO && HAVE_IPV6
case AF_INET6:
-   if (bindto && strchr(bindto, ':')) {
+   if (!bindto || strchr(bindto, ':')) {
((struct sockaddr_in6 
*)sa)->sin6_family = sa->sa_family;
((struct sockaddr_in6 *)sa)->sin6_port 
= htons(port);
socklen = sizeof(struct sockaddr_in6);

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-09-30 20:20:04 UTC (rev 289018)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-09-30 20:48:41 UTC (rev 289019)
@@ -19,6 +19,7 @@
   cannot be set"). (Felipe)
 - Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
   fclose). (Ilia)
+- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)

 ?? ??? 2009, PHP 5.3.1RC? <- WHY IS THIS HERE? Gonna be released after 5.3.1 
or what??
 - Upgraded bundled sqlite to version 3.6.18. (Ilia)

Modified: php/php-src/branches/PHP_5_3/main/network.c
===
--- php/php-src/branches/PHP_5_3/main/network.c 2009-09-30 20:20:04 UTC (rev 
289018)
+++ php/php-src/branches/PHP_5_3/main/network.c 2009-09-30 20:48:41 UTC (rev 
289019)
@@ -792,7 +792,7 @@
switch (sa->sa_family) {
 #if HAVE_GETADDRINFO && HAVE_IPV6
case AF_INET6:
-   if (bindto && strchr(bindto, ':')) {
+   if (!bindto || strchr(bindto, ':')) {
((struct sockaddr_in6 
*)sa)->sin6_family = sa->sa_family;
((struct sockaddr_in6 *)sa)->sin6_port 
= htons(port);
socklen = sizeof(struct sockaddr_in6);

Modified: php/php-src/trunk/main/network.c
===
--- php/php-src/trunk/main/network.c2009-09-30 20:20:04 UTC (rev 289018)
+++ php/php-src/trunk/main/network.c2009-09-30 20:48:41 UTC (rev 289019)
@@ -792,7 +792,7 @@
switch (sa->sa_family) {
 #if HAVE_GETADDRINFO && HAVE_IPV6
case AF_INET6:
-   if (bindto && strchr(bindto, ':')) {
+   if (!bindto || strchr(bindto, ':')) {
((struct sockaddr_in6 
*)sa)->sin6_family = sa->sa_family;
((struct sockaddr_in6 *)sa)->sin6_port 
= htons(port);
socklen = sizeof(struct sockaddr_in6);

-- 
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/mysql/php_mysql.c branches/PHP_5_3/ext/mysql/tests/mysql_fetch_array.phpt branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c trunk/ext/mysql/php_mysql.c tr

2009-09-30 Thread Ulf Wendel
uw   Wed, 30 Sep 2009 14:39:33 +

Revision: http://svn.php.net/viewvc?view=revision&revision=289004

Log:
Fixing a leak in mysqlnd when passing invalid fetch modes to mysqlnd.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
U   php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_fetch_array.phpt
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
U   php/php-src/trunk/ext/mysql/php_mysql.c
U   php/php-src/trunk/ext/mysql/tests/mysql_fetch_array.phpt
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c

Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
===
--- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c  2009-09-30 14:34:32 UTC 
(rev 289003)
+++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c  2009-09-30 14:39:33 UTC 
(rev 289004)
@@ -1972,7 +1972,7 @@
}
}

-   if ((result_type & MYSQL_BOTH) == 0) {
+   if (result_type & ~MYSQL_BOTH) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type 
should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH");
result_type = MYSQL_BOTH;
}
@@ -2149,6 +2149,11 @@
}
ZEND_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, -1, "MySQL 
result", le_result);

+   if (mode & ~MYSQL_BOTH) {
+php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type 
should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH");
+mode = MYSQL_BOTH;
+}
+
mysqlnd_fetch_into(result, mode, return_value, MYSQLND_MYSQL);
 #endif
 }

Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_fetch_array.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_fetch_array.phpt 
2009-09-30 14:34:32 UTC (rev 289003)
+++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_fetch_array.phpt 
2009-09-30 14:39:33 UTC (rev 289004)
@@ -56,7 +56,7 @@
 do {
$illegal_mode = mt_rand(0, 1);
 } while (in_array($illegal_mode, array(MYSQL_ASSOC, MYSQL_NUM, MYSQL_BOTH)));
-$tmp = @mysql_fetch_array($res, $illegal_mode);
+$tmp = mysql_fetch_array($res, $illegal_mode);
 if (!is_array($tmp))
printf("[013] Expecting array, got %s/%s. [%d] %s\n",
gettype($tmp), $tmp, mysql_errno($link), mysql_error($link));
@@ -355,5 +355,7 @@
   %unicode|string%(1) "1"
 }

+Warning: mysql_fetch_array(): The result type should be either MYSQL_NUM, 
MYSQL_ASSOC or MYSQL_BOTH in %s on line %d
+
 Warning: mysql_fetch_array(): %d is not a valid MySQL result resource in %s on 
line %d
 done!

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c   2009-09-30 
14:34:32 UTC (rev 289003)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c   2009-09-30 
14:39:33 UTC (rev 289004)
@@ -901,13 +901,8 @@
lengths[i] = len;
}

-   /* Forbid ZE to free it, we will clean it */
-   Z_ADDREF_P(data);
-
-   if ((flags & MYSQLND_FETCH_BOTH) == 
MYSQLND_FETCH_BOTH) {
-   Z_ADDREF_P(data);
-   }
if (flags & MYSQLND_FETCH_NUM) {
+   Z_ADDREF_P(data);
zend_hash_next_index_insert(row_ht, 
&data, sizeof(zval *), NULL);
}
if (flags & MYSQLND_FETCH_ASSOC) {
@@ -918,6 +913,7 @@
  the index is a numeric and convert it 
to it. This however means constant
  hashing of the column name, which is 
not needed as it can be precomputed.
*/
+   Z_ADDREF_P(data);
if (zend_hash_key->is_numeric == FALSE) 
{
 #if PHP_MAJOR_VERSION >= 6

zend_u_hash_quick_update(Z_ARRVAL_P(row), IS_UNICODE,
@@ -1128,16 +1124,8 @@
for (i = 0; i < result->field_count; i++, field++, 
zend_hash_key++) {
zval *data = current_row[i];

-   /*
- Let us later know what to do with this zval. If 
ref_count > 1, we will just
- decrease it, otherwise free it. zval_ptr_dtor() make 
this very easy job.
-   */
-   Z_ADDREF_P(data);
-
-   if ((flags & MYSQLND_FETCH_BOTH) == MYSQLND_FETCH_BOTH) 
{
-   Z_ADDREF_P(data);
- 

[PHP-CVS] svn: /php/win-installer/trunk/ PHPInstallerBase52.wxs PHPInstallerBase52NTS.wxs PHPInstallerBase53.wxs PHPInstallerBase53NTS.wxs PHPInstallerBase60.wxs PHPInstallerBase60NTS.wxs PHPInstaller

2009-09-30 Thread John Mertic
jmertic  Wed, 30 Sep 2009 13:44:28 +

Revision: http://svn.php.net/viewvc?view=revision&revision=288996

Log:
Bug #47855 - Change the VBScript custom actions to be deferred and not to 
impersonate the installing user, so the apache config changes are made as an 
elevated privileges user. Solves problem of not being able to install with 
Apache under Windows Vista/2008/7.

Bug: http://bugs.php.net/47855 (Assigned) VC6 Thread Safe MSI install fails
  
Changed paths:
U   php/win-installer/trunk/PHPInstallerBase52.wxs
U   php/win-installer/trunk/PHPInstallerBase52NTS.wxs
U   php/win-installer/trunk/PHPInstallerBase53.wxs
U   php/win-installer/trunk/PHPInstallerBase53NTS.wxs
U   php/win-installer/trunk/PHPInstallerBase60.wxs
U   php/win-installer/trunk/PHPInstallerBase60NTS.wxs
U   php/win-installer/trunk/PHPInstallerScripts52.vbs
U   php/win-installer/trunk/PHPInstallerScripts53.vbs
U   php/win-installer/trunk/PHPInstallerScripts60.vbs

Modified: php/win-installer/trunk/PHPInstallerBase52.wxs
===
--- php/win-installer/trunk/PHPInstallerBase52.wxs	2009-09-30 13:32:18 UTC (rev 288995)
+++ php/win-installer/trunk/PHPInstallerBase52.wxs	2009-09-30 13:44:28 UTC (rev 288996)
@@ -708,7 +708,7 @@
   DllEntry="CAQuietExec"
   Return="ignore"
   Execute="deferred"
-  Impersonate="no" />
+  Impersonate="no" />
 
@@ -784,18 +784,34 @@
 
+
 
 
+
 

 
@@ -949,18 +965,24 @@
   
 
   
-  
+  
 
   
+  
+
+  
   
 
   
-  
-
+  
+
   
-  
+  
 
   
+  
+
+  
   
 


Modified: php/win-installer/trunk/PHPInstallerBase52NTS.wxs
===
--- php/win-installer/trunk/PHPInstallerBase52NTS.wxs	2009-09-30 13:32:18 UTC (rev 288995)
+++ php/win-installer/trunk/PHPInstallerBase52NTS.wxs	2009-09-30 13:44:28 UTC (rev 288996)
@@ -651,10 +651,18 @@
 
+
 

 
@@ -748,9 +756,6 @@
   
 
   
-  
-
-  
   
 
   
@@ -793,6 +798,12 @@
   
 
   
+  
+
+  
+  
+
+  
   
 
   

Modified: php/win-installer/trunk/PHPInstallerBase53.wxs
===
--- php/win-installer/trunk/PHPInstallerBase53.wxs	2009-09-30 13:32:18 UTC (rev 288995)
+++ php/win-installer/trunk/PHPInstallerBase53.wxs	2009-09-30 13:44:28 UTC (rev 288996)
@@ -770,18 +770,34 @@
 
+
 
 
+
 

 
@@ -935,18 +951,24 @@
   
 
   
-  
+  
 
   
+  
+
+  
   
 
   
-  
-
+  
+
   
-  
+  
 
   
+  
+
+  
   
 


Modified: php/win-installer/trunk/PHPInstallerBase53NTS.wxs
===
--- php/win-installer/trunk/PHPInstallerBase53NTS.wxs	2009-09-30 13:32:18 UTC (rev 288995)
+++ php/win-installer/trunk/PHPInstallerBase53NTS.wxs	2009-09-30 13:44:28 UTC (rev 288996)
@@ -584,7 +584,7 @@
   DllEntry="CAQuietExec"
   Return="ignore"
   Execute="deferred"
-  Impersonate="no" />
+  Impersonate="no" />
 
@@ -660,10 +660,18 @@
 
+
 

 
@@ -757,9 +765,6 @@
   
 
   
-  
-
-  
   
 
   
@@ -802,6 +807,12 @@
   
 
   
+  
+
+  
+  
+
+  
   
 
   

Modified: php/win-installer/trunk/PHPInstallerBase60.wxs
===
--- php/win-installer/trunk/PHPInstallerBase60.wxs	2009-09-30 13:32:18 UTC (rev 288995)
+++ php/win-installer/trunk/PHPInstallerBase60.wxs	2009-09-30 13:44:28 UTC (rev 288996)
@@ -695,7 +695,7 @@
   DllEntry="CAQuietExec"
   Return="ignore"
   Execute="deferred"
-  Impersonate="no" />
+  Impersonate="no" />
 
@@ -771,18 +771,34 @@
 
+
 
 
+
 

 
@@ -936,18 +952,24 @@
   
 
   
-  
+  
 
   
+  
+
+  
   
 
   
-  
-
+  
+
   
-  
+  
 
   
+  
+
+  
   
 


Modified: php/win-installer/trunk/PHPInstallerBase60NTS.wxs
===
--- php/win-installer/trunk/PHPInstallerBase60NTS.wxs	2009-09-30 13:32:18 UTC (rev 288995)
+++ php/win-installer/trunk/PHPInstallerBase60NTS.wxs	2009-09-30 13:44:28 UTC (rev 288996)
@@ -590,7 +590,7 @@
   DllEntry="CAQuietExec"
   Return="ignore"
   Execute="deferred"
-  Impersonate="no" />
+  Impersonate="no" />
 
@@ -666,

[PHP-CVS] svn: /php/php-src/trunk/ext/posix/tests/ posix_setuid_variation3.phpt

2009-09-30 Thread Felipe Pena
felipe   Wed, 30 Sep 2009 13:30:32 +

Revision: http://svn.php.net/viewvc?view=revision&revision=288994

Log:
- Fixed test

Changed paths:
U   php/php-src/trunk/ext/posix/tests/posix_setuid_variation3.phpt

Modified: php/php-src/trunk/ext/posix/tests/posix_setuid_variation3.phpt
===
--- php/php-src/trunk/ext/posix/tests/posix_setuid_variation3.phpt  
2009-09-30 13:04:28 UTC (rev 288993)
+++ php/php-src/trunk/ext/posix/tests/posix_setuid_variation3.phpt  
2009-09-30 13:30:32 UTC (rev 288994)
@@ -8,10 +8,6 @@
 Marco Fabbri mrfab...@gmail.com
 Francesco Fullone f...@ideato.it
 #PHPTestFest Cesena Italia on 2009-06-20
---SKIPIF--
-
 --FILE--
 -- 
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/pcntl/pcntl.c trunk/ext/pcntl/pcntl.c

2009-09-30 Thread Dmitry Stogov
dmitry   Wed, 30 Sep 2009 13:04:28 +

Revision: http://svn.php.net/viewvc?view=revision&revision=288993

Log:
pcntl_exec() should inherit environment in case it's not provided as an argument

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

Modified: php/php-src/branches/PHP_5_3/ext/pcntl/pcntl.c
===
--- php/php-src/branches/PHP_5_3/ext/pcntl/pcntl.c  2009-09-30 12:40:17 UTC 
(rev 288992)
+++ php/php-src/branches/PHP_5_3/ext/pcntl/pcntl.c  2009-09-30 13:04:28 UTC 
(rev 288993)
@@ -727,16 +727,19 @@
if (return_val == HASH_KEY_IS_LONG) efree(key);
}
*(pair) = NULL;
-   }
+
+   if (execve(path, argv, envp) == -1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has 
occured: (errno %d) %s", errno, strerror(errno));
+   }

-   if (execve(path, argv, envp) == -1) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has occured: 
(errno %d) %s", errno, strerror(errno));
-   }
-
-   /* Cleanup */
-   if (envp != NULL) {
+   /* Cleanup */
for (pair = envp; *pair != NULL; pair++) efree(*pair);
efree(envp);
+   } else {
+
+   if (execv(path, argv) == -1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has 
occured: (errno %d) %s", errno, strerror(errno));
+   }
}

efree(argv);

Modified: php/php-src/trunk/ext/pcntl/pcntl.c
===
--- php/php-src/trunk/ext/pcntl/pcntl.c 2009-09-30 12:40:17 UTC (rev 288992)
+++ php/php-src/trunk/ext/pcntl/pcntl.c 2009-09-30 13:04:28 UTC (rev 288993)
@@ -727,18 +727,21 @@
if (return_val == HASH_KEY_IS_LONG) efree(key);
}
*(pair) = NULL;
-   }
-
-   if (execve(path, argv, envp) == -1) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has occured: 
(errno %d) %s", errno, strerror(errno));
-   }
-
-   /* Cleanup */
-   if (envp != NULL) {
+
+   if (execve(path, argv, envp) == -1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has 
occured: (errno %d) %s", errno, strerror(errno));
+   }
+
+   /* Cleanup */
for (pair = envp; *pair != NULL; pair++) efree(*pair);
efree(envp);
+   } else {
+
+   if (execv(path, argv) == -1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has 
occured: (errno %d) %s", errno, strerror(errno));
+   }
}
-
+
efree(argv);

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/win32/build/config.w32 trunk/win32/build/config.w32

2009-09-30 Thread Pierre-Alain Joye
pajoye   Wed, 30 Sep 2009 11:53:29 +

Revision: http://svn.php.net/viewvc?view=revision&revision=288988

Log:
- restore W3 flag to get usefull errors (unused vars, etc.)

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 2009-09-30 11:52:14 UTC 
(rev 288987)
+++ php/php-src/branches/PHP_5_3/win32/build/config.w32 2009-09-30 11:53:29 UTC 
(rev 288988)
@@ -119,7 +119,7 @@

 // General CFLAGS for building objects
 DEFINE("CFLAGS", "/nologo /FD $(BASE_INCLUDES) /D _WINDOWS \
-/D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS");
+/D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 ");

 if (VCVERS < 1400) {
// Enable automatic precompiled headers
@@ -177,7 +177,7 @@

 // Set some debug/release specific options
 if (PHP_DEBUG == "yes") {
-   ADD_FLAG("CFLAGS", "/LDd /MDd /Gm /Od /D _DEBUG /D ZEND_DEBUG=1 " +
+   ADD_FLAG("CFLAGS", "/LDd /MDd /W3 /Gm /Od /D _DEBUG /D ZEND_DEBUG=1 " +
(X64?"/Zi":"/ZI"));
ADD_FLAG("LDFLAGS", "/debug");
// Avoid problems when linking to release libraries that use the release

Modified: php/php-src/trunk/win32/build/config.w32
===
--- php/php-src/trunk/win32/build/config.w322009-09-30 11:52:14 UTC (rev 
288987)
+++ php/php-src/trunk/win32/build/config.w322009-09-30 11:53:29 UTC (rev 
288988)
@@ -177,7 +177,7 @@

 // Set some debug/release specific options
 if (PHP_DEBUG == "yes") {
-   ADD_FLAG("CFLAGS", "/LDd /MDd /Gm /Od /D _DEBUG /D ZEND_DEBUG=1 " +
+   ADD_FLAG("CFLAGS", "/LDd /MDd /W3 /Gm /Od /D _DEBUG /D ZEND_DEBUG=1 " +
(X64?"/Zi":"/ZI"));
ADD_FLAG("LDFLAGS", "/debug");
// Avoid problems when linking to release libraries that use the release

-- 
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_2/ext/curl/ interface.c

2009-09-30 Thread Felipe Pena
felipe   Wed, 30 Sep 2009 11:25:13 +

Revision: http://svn.php.net/viewvc?view=revision&revision=288985

Log:
- Fix build

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

Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-09-30 08:34:40 UTC 
(rev 288984)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-09-30 11:25:13 UTC 
(rev 288985)
@@ -1229,19 +1229,19 @@
dupch->cp = cp;
dupch->uses = 0;
if (ch->handlers->write->stream) {
-   Z_ADDREF_P(dupch->handlers->write->stream);
+   zval_add_ref(dupch->handlers->write->stream);
dupch->handlers->write->stream = ch->handlers->write->stream;
}
dupch->handlers->write->method = ch->handlers->write->method;
dupch->handlers->write->type   = ch->handlers->write->type;
if (ch->handlers->read->stream) {
-   Z_ADDREF_P(ch->handlers->read->stream);
+   zval_add_ref(ch->handlers->read->stream);
}
dupch->handlers->read->stream  = ch->handlers->read->stream;
dupch->handlers->read->method  = ch->handlers->read->method;
dupch->handlers->write_header->method = 
ch->handlers->write_header->method;
if (ch->handlers->write_header->stream) {
-   Z_ADDREF_P(ch->handlers->write_header->stream);
+   zval_add_ref(ch->handlers->write_header->stream);
}
dupch->handlers->write_header->stream = 
ch->handlers->write_header->stream;

@@ -1469,7 +1469,7 @@
switch (option) {
case CURLOPT_FILE:
if (((php_stream *) what)->mode[0] != 
'r' || ((php_stream *) what)->mode[1] == '+') {
-   Z_ADDREF_PP(zvalue);
+   zval_add_ref(zvalue);
ch->handlers->write->fp = fp;
ch->handlers->write->method = 
PHP_CURL_FILE;
ch->handlers->write->stream = 
*zvalue;
@@ -1481,7 +1481,7 @@
break;
case CURLOPT_WRITEHEADER:
if (((php_stream *) what)->mode[0] != 
'r' || ((php_stream *) what)->mode[1] == '+') {
-   Z_ADDREF_PP(zvalue);
+   zval_add_ref(zvalue);
ch->handlers->write_header->fp 
= fp;

ch->handlers->write_header->method = PHP_CURL_FILE;

ch->handlers->write_header->stream = *zvalue;
@@ -1492,7 +1492,7 @@
}
break;
case CURLOPT_INFILE:
-   Z_ADDREF_PP(zvalue);
+   zval_add_ref(zvalue);
ch->handlers->read->fp = fp;
ch->handlers->read->fd = 
Z_LVAL_PP(zvalue);
ch->handlers->read->stream = *zvalue;

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