[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/oci8/oci8.c branches/PHP_5_3/ext/oci8/package.xml branches/PHP_5_4/ext/oci8/oci8.c branches/PHP_5_4/ext/oci8/package.xml trunk/ext/oci8/oci8.c trunk/e

2011-11-07 Thread Christopher Jones
sixd Mon, 07 Nov 2011 20:10:41 +

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

Log:
Improve OCI8 NLS env creation error messages (#58925)

Bug: https://bugs.php.net/58925 (Assigned) No error information available when 
php_oci_create_env fails
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/oci8/oci8.c
U   php/php-src/branches/PHP_5_3/ext/oci8/package.xml
U   php/php-src/branches/PHP_5_4/ext/oci8/oci8.c
U   php/php-src/branches/PHP_5_4/ext/oci8/package.xml
U   php/php-src/trunk/ext/oci8/oci8.c
U   php/php-src/trunk/ext/oci8/package.xml

Modified: php/php-src/branches/PHP_5_3/ext/oci8/oci8.c
===
--- php/php-src/branches/PHP_5_3/ext/oci8/oci8.c2011-11-07 19:23:17 UTC 
(rev 318887)
+++ php/php-src/branches/PHP_5_3/ext/oci8/oci8.c2011-11-07 20:10:41 UTC 
(rev 31)
@@ -2901,11 +2901,20 @@
PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIEnvNlsCreate, (retenv, 
OCI_G(events) ? PHP_OCI_INIT_MODE | OCI_EVENTS : PHP_OCI_INIT_MODE, 0, NULL, 
NULL, NULL, 0, NULL, charsetid, charsetid));

if (OCI_G(errcode) != OCI_SUCCESS) {
+   sb4   ora_error_code = 0;
+   text  ora_msg_buf[OCI_ERROR_MAXMSG_SIZE];  /* Use traditional 
smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */
+
 #ifdef HAVE_OCI_INSTANT_CLIENT
php_error_docref(NULL TSRMLS_CC, E_WARNING, OCIEnvNlsCreate() 
failed. There is something wrong with your system - please check that  
PHP_OCI8_LIB_PATH_MSG  includes the directory with Oracle Instant Client 
libraries);
 #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 (retenv
+OCIErrorGet(retenv, (ub4)1, NULL, ora_error_code, 
ora_msg_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
+*ora_msg_buf) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
ora_msg_buf);
+   }
+
return NULL;
}
return retenv;

Modified: php/php-src/branches/PHP_5_3/ext/oci8/package.xml
===
--- php/php-src/branches/PHP_5_3/ext/oci8/package.xml   2011-11-07 19:23:17 UTC 
(rev 318887)
+++ php/php-src/branches/PHP_5_3/ext/oci8/package.xml   2011-11-07 20:10:41 UTC 
(rev 31)
@@ -47,6 +47,7 @@
  license uri=http://www.php.net/license;PHP/license
  notes
   Increased maximum possible Oracle DB error message length
+  Improve internal initalization failure error messages
  /notes
  contents
   dir name=/

Modified: php/php-src/branches/PHP_5_4/ext/oci8/oci8.c
===
--- php/php-src/branches/PHP_5_4/ext/oci8/oci8.c2011-11-07 19:23:17 UTC 
(rev 318887)
+++ php/php-src/branches/PHP_5_4/ext/oci8/oci8.c2011-11-07 20:10:41 UTC 
(rev 31)
@@ -2901,11 +2901,20 @@
PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIEnvNlsCreate, (retenv, 
OCI_G(events) ? PHP_OCI_INIT_MODE | OCI_EVENTS : PHP_OCI_INIT_MODE, 0, NULL, 
NULL, NULL, 0, NULL, charsetid, charsetid));

if (OCI_G(errcode) != OCI_SUCCESS) {
+   sb4   ora_error_code = 0;
+   text  ora_msg_buf[OCI_ERROR_MAXMSG_SIZE];  /* Use traditional 
smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */
+
 #ifdef HAVE_OCI_INSTANT_CLIENT
php_error_docref(NULL TSRMLS_CC, E_WARNING, OCIEnvNlsCreate() 
failed. There is something wrong with your system - please check that  
PHP_OCI8_LIB_PATH_MSG  includes the directory with Oracle Instant Client 
libraries);
 #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 (retenv
+OCIErrorGet(retenv, (ub4)1, NULL, ora_error_code, 
ora_msg_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
+*ora_msg_buf) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
ora_msg_buf);
+   }
+
return NULL;
}
return retenv;

Modified: php/php-src/branches/PHP_5_4/ext/oci8/package.xml
===
--- php/php-src/branches/PHP_5_4/ext/oci8/package.xml   2011-11-07 19:23:17 UTC 
(rev 318887)
+++ php/php-src/branches/PHP_5_4/ext/oci8/package.xml   2011-11-07 20:10:41 UTC 
(rev 31)
@@ -47,6 +47,7 @@
  license uri=http://www.php.net/license;PHP/license
  notes
   Increased maximum possible Oracle DB error 

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

2011-11-07 Thread Stanislav Malyshev
stas Tue, 08 Nov 2011 04:34:18 +

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

Log:
fix typo

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

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===
--- php/php-src/branches/PHP_5_4/UPGRADING  2011-11-08 04:09:58 UTC (rev 
318900)
+++ php/php-src/branches/PHP_5_4/UPGRADING  2011-11-08 04:34:18 UTC (rev 
318901)
@@ -461,7 +461,7 @@
 $y = o;
 A::{$x.$y.$y}();

-- Class member acces on instantiation:
+- Class member access on instantiation:
   (new foo)-method()
   (new foo)-property
   (new foo)[0]

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/tokenizer/tests/bug54089.phpt branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation16.phpt branches/PHP_5_4/ext/tokenizer/tokenizer.c trunk/ext

2011-11-07 Thread Stanislav Malyshev
stas Tue, 08 Nov 2011 04:59:17 +

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

Log:
Fixed bug #54084 (token_get_all with regards to __halt_compiler is not binary 
safe)

Bug: https://bugs.php.net/54084 (Closed) Fix apxs Apache version test to work 
with Apache variants
  
Changed paths:
U   php/php-src/branches/PHP_5_4/ext/tokenizer/tests/bug54089.phpt
U   
php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation16.phpt
U   php/php-src/branches/PHP_5_4/ext/tokenizer/tokenizer.c
U   php/php-src/trunk/ext/tokenizer/tests/bug54089.phpt
U   php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation16.phpt
U   php/php-src/trunk/ext/tokenizer/tokenizer.c

Modified: php/php-src/branches/PHP_5_4/ext/tokenizer/tests/bug54089.phpt
===
--- php/php-src/branches/PHP_5_4/ext/tokenizer/tests/bug54089.phpt	2011-11-08 04:34:18 UTC (rev 318901)
+++ php/php-src/branches/PHP_5_4/ext/tokenizer/tests/bug54089.phpt	2011-11-08 04:59:17 UTC (rev 318902)
@@ -4,17 +4,26 @@
 ?php if (!extension_loaded(tokenizer)) print skip; ?
 --FILE--
 ?php
-$code = ?php __halt_compiler();\x01?\x02;
-$tokens = token_get_all($code);
+$codes = array(
+	?php __halt_compiler,
+	?php __halt_compiler(,
+	?php __halt_compiler();,
+	?php __halt_compiler();ABC,
+	?php __halt_compiler\n(\n)\n;ABC,
+	?php __halt_compiler\nabc\ndef\nghi ABC,
+);
+foreach ($codes as $code) {
+	$tokens = token_get_all($code);
+	var_dump($tokens);
+
+	$code = '';
+	foreach ($tokens as $t)
+	{
+		$code .= isset($t[1]) ? $t[1] : $t;
+	}
+	var_dump($code);
+}

-var_dump($tokens);
-
-$code = '';
-foreach ($tokens as $t)
-{
-	$code .= isset($t[1]) ? $t[1] : $t;
-}
-var_dump($code);
 ?
 --EXPECTF--
 array(2) {
@@ -38,3 +47,248 @@
   }
 }
 string(21) ?php __halt_compiler
+array(3) {
+  [0]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(6) ?php 
+[2]=
+int(1)
+  }
+  [1]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(15) __halt_compiler
+[2]=
+int(1)
+  }
+  [2]=
+  string(1) (
+}
+string(22) ?php __halt_compiler(
+array(5) {
+  [0]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(6) ?php 
+[2]=
+int(1)
+  }
+  [1]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(15) __halt_compiler
+[2]=
+int(1)
+  }
+  [2]=
+  string(1) (
+  [3]=
+  string(1) )
+  [4]=
+  string(1) ;
+}
+string(24) ?php __halt_compiler();
+array(6) {
+  [0]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(6) ?php 
+[2]=
+int(1)
+  }
+  [1]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(15) __halt_compiler
+[2]=
+int(1)
+  }
+  [2]=
+  string(1) (
+  [3]=
+  string(1) )
+  [4]=
+  string(1) ;
+  [5]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(3) ABC
+[2]=
+int(1)
+  }
+}
+string(27) ?php __halt_compiler();ABC
+array(9) {
+  [0]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(6) ?php 
+[2]=
+int(1)
+  }
+  [1]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(15) __halt_compiler
+[2]=
+int(1)
+  }
+  [2]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(1) 
+
+[2]=
+int(1)
+  }
+  [3]=
+  string(1) (
+  [4]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(1) 
+
+[2]=
+int(2)
+  }
+  [5]=
+  string(1) )
+  [6]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(1) 
+
+[2]=
+int(3)
+  }
+  [7]=
+  string(1) ;
+  [8]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(3) ABC
+[2]=
+int(4)
+  }
+}
+string(30) ?php __halt_compiler
+(
+)
+;ABC
+array(9) {
+  [0]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(6) ?php 
+[2]=
+int(1)
+  }
+  [1]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(15) __halt_compiler
+[2]=
+int(1)
+  }
+  [2]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(1) 
+
+[2]=
+int(1)
+  }
+  [3]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(3) abc
+[2]=
+int(2)
+  }
+  [4]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(1) 
+
+[2]=
+int(2)
+  }
+  [5]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(3) def
+[2]=
+int(3)
+  }
+  [6]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(1) 
+
+[2]=
+int(3)
+  }
+  [7]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(3) ghi
+[2]=
+int(4)
+  }
+  [8]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(4)  ABC
+[2]=
+int(4)
+  }
+}
+string(37) ?php __halt_compiler
+abc
+def
+ghi ABC

Modified: php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation16.phpt
===
--- php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation16.phpt	2011-11-08 04:34:18 UTC (rev 318901)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/mbstring/tests/bug43301.phpt trunk/ext/mbstring/tests/bug43301.phpt

2011-11-07 Thread Xinchen Hui
laruence Tue, 08 Nov 2011 06:35:07 +

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

Log:
Fix tests

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/mbstring/tests/bug43301.phpt
U   php/php-src/trunk/ext/mbstring/tests/bug43301.phpt

Modified: php/php-src/branches/PHP_5_4/ext/mbstring/tests/bug43301.phpt
===
--- php/php-src/branches/PHP_5_4/ext/mbstring/tests/bug43301.phpt   
2011-11-08 06:26:23 UTC (rev 318903)
+++ php/php-src/branches/PHP_5_4/ext/mbstring/tests/bug43301.phpt   
2011-11-08 06:35:07 UTC (rev 318904)
@@ -15,7 +15,7 @@

 ?
 --EXPECTF--
-Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable 
(T_VARIABLE) or '$' in %sbug43301.php(%d) : mbregex replace on line %d
+Parse error: syntax error, unexpected %s, expecting %s or '$' in 
%sbug43301.php(%d) : mbregex replace on line %d

 Fatal error: mb_ereg_replace(): Failed evaluating code:
 $1 in %sbug43301.php on line %d

Modified: php/php-src/trunk/ext/mbstring/tests/bug43301.phpt
===
--- php/php-src/trunk/ext/mbstring/tests/bug43301.phpt  2011-11-08 06:26:23 UTC 
(rev 318903)
+++ php/php-src/trunk/ext/mbstring/tests/bug43301.phpt  2011-11-08 06:35:07 UTC 
(rev 318904)
@@ -15,7 +15,7 @@

 ?
 --EXPECTF--
-Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable 
(T_VARIABLE) or '$' in %sbug43301.php(%d) : mbregex replace on line %d
+Parse error: syntax error, unexpected %s, expecting %s or '$' in 
%sbug43301.php(%d) : mbregex replace on line %d

 Fatal error: mb_ereg_replace(): Failed evaluating code:
 $1 in %sbug43301.php on line %d

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