[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/mysqli_api.c branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c branches/PHP_5_3/ext/mysqli/mysqli_report.c trunk/ext/mysqli/mysqli_api.c trunk/ext/my

2010-11-10 Thread Andrey Hristov
andrey   Wed, 10 Nov 2010 13:57:09 +

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

Log:
Fix bad types, because zend_parse_xxx expect signed integers
for lengths, no matter how stupid this is :)

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_report.c
U   php/php-src/trunk/ext/mysqli/mysqli_api.c
U   php/php-src/trunk/ext/mysqli/mysqli_nonapi.c
U   php/php-src/trunk/ext/mysqli/mysqli_report.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c2010-11-10 
12:49:04 UTC (rev 305243)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c2010-11-10 
13:57:09 UTC (rev 305244)
@@ -1763,7 +1763,7 @@
MY_MYSQL*mysql;
MY_STMT *stmt;
char*query = NULL;
-   unsigned intquery_len;
+   int query_len;
zval*mysql_link;
MYSQLI_RESOURCE *mysqli_resource;

@@ -1847,10 +1847,10 @@
Binary-safe version of mysql_query() */
 PHP_FUNCTION(mysqli_real_query)
 {
-   MY_MYSQL*mysql;
-   zval*mysql_link;
-   char*query = NULL;
-   unsigned intquery_len;
+   MY_MYSQL*mysql;
+   zval*mysql_link;
+   char*query = NULL;
+   int query_len;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os, mysql_link, mysqli_link_class_entry, query, query_len) == FAILURE) {
return;

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-11-10 
12:49:04 UTC (rev 305243)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-11-10 
13:57:09 UTC (rev 305244)
@@ -62,7 +62,7 @@
MYSQLI_RESOURCE *mysqli_resource = NULL;
zval*object = getThis();
char*hostname = NULL, *username=NULL, 
*passwd=NULL, *dbname=NULL, *socket=NULL;
-   unsigned inthostname_len = 0, username_len = 0, passwd_len 
= 0, dbname_len = 0, socket_len = 0;
+   int hostname_len = 0, username_len 
= 0, passwd_len = 0, dbname_len = 0, socket_len = 0;
zend_bool   persistent = FALSE;
longport = 0, flags = 0;
uinthash_len;
@@ -362,9 +362,9 @@
 #if defined(MYSQLI_USE_MYSQLND)
 PHP_FUNCTION(mysqli_fetch_all)
 {
-   MYSQL_RES   *result;
-   zval*mysql_result;
-   longmode = MYSQLND_FETCH_NUM;
+   MYSQL_RES   *result;
+   zval*mysql_result;
+   longmode = MYSQLND_FETCH_NUM;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O|l, mysql_result, mysqli_result_class_entry, mode) == FAILURE) {
return;
@@ -437,10 +437,10 @@
allows to execute multiple queries  */
 PHP_FUNCTION(mysqli_multi_query)
 {
-   MY_MYSQL*mysql;
-   zval*mysql_link;
-   char*query = NULL;
-   unsigned intquery_len;
+   MY_MYSQL*mysql;
+   zval*mysql_link;
+   char*query = NULL;
+   int query_len;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os, mysql_link, mysqli_link_class_entry, query, query_len) == FAILURE) {
return;
@@ -485,8 +485,8 @@
MYSQLI_RESOURCE *mysqli_resource;
MYSQL_RES   *result;
char*query = NULL;
-   unsigned intquery_len;
-   unsigned long   resultmode = MYSQLI_STORE_RESULT;
+   int query_len;
+   longresultmode = MYSQLI_STORE_RESULT;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os|l, mysql_link, mysqli_link_class_entry, query, query_len, resultmode) 
== FAILURE) {
return;
@@ -873,10 +873,10 @@
sets client character set */
 PHP_FUNCTION(mysqli_set_charset)
 {
-   MY_MYSQL*mysql;
-   zval*mysql_link;
-   char*cs_name;
-   int csname_len;
+   MY_MYSQL*mysql;
+   zval*mysql_link;
+   char

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt branches/PHP_5_3/ext/oci

2010-11-10 Thread Christopher Jones
sixd Wed, 10 Nov 2010 18:46:05 +

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

Log:
Improve test portability

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_1.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_2.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/bug27303_4.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/debug.phpt
U   php/php-src/branches/PHP_5_3/ext/oci8/tests/oci8safemode.phpt
U   php/php-src/trunk/ext/oci8/tests/bind_char_1.phpt
U   php/php-src/trunk/ext/oci8/tests/bind_char_2.phpt
U   php/php-src/trunk/ext/oci8/tests/bind_char_3.phpt
U   php/php-src/trunk/ext/oci8/tests/bind_char_4.phpt
U   php/php-src/trunk/ext/oci8/tests/bug27303_1.phpt
U   php/php-src/trunk/ext/oci8/tests/bug27303_2.phpt
U   php/php-src/trunk/ext/oci8/tests/bug27303_4.phpt
U   php/php-src/trunk/ext/oci8/tests/debug.phpt

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_1.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die (skip expected output only valid when using Oracle 10gR2 or 11gR2 databases);
+} else {
+ob_start();
+phpinfo(INFO_MODULES);
+$phpinfo = ob_get_clean();
+$iv = preg_match('/Oracle .*Version = 1[1]\./', $phpinfo);
+if ($iv != 1) {
+die (skip test expected to work only with Oracle 11g or greater version of client);
+}
 }
 ?
 --FILE--
 ?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_2.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die (skip expected output only valid when using Oracle 10gR2 or 11gR2 databases);
+} else {
+ob_start();
+phpinfo(INFO_MODULES);
+$phpinfo = ob_get_clean();
+$iv = preg_match('/Oracle .*Version = 1[1]\./', $phpinfo);
+if ($iv != 1) {
+die (skip test expected to work only with Oracle 11g or greater version of client);
+}
 }
 ?
 --FILE--
 ?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_3.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die (skip expected output only valid when using Oracle 10gR2 11gR2 databases);
+} else {
+ob_start();
+phpinfo(INFO_MODULES);
+$phpinfo = ob_get_clean();
+$iv = preg_match('/Oracle .*Version = 1[1]\./', $phpinfo);
+if ($iv != 1) {
+die (skip test expected to work only with Oracle 11g or greater version of client);
+}
 }
 ?
 --FILE--
 ?php

-// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
-// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
-
 require(dirname(__FILE__).'/connect.inc');

 // Initialization

Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt
===
--- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt	2010-11-10 17:50:21 UTC (rev 305254)
+++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_char_4.phpt	2010-11-10 18:46:05 UTC (rev 305255)
@@ -8,14 +8,19 @@
 $sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
 if ($sv !== 1) {
 	die (skip expected output only valid when using Oracle 10gR2 or 11gR2 databases);
+} else {
+ob_start();
+phpinfo(INFO_MODULES);
+$phpinfo = ob_get_clean();
+$iv = 

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

2010-11-10 Thread Christopher Jones
sixd Wed, 10 Nov 2010 18:49:55 +

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

Log:
Fixed bug #53284 (Valgrind warnings in oci_set_* functions)

Bug: http://bugs.php.net/53284 (Assigned) Valgrind warnings in oci_set_* 
functions 
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c
U   php/php-src/trunk/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  2010-11-10 
18:46:05 UTC (rev 305255)
+++ php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c  2010-11-10 
18:49:55 UTC (rev 305256)
@@ -1719,7 +1719,7 @@
zval *z_connection;
php_oci_connection *connection;
char *client_id;
-   long client_id_len;
+   int client_id_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, 
z_connection, client_id, client_id_len) == FAILURE) {
return;
@@ -1744,7 +1744,7 @@
 {
 #if ((OCI_MAJOR_VERSION  11) || ((OCI_MAJOR_VERSION == 11)  
(OCI_MINOR_VERSION = 2)))
char *edition;
-   long edition_len;
+   int edition_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, edition, 
edition_len) == FAILURE) {
return;
@@ -1777,7 +1777,7 @@
zval *z_connection;
php_oci_connection *connection;
char *module;
-   long module_len;
+   int module_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, 
z_connection, module, module_len) == FAILURE) {
return;
@@ -1808,7 +1808,7 @@
zval *z_connection;
php_oci_connection *connection;
char *action;
-   long action_len;
+   int action_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, 
z_connection, action, action_len) == FAILURE) {
return;
@@ -1839,7 +1839,7 @@
zval *z_connection;
php_oci_connection *connection;
char *client_info;
-   long client_info_len;
+   int client_info_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, 
z_connection, client_info, client_info_len) == FAILURE) {
return;

Modified: php/php-src/trunk/ext/oci8/oci8_interface.c
===
--- php/php-src/trunk/ext/oci8/oci8_interface.c 2010-11-10 18:46:05 UTC (rev 
305255)
+++ php/php-src/trunk/ext/oci8/oci8_interface.c 2010-11-10 18:49:55 UTC (rev 
305256)
@@ -1715,7 +1715,7 @@
zval *z_connection;
php_oci_connection *connection;
char *client_id;
-   long client_id_len;
+   int client_id_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, 
z_connection, client_id, client_id_len) == FAILURE) {
return;
@@ -1740,7 +1740,7 @@
 {
 #if ((OCI_MAJOR_VERSION  11) || ((OCI_MAJOR_VERSION == 11)  
(OCI_MINOR_VERSION = 2)))
char *edition;
-   long edition_len;
+   int edition_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, edition, 
edition_len) == FAILURE) {
return;
@@ -1773,7 +1773,7 @@
zval *z_connection;
php_oci_connection *connection;
char *module;
-   long module_len;
+   int module_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, 
z_connection, module, module_len) == FAILURE) {
return;
@@ -1804,7 +1804,7 @@
zval *z_connection;
php_oci_connection *connection;
char *action;
-   long action_len;
+   int action_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, 
z_connection, action, action_len) == FAILURE) {
return;
@@ -1835,7 +1835,7 @@
zval *z_connection;
php_oci_connection *connection;
char *client_info;
-   long client_info_len;
+   int client_info_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, 
z_connection, client_info, client_info_len) == 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/ext/oci8/oci8.c trunk/ext/oci8/oci8.c

2010-11-10 Thread Christopher Jones
sixd Wed, 10 Nov 2010 18:59:56 +

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

Log:
Improve startup failure error messages

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

Modified: php/php-src/branches/PHP_5_3/ext/oci8/oci8.c
===
--- php/php-src/branches/PHP_5_3/ext/oci8/oci8.c2010-11-10 18:49:55 UTC 
(rev 305256)
+++ php/php-src/branches/PHP_5_3/ext/oci8/oci8.c2010-11-10 18:59:56 UTC 
(rev 305257)
@@ -1040,6 +1040,12 @@
 #else
php_error_docref(NULL TSRMLS_CC, E_WARNING, OCIEnvNlsCreate() 
failed. There is something wrong with your system - please check that 
ORACLE_HOME and  PHP_OCI8_LIB_PATH_MSG  are set and point to the right 
directories);
 #endif
+   if (OCI_G(env)
+OCIErrorGet(OCI_G(env), (ub4)1, NULL, 
ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ENV) == 
OCI_SUCCESS
+*tmp_buf) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
tmp_buf);
+   }
+
OCI_G(env) = NULL;
OCI_G(err) = NULL;
return;

Modified: php/php-src/trunk/ext/oci8/oci8.c
===
--- php/php-src/trunk/ext/oci8/oci8.c   2010-11-10 18:49:55 UTC (rev 305256)
+++ php/php-src/trunk/ext/oci8/oci8.c   2010-11-10 18:59:56 UTC (rev 305257)
@@ -1040,6 +1040,12 @@
 #else
php_error_docref(NULL TSRMLS_CC, E_WARNING, OCIEnvNlsCreate() 
failed. There is something wrong with your system - please check that 
ORACLE_HOME and  PHP_OCI8_LIB_PATH_MSG  are set and point to the right 
directories);
 #endif
+   if (OCI_G(env)
+OCIErrorGet(OCI_G(env), (ub4)1, NULL, 
ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ENV) == 
OCI_SUCCESS
+*tmp_buf) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
tmp_buf);
+   }
+
OCI_G(env) = NULL;
OCI_G(err) = NULL;
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/ext/oci8/package.xml branches/PHP_5_3/ext/oci8/php_oci8.h trunk/ext/oci8/package.xml trunk/ext/oci8/php_oci8.h

2010-11-10 Thread Christopher Jones
sixd Wed, 10 Nov 2010 19:08:13 +

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

Log:
Prepare for PECL OCI8 1.4.4

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/oci8/package.xml
U   php/php-src/branches/PHP_5_3/ext/oci8/php_oci8.h
U   php/php-src/trunk/ext/oci8/package.xml
U   php/php-src/trunk/ext/oci8/php_oci8.h

Modified: php/php-src/branches/PHP_5_3/ext/oci8/package.xml
===
--- php/php-src/branches/PHP_5_3/ext/oci8/package.xml   2010-11-10 19:02:06 UTC 
(rev 305258)
+++ php/php-src/branches/PHP_5_3/ext/oci8/package.xml   2010-11-10 19:08:13 UTC 
(rev 305259)
@@ -33,12 +33,12 @@
   activeno/active
  /lead

- date2010-08-06/date
+ date2010-11-10/date
  time15:00:00/time

  version
-  release1.4.3/release
-  api1.4.3/api
+  release1.4.4/release
+  api1.4.4/api
  /version
  stability
   releasestable/release
@@ -46,7 +46,8 @@
  /stability
  license uri=http://www.php.net/license;PHP/license
  notes
-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.
+Fixed bug #53284 (Valgrind warnings in oci_set_* functions)
+Enhancement - improve startup failure error messages
  /notes
  contents
   dir name=/
@@ -378,6 +379,21 @@

 release
  version
+  release1.4.3/release
+  api1.4.3/api
+ /version
+ stability
+  releasestable/release
+  apistable/api
+ /stability
+ license uri=http://www.php.net/license;PHP/license
+ notes
+Fixed bug #51610 (Using oci_connect causes PHP to take a long time to 
exit). Requires Oracle 11.2.0.2 client libraries (or Oracle bug fix 9891199) 
for this patch to have an effect.
+ /notes
+/release
+
+release
+ version
   release1.4.2/release
   api1.4.2/api
  /version

Modified: php/php-src/branches/PHP_5_3/ext/oci8/php_oci8.h
===
--- php/php-src/branches/PHP_5_3/ext/oci8/php_oci8.h2010-11-10 19:02:06 UTC 
(rev 305258)
+++ php/php-src/branches/PHP_5_3/ext/oci8/php_oci8.h2010-11-10 19:08:13 UTC 
(rev 305259)
@@ -46,7 +46,7 @@
  */
 #undef PHP_OCI8_VERSION
 #endif
-#define PHP_OCI8_VERSION 1.4.3
+#define PHP_OCI8_VERSION 1.4.4

 extern zend_module_entry oci8_module_entry;
 #define phpext_oci8_ptr oci8_module_entry

Modified: php/php-src/trunk/ext/oci8/package.xml
===
--- php/php-src/trunk/ext/oci8/package.xml  2010-11-10 19:02:06 UTC (rev 
305258)
+++ php/php-src/trunk/ext/oci8/package.xml  2010-11-10 19:08:13 UTC (rev 
305259)
@@ -33,12 +33,12 @@
   activeno/active
  /lead

- date2010-08-06/date
+ date2010-11-10/date
  time15:00:00/time

  version
-  release1.4.3/release
-  api1.4.3/api
+  release1.4.4/release
+  api1.4.4/api
  /version
  stability
   releasestable/release
@@ -46,7 +46,8 @@
  /stability
  license uri=http://www.php.net/license;PHP/license
  notes
-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.
+Fixed bug #53284 (Valgrind warnings in oci_set_* functions)
+Enhancement - improve startup failure error messages
  /notes
  contents
   dir name=/
@@ -378,6 +379,21 @@

 release
  version
+  release1.4.3/release
+  api1.4.3/api
+ /version
+ stability
+  releasestable/release
+  apistable/api
+ /stability
+ license uri=http://www.php.net/license;PHP/license
+ notes
+Fixed bug #51610 (Using oci_connect causes PHP to take a long time to 
exit). Requires Oracle 11.2.0.2 client libraries (or Oracle bug fix 9891199) 
for this patch to have an effect.
+ /notes
+/release
+
+release
+ version
   release1.4.2/release
   api1.4.2/api
  /version

Modified: php/php-src/trunk/ext/oci8/php_oci8.h
===
--- php/php-src/trunk/ext/oci8/php_oci8.h   2010-11-10 19:02:06 UTC (rev 
305258)
+++ php/php-src/trunk/ext/oci8/php_oci8.h   2010-11-10 19:08:13 UTC (rev 
305259)
@@ -46,7 +46,7 @@
  */
 #undef PHP_OCI8_VERSION
 #endif
-#define PHP_OCI8_VERSION 1.4.3
+#define PHP_OCI8_VERSION 1.4.4

 extern zend_module_entry oci8_module_entry;
 #define phpext_oci8_ptr oci8_module_entry

-- 
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/fpm/fpm/fpm_main.c trunk/sapi/fpm/fpm/fpm_main.c

2010-11-10 Thread Jérôme Loyet
fat  Wed, 10 Nov 2010 23:54:14 +

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

Log:
- don't call shutdown functions after child ends softly, let the master process 
call them

Changed paths:
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_main.c

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c2010-11-10 
21:34:44 UTC (rev 305261)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c2010-11-10 
23:54:14 UTC (rev 305262)
@@ -1919,8 +1919,10 @@
 out:

SG(server_context) = NULL;
-   php_module_shutdown(TSRMLS_C);
-   sapi_shutdown();
+   if (parent) {
+   php_module_shutdown(TSRMLS_C);
+   sapi_shutdown();
+   }

 #ifdef ZTS
tsrm_shutdown();

Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c
===
--- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c   2010-11-10 21:34:44 UTC (rev 
305261)
+++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c   2010-11-10 23:54:14 UTC (rev 
305262)
@@ -1917,8 +1917,10 @@
 out:

SG(server_context) = NULL;
-   php_module_shutdown(TSRMLS_C);
-   sapi_shutdown();
+   if (parent) {
+   php_module_shutdown(TSRMLS_C);
+   sapi_shutdown();
+   }

 #ifdef ZTS
tsrm_shutdown();

-- 
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/main.c trunk/main/main.c

2010-11-10 Thread Kalle Sommer Nielsen
kalleThu, 11 Nov 2010 01:43:53 +

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

Log:
Added new constant; ZEND_MULTIBYTE to check whether PHP was compiled using 
--enable-zend-multibyte or not instead of sniffing phpinfo() (FR #52348)

Bug: http://bugs.php.net/52348 (Re-Opened) Ability to detect zend multibyte 
mode at runtime
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
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/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-11-11 01:01:56 UTC (rev 305265)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-11-11 01:43:53 UTC (rev 305266)
@@ -14,6 +14,7 @@
   (Andrey)
 - Improved support for is_link and related functions on Windows. (Pierre)

+- Implemented FR #52348, Ability to detect zend multibyte at runtime. (Kalle)
 - Implemented FR #52173, added functions pcntl_get_last_error() and
   pcntl_strerror(). (nick dot telford at gmail dot com, Arnaud)
 - Implemented symbolic links support for open_basedir checks. (Pierre)

Modified: php/php-src/branches/PHP_5_3/main/main.c
===
--- php/php-src/branches/PHP_5_3/main/main.c2010-11-11 01:01:56 UTC (rev 
305265)
+++ php/php-src/branches/PHP_5_3/main/main.c2010-11-11 01:43:53 UTC (rev 
305266)
@@ -1944,6 +1944,11 @@
REGISTER_MAIN_LONG_CONSTANT(PHP_MAXPATHLEN, MAXPATHLEN, 
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), 
CONST_PERSISTENT | CONST_CS);
+#ifdef ZEND_MULTIBYTE
+   REGISTER_MAIN_LONG_CONSTANT(ZEND_MULTIBYTE, 1, CONST_PERSISTENT | 
CONST_CS);
+#else
+   REGISTER_MAIN_LONG_CONSTANT(ZEND_MULTIBYTE, 0, CONST_PERSISTENT | 
CONST_CS);
+#endif

 #ifdef PHP_WIN32
REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_MAJOR,  
EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS);

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2010-11-11 01:01:56 UTC (rev 305265)
+++ php/php-src/trunk/main/main.c   2010-11-11 01:43:53 UTC (rev 305266)
@@ -1979,6 +1979,11 @@
REGISTER_MAIN_LONG_CONSTANT(PHP_MAXPATHLEN, MAXPATHLEN, 
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), 
CONST_PERSISTENT | CONST_CS);
+#ifdef ZEND_MULTIBYTE
+   REGISTER_MAIN_LONG_CONSTANT(ZEND_MULTIBYTE, 1, CONST_PERSISTENT | 
CONST_CS);
+#else
+   REGISTER_MAIN_LONG_CONSTANT(ZEND_MULTIBYTE, 0, CONST_PERSISTENT | 
CONST_CS);
+#endif

 #ifdef PHP_WIN32
REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_MAJOR,  
EG(windows_version_info).dwMajorVersion, 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/ branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c branches/PHP_5_3/sapi/fpm/fpm/fpm_request.c branches/PHP_5_3/sapi/fpm/fpm/fpm_sockets.c trunk/sapi/fpm/fpm/fpm_conf.c trunk/sapi/f

2010-11-10 Thread Jérôme Loyet
fat  Thu, 11 Nov 2010 01:01:56 +

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

Log:
- syntax and minor optimizations

Changed paths:
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_request.c
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_sockets.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_request.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_sockets.c

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c	2010-11-11 00:43:18 UTC (rev 305264)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c	2010-11-11 01:01:56 UTC (rev 305265)
@@ -52,50 +52,53 @@
 static char *fpm_conf_set_rlimit_core(zval *value, void **config, intptr_t offset);
 static char *fpm_conf_set_pm(zval *value, void **config, intptr_t offset);

-struct fpm_global_config_s fpm_global_config = { 0, 0, 0, 1, NULL, NULL};
+struct fpm_global_config_s fpm_global_config = { .daemonize = 1 };
 static struct fpm_worker_pool_s *current_wp = NULL;
 static int ini_recursion = 0;
 static char *ini_filename = NULL;
 static int ini_lineno = 0;
 static char *ini_include = NULL;

+#define GO(field) offsetof(struct fpm_global_config_s, field)
+#define WPO(field) offsetof(struct fpm_worker_pool_config_s, field)
+
 static struct ini_value_parser_s ini_fpm_global_options[] = {
-	{ emergency_restart_threshold, 	fpm_conf_set_integer, 	offsetof(struct fpm_global_config_s, emergency_restart_threshold) },
-	{ emergency_restart_interval,		fpm_conf_set_time,			offsetof(struct fpm_global_config_s, emergency_restart_interval) },
-	{ process_control_timeout,			fpm_conf_set_time,			offsetof(struct fpm_global_config_s, process_control_timeout) },
-	{ daemonize,		fpm_conf_set_boolean,	offsetof(struct fpm_global_config_s, daemonize) },
-	{ pid,	fpm_conf_set_string,		offsetof(struct fpm_global_config_s, pid_file) },
-	{ error_log,		fpm_conf_set_string,		offsetof(struct fpm_global_config_s, error_log) },
+	{ emergency_restart_threshold, 	fpm_conf_set_integer, 	GO(emergency_restart_threshold) },
+	{ emergency_restart_interval,		fpm_conf_set_time,			GO(emergency_restart_interval) },
+	{ process_control_timeout,			fpm_conf_set_time,			GO(process_control_timeout) },
+	{ daemonize,		fpm_conf_set_boolean,	GO(daemonize) },
+	{ pid,	fpm_conf_set_string,		GO(pid_file) },
+	{ error_log,		fpm_conf_set_string,		GO(error_log) },
 	{ log_level,		fpm_conf_set_log_level,	0 },
 	{ 0, 0, 0 }
 };

 static struct ini_value_parser_s ini_fpm_pool_options[] = {
-	{ user, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, user) },
-	{ group, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, group) },
-	{ chroot, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, chroot) },
-	{ chdir, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, chdir) },
-	{ request_terminate_timeout, fpm_conf_set_time, offsetof(struct fpm_worker_pool_config_s, request_terminate_timeout) },
-	{ request_slowlog_timeout, fpm_conf_set_time, offsetof(struct fpm_worker_pool_config_s, request_slowlog_timeout) },
-	{ slowlog, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, slowlog) },
-	{ rlimit_files, fpm_conf_set_integer, offsetof(struct fpm_worker_pool_config_s, rlimit_files) },
-	{ rlimit_core, fpm_conf_set_rlimit_core, offsetof(struct fpm_worker_pool_config_s, rlimit_core) },
-	{ catch_workers_output, fpm_conf_set_boolean, offsetof(struct fpm_worker_pool_config_s, catch_workers_output) },
-	{ listen, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, listen_address) },
-	{ listen.owner, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, listen_owner) },
-	{ listen.group, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, listen_group) },
-	{ listen.mode, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, listen_mode) },
-	{ listen.backlog, fpm_conf_set_integer, offsetof(struct fpm_worker_pool_config_s, listen_backlog) },
-	{ listen.allowed_clients, fpm_conf_set_string, offsetof(struct fpm_worker_pool_config_s, listen_allowed_clients) },
-	{ pm, fpm_conf_set_pm, offsetof(struct fpm_worker_pool_config_s, pm) },
-	{ pm.max_requests, fpm_conf_set_integer, offsetof(struct fpm_worker_pool_config_s, pm_max_requests) },
-	{ pm.max_children, fpm_conf_set_integer, offsetof(struct fpm_worker_pool_config_s, pm_max_children) },
-	{ pm.start_servers, fpm_conf_set_integer, offsetof(struct fpm_worker_pool_config_s, pm_start_servers) },
-	{ pm.min_spare_servers, fpm_conf_set_integer, offsetof(struct fpm_worker_pool_config_s, pm_min_spare_servers) },
-	{ pm.max_spare_servers, fpm_conf_set_integer, offsetof(struct fpm_worker_pool_config_s, 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/sapi/fpm/config.m4 branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c branches/PHP_5_3/sapi/fpm/fpm/fpm_config.h branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c bra

2010-11-10 Thread Jérôme Loyet
fat  Thu, 11 Nov 2010 02:34:47 +

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

Log:
- add listen queue len stat (thx to Andrei Nigmatulin)

Changed paths:
U   php/php-src/branches/PHP_5_3/sapi/fpm/config.m4
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_config.h
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_sockets.c
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_sockets.h
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_status.c
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_status.h
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_worker_pool.h
U   php/php-src/trunk/sapi/fpm/config.m4
U   php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_config.h
U   php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_sockets.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_sockets.h
U   php/php-src/trunk/sapi/fpm/fpm/fpm_status.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_status.h
U   php/php-src/trunk/sapi/fpm/fpm/fpm_worker_pool.h

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/config.m4
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/config.m4	2010-11-11 01:43:53 UTC (rev 305266)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/config.m4	2010-11-11 02:34:47 UTC (rev 305267)
@@ -516,6 +516,39 @@
 AC_MSG_RESULT([no])
   ])
 ])
+
+AC_DEFUN([AC_FPM_LQ],
+[
+  have_lq=no
+
+  AC_MSG_CHECKING([for TCP_INFO])
+
+  AC_TRY_COMPILE([ #include netinet/tcp.h ], [struct tcp_info ti; int x = TCP_INFO;], [
+have_lq=tcp_info
+AC_MSG_RESULT([yes])
+  ], [
+AC_MSG_RESULT([no])
+  ])
+
+  if test $have_lq = tcp_info; then
+AC_DEFINE([HAVE_LQ_TCP_INFO], 1, [do we have TCP_INFO?])
+  fi
+
+  if test $have_lq = no ; then
+AC_MSG_CHECKING([for SO_LISTENQLEN])
+
+AC_TRY_COMPILE([ #include sys/socket.h ], [int x = SO_LISTENQLIMIT; int y = SO_LISTENQLEN;], [
+  have_lq=so_listenq
+  AC_MSG_RESULT([yes])
+], [
+  AC_MSG_RESULT([no])
+])
+
+if test $have_lq = tcp_info; then
+  AC_DEFINE([HAVE_LQ_SO_LISTENQ], 1, [do we have SO_LISTENQxxx?])
+fi
+  fi
+])
 dnl }}}

 AC_MSG_CHECKING(for FPM build)
@@ -543,6 +576,7 @@
   AC_FPM_CLOCK
   AC_FPM_TRACE
   AC_FPM_BUILTIN_ATOMIC
+  AC_FPM_LQ

   PHP_ARG_WITH(fpm-user,,
   [  --with-fpm-user[=USER]  Set the user for php-fpm to run as. (default: nobody)], nobody, no)

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c	2010-11-11 01:43:53 UTC (rev 305266)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c	2010-11-11 02:34:47 UTC (rev 305267)
@@ -576,7 +576,7 @@
 return -1;
 			}
 			fpm_status_update_accepted_conn(wp-shm_status, 0);
-			fpm_status_update_activity(wp-shm_status, -1, -1, -1, 1);
+			fpm_status_update_activity(wp-shm_status, -1, -1, -1, 0, -1, 1);
 			fpm_status_update_max_children_reached(wp-shm_status, 0);
 			fpm_status_set_pm(wp-shm_status, wp-config-pm);
 			/* memset(fpm_status.last_update, 0, sizeof(fpm_status.last_update)); */

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_config.h
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_config.h	2010-11-11 01:43:53 UTC (rev 305266)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_config.h	2010-11-11 02:34:47 UTC (rev 305267)
@@ -42,3 +42,9 @@
 #define HAVE_FPM_TRACE 0
 #endif

+#if defined(HAVE_LQ_TCP_INFO) || defined(HAVE_LQ_SO_LISTENQ)
+#define HAVE_FPM_LQ 1
+#else
+#define HAVE_FPM_LQ 0
+#endif
+

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c	2010-11-11 01:43:53 UTC (rev 305266)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c	2010-11-11 02:34:47 UTC (rev 305267)
@@ -19,6 +19,7 @@
 #include fpm_request.h
 #include fpm_worker_pool.h
 #include fpm_status.h
+#include fpm_sockets.h
 #include zlog.h


@@ -327,6 +328,7 @@
 		int idle = 0;
 		int active = 0;
 		int children_to_fork;
+		unsigned cur_lq;

 		if (wp-config == NULL) continue;

@@ -352,7 +354,10 @@
 		}

 		/* update status structure for all PMs */
-		fpm_status_update_activity(wp-shm_status, idle, active, idle + active, 0);
+		if (0  fpm_socket_get_listening_queue(wp, cur_lq, NULL)) {
+			cur_lq = 0;
+		}
+		fpm_status_update_activity(wp-shm_status, idle, active, idle + active, cur_lq, wp-listening_queue_len, 0);

 		/* the rest is only used by PM_STYLE_DYNAMIC */
 		if (wp-config-pm != PM_STYLE_DYNAMIC) continue;

Modified: 

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

2010-11-10 Thread Jérôme Loyet
fat  Thu, 11 Nov 2010 02:43:51 +

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

Log:
here come the new

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-11-11 02:34:47 UTC (rev 305267)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-11-11 02:43:51 UTC (rev 305268)
@@ -14,6 +14,8 @@
   (Andrey)
 - Improved support for is_link and related functions on Windows. (Pierre)

+- Added statistics about listening socket queue length for FPM.
+  (andrei dot nigmatulin at gmail dot com, fat)
 - Implemented FR #52348, Ability to detect zend multibyte at runtime. (Kalle)
 - Implemented FR #52173, added functions pcntl_get_last_error() and
   pcntl_strerror(). (nick dot telford at gmail dot com, Arnaud)

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