[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2006-12-04 Thread changelog
changelog   Tue Dec  5 01:31:07 2006 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2531r2=1.2532diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2531 php-src/ChangeLog:1.2532
--- php-src/ChangeLog:1.2531Mon Dec  4 01:31:00 2006
+++ php-src/ChangeLog   Tue Dec  5 01:31:07 2006
@@ -1,3 +1,188 @@
+2006-12-04  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* ext/filter/tests/008.phpt
+  ext/filter/tests/009.phpt:
+  - MFB: use %s
+
+* ext/filter/filter.c
+  ext/filter/sanitizing_filters.c:
+  - WS
+
+* (PHP_5_2)
+  ext/filter/filter.c:
+  - default filter is not string anymore (in comment)
+  - WS and error msg sync with head
+
+2006-12-04  Andrei Zmievski  [EMAIL PROTECTED]
+
+* ext/standard/head.c:
+  Make headers-related functions accept Unicode strings, but only if their
+  contents can be converted to ASCII.
+
+* ext/standard/string.c
+  ext/standard/var.c:
+  Unicode support in var_export().
+
+2006-12-04  Stanislav Malyshev  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ZendEngine2/zend_operators.c
+  ZendEngine2/zend_operators.h
+  ext/standard/basic_functions.c
+  ext/standard/string.c
+  main/main.c:
+  Improve tolower()-related functions on Windows and VC2005 by caching 
locale
+  and using
+  tolower_l function.
+
+2006-12-04  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/calendar/tests/easter_date.phpt
+  ext/calendar/tests/unixtojd.phpt:
+  MFB: Fixed tests
+
+* (PHP_5_2)
+  ext/calendar/tests/easter_date.phpt
+  ext/calendar/tests/unixtojd.phpt:
+  Fixed tests
+
+2006-12-04  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  acinclude.m4
+  configure.in:
+  MFH: fix build with Sun compiler, which doesn't support -O0
+
+* acinclude.m4
+  configure.in:
+  fix build with Sun compiler, which doesn't support -O0
+
+* (PHP_5_2)
+  ext/pcre/config0.m4
+  ext/spl/config.m4:
+  MFH: partly fix #39724
+  ext/spl has a soft dependcy from ext/pcre (not ext/pcre-regex)
+
+* ext/pcre/config0.m4
+  ext/spl/config.m4:
+  partly fix #39724
+  ext/spl has a soft dependcy from ext/pcre (not ext/pcre-regex)
+
+2006-12-04  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/pdo/tests/bug_39656.phpt:
+  MFB: Fixed test (user is a reserved keyword in pgsql)
+
+* (PHP_5_2)
+  ext/pdo/tests/bug_39656.phpt:
+  Fixed test (user is a reserved keyword in pgsql)
+
+2006-12-04  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  sapi/cli/tests/002-win32.phpt
+  sapi/cli/tests/002.phpt
+  sapi/cli/tests/004.phpt
+  sapi/cli/tests/005.phpt
+  sapi/cli/tests/006.phpt
+  sapi/cli/tests/007.phpt
+  sapi/cli/tests/008.phpt
+  sapi/cli/tests/009.phpt
+  sapi/cli/tests/010-2.phpt
+  sapi/cli/tests/010.phpt
+  sapi/cli/tests/011.phpt
+  sapi/cli/tests/012.phpt
+  sapi/cli/tests/013.phpt:
+  fix tests
+
+* sapi/cli/tests/002-win32.phpt
+  sapi/cli/tests/002.phpt
+  sapi/cli/tests/004.phpt
+  sapi/cli/tests/005.phpt
+  sapi/cli/tests/006.phpt
+  sapi/cli/tests/007.phpt
+  sapi/cli/tests/008.phpt
+  sapi/cli/tests/009.phpt
+  sapi/cli/tests/010-2.phpt
+  sapi/cli/tests/010.phpt
+  sapi/cli/tests/011.phpt
+  sapi/cli/tests/012.phpt
+  sapi/cli/tests/013.phpt:
+  fix tests, use -n to prevent any problems with existing php.ini
+
+2006-12-04  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ZendEngine2/zend_alloc.c
+  ZendEngine2/zend_alloc.c:
+  Fixed bug #38274 (Memlimit fatal error sent to wrong stderr when using
+  fastcgi)
+
+2006-12-04  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/session/session.c
+  main/main.c:
+  fix retval type
+  it should be int, not zend_bool
+
+2006-12-04  Andrey Hristov  [EMAIL PROTECTED]
+
+* ext/mysqli/mysqli_api.c:
+  dummy change
+
+2006-12-04  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/session/session.c:
+  Fixed bug #37627 (session save_path check checks the parent directory).
+
+2006-12-04  Antony Dovgal  [EMAIL PROTECTED]
+
+* run-tests.php:
+  look for tests in sapi/cli
+
+2006-12-04  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/pdo/pdo_stmt.c:
+  MFB: Fixed bug #38319 (Remove bogus warnings from persistent PDO
+  connections).
+
+* (PHP_5_2)
+  NEWS
+  ext/pdo/pdo_stmt.c:
+  Fixed bug #38319 (Remove bogus warnings from persistent PDO connections).
+
+* ext/pdo/pdo_dbh.c:
+  MFB: Fixed bug #38252 (Incorrect PDO error message on invalid default 
fetch
+  mode).
+
+* (PHP_5_2)
+  NEWS
+  ext/pdo/pdo_dbh.c:
+  Fixed bug #38252 (Incorrect PDO error message on invalid default fetch
+  mode).
+
+* 

[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2006-12-04 Thread changelog
changelog   Tue Dec  5 01:31:10 2006 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1028r2=1.1029diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1028 ZendEngine2/ChangeLog:1.1029
--- ZendEngine2/ChangeLog:1.1028Sat Dec  2 01:31:01 2006
+++ ZendEngine2/ChangeLog   Tue Dec  5 01:31:09 2006
@@ -1,3 +1,19 @@
+2006-12-04  Stanislav Malyshev  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  zend_operators.c
+  zend_operators.h:
+  Improve tolower()-related functions on Windows and VC2005 by caching 
locale
+  and using
+  tolower_l function.
+
+2006-12-04  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend_alloc.c
+  zend_alloc.c:
+  Fixed bug #38274 (Memlimit fatal error sent to wrong stderr when using
+  fastcgi)
+
 2006-12-01  Dmitry Stogov  [EMAIL PROTECTED]
 
 * zend_alloc.c
@@ -15903,7 +15919,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1028 2006/12/02 01:31:01 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1029 2006/12/05 01:31:09 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -17627,7 +17643,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1028 2006/12/02 01:31:01 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1029 2006/12/05 01:31:09 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: CVSROOT / avail

2006-12-04 Thread Martin Jansen
mj  Mon Dec  4 09:46:17 2006 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  * Corrected karma for morse.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1216r2=1.1217diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1216 CVSROOT/avail:1.1217
--- CVSROOT/avail:1.1216Sun Dec  3 13:05:49 2006
+++ CVSROOT/avail   Mon Dec  4 09:46:16 2006
@@ -363,7 +363,7 @@
 avail|instance|pear/XML_RPC2,peardoc
 avail|crafics|pecl/iptcdata
 avail|beni|pear/Net_LDAP,peardoc
-avail|morse|pear/DB_Table,pear/DB_Table2,peardoc
+avail|morse|pear/DB_Table,pear/MDB_Table2,peardoc
 
 # php windows installer
 avail|jmertic|php-src/win32/installer

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



[PHP-CVS] cvs: php-src / run-tests.php

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 13:07:00 2006 UTC

  Modified files:  
/php-srcrun-tests.php 
  Log:
  look for tests in sapi/cli
  
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.309r2=1.310diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.309 php-src/run-tests.php:1.310
--- php-src/run-tests.php:1.309 Thu Nov 23 20:06:02 2006
+++ php-src/run-tests.php   Mon Dec  4 13:07:00 2006
@@ -23,7 +23,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.309 2006/11/23 20:06:02 tony2001 Exp $ */
+/* $Id: run-tests.php,v 1.310 2006/12/04 13:07:00 tony2001 Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -400,7 +400,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.309 $'.\n;
+   echo '$Revision: 1.310 $'.\n;
exit(1);
default:
echo Illegal switch specified!\n;
@@ -537,7 +537,7 @@
 $ignored_by_ext = 0;
 sort($exts_to_test);
 $test_dirs = array();
-$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2');
+$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli');
 foreach($optionals as $dir) {
if (@filetype($dir) == 'dir') {
$test_dirs[] = $dir;

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



[PHP-CVS] cvs: php-src(PHP_5_2) / run-tests.php

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 13:07:26 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcrun-tests.php 
  Log:
  MFH: look for tests in sapi/cli
  
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.17r2=1.226.2.37.2.18diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.17 
php-src/run-tests.php:1.226.2.37.2.18
--- php-src/run-tests.php:1.226.2.37.2.17   Thu Nov 23 20:06:10 2006
+++ php-src/run-tests.php   Mon Dec  4 13:07:26 2006
@@ -23,7 +23,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.17 2006/11/23 20:06:10 tony2001 Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.18 2006/12/04 13:07:26 tony2001 Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -397,7 +397,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.17 
$'.\n;
+   echo '$Revision: 1.226.2.37.2.18 
$'.\n;
exit(1);
default:
echo Illegal switch '$switch' 
specified!\n;
@@ -533,7 +533,7 @@
 $ignored_by_ext = 0;
 sort($exts_to_test);
 $test_dirs = array();
-$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2');
+$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli');
 foreach($optionals as $dir) {
if (@filetype($dir) == 'dir') {
$test_dirs[] = $dir;

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/session session.c

2006-12-04 Thread Ilia Alshanetsky
iliaa   Mon Dec  4 15:19:27 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/sessionsession.c 
/php-srcNEWS 
  Log:
  Fixed bug #37627 (session save_path check checks the parent directory).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.18r2=1.417.2.8.2.19diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.18 
php-src/ext/session/session.c:1.417.2.8.2.19
--- php-src/ext/session/session.c:1.417.2.8.2.18Fri Dec  1 00:27:20 2006
+++ php-src/ext/session/session.c   Mon Dec  4 15:19:26 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.18 2006/12/01 00:27:20 iliaa Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.19 2006/12/04 15:19:26 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -163,7 +163,7 @@
p = new_value;
}
 
-   if (PG(safe_mode)  (!php_checkuid(p, NULL, 
CHECKUID_ALLOW_ONLY_DIR))) {
+   if (PG(safe_mode)  (!php_checkuid(p, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
return FAILURE;
}
 
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.397r2=1.2027.2.547.2.398diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.397 php-src/NEWS:1.2027.2.547.2.398
--- php-src/NEWS:1.2027.2.547.2.397 Mon Dec  4 03:07:44 2006
+++ php-src/NEWSMon Dec  4 15:19:26 2006
@@ -137,6 +137,8 @@
   mode). (Ilia)
 - Fixed bug #37773 (iconv_substr() gives Unknown error when string length = 
1).
   (Ilia)
+- Fixed bug #37627 (session save_path check checks the parent directory).
+  (Ilia)
 - Fixed bug #36975 (natcasesort() causes array_pop() to misbehave). (Hannes)
 - Fixed bug #36812 (pg_execute() modifies input array). (Ilia)
 - Fixed bug #36644 (possible crash in variant_date_from_timestamp()). (Ilia)

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



[PHP-CVS] cvs: php-src /ext/mysqli mysqli_api.c

2006-12-04 Thread Andrey Hristov
andrey  Mon Dec  4 15:27:18 2006 UTC

  Modified files:  
/php-src/ext/mysqli mysqli_api.c 
  Log:
  dummy change
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.138r2=1.139diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.138 
php-src/ext/mysqli/mysqli_api.c:1.139
--- php-src/ext/mysqli/mysqli_api.c:1.138   Tue Oct 31 15:23:16 2006
+++ php-src/ext/mysqli/mysqli_api.c Mon Dec  4 15:27:18 2006
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.138 2006/10/31 15:23:16 georg Exp $ 
+  $Id: mysqli_api.c,v 1.139 2006/12/04 15:27:18 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -51,6 +51,7 @@
 }
 /* }}} */
 
+
 /* {{{ proto bool mysqli_autocommit(object link, bool mode) U
Turn auto commit on or of */
 PHP_FUNCTION(mysqli_autocommit)
@@ -71,6 +72,7 @@
 }
 /* }}} */
 
+
 /* {{{ proto bool mysqli_stmt_bind_param(object stmt, string types, mixed 
variable [,mixed,]) U
Bind variables to a prepared statement as parameters */
 PHP_FUNCTION(mysqli_stmt_bind_param)
@@ -196,6 +198,7 @@
 }
 /* }}} */
 
+
 /* {{{ proto bool mysqli_stmt_bind_result(object stmt, mixed var, [,mixed, 
...]) U
Bind variables to a prepared statement for result storage */
 
@@ -400,6 +403,7 @@
 }
 /* }}} */
 
+
 /* {{{ proto bool mysqli_change_user(object link, string user, string 
password, string database) U
Change logged-in user of the active connection */
 PHP_FUNCTION(mysqli_change_user)
@@ -428,6 +432,7 @@
 }
 /* }}} */
 
+
 /* {{{ proto string mysqli_character_set_name(object link) U
Returns the name of the character set used for this connection */
 PHP_FUNCTION(mysqli_character_set_name)

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



[PHP-CVS] cvs: php-src /ext/session session.c /main main.c

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 15:58:35 2006 UTC

  Modified files:  
/php-src/ext/sessionsession.c 
/php-src/main   main.c 
  Log:
  fix retval type
  it should be int, not zend_bool
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.456r2=1.457diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.456 php-src/ext/session/session.c:1.457
--- php-src/ext/session/session.c:1.456 Fri Dec  1 00:27:33 2006
+++ php-src/ext/session/session.c   Mon Dec  4 15:58:35 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.456 2006/12/01 00:27:33 iliaa Exp $ */
+/* $Id: session.c,v 1.457 2006/12/04 15:58:35 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -267,7 +267,7 @@
 
 static void php_rinit_session_globals(TSRMLS_D);
 static void php_rshutdown_session_globals(TSRMLS_D);
-static zend_bool php_session_destroy(TSRMLS_D);
+static int php_session_destroy(TSRMLS_D);
 
 zend_module_entry session_module_entry = {
STANDARD_MODULE_HEADER,
@@ -1192,9 +1192,9 @@
}
 }
 
-static zend_bool php_session_destroy(TSRMLS_D)
+static int php_session_destroy(TSRMLS_D)
 {
-   zend_bool retval = SUCCESS;
+   int retval = SUCCESS;
 
if (PS(session_status) != php_session_active) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Trying to destroy 
uninitialized session);
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.709r2=1.710diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.709 php-src/main/main.c:1.710
--- php-src/main/main.c:1.709   Thu Nov 23 08:37:34 2006
+++ php-src/main/main.c Mon Dec  4 15:58:35 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.709 2006/11/23 08:37:34 dmitry Exp $ */
+/* $Id: main.c,v 1.710 2006/12/04 15:58:35 tony2001 Exp $ */
 
 /* {{{ includes
  */
@@ -2052,7 +2052,7 @@
 PHPAPI int php_lint_script(zend_file_handle *file TSRMLS_DC)
 {
zend_op_array *op_array;
-   zend_bool retval = FAILURE;
+   int retval = FAILURE;
 
zend_try {
op_array = zend_compile_file(file, ZEND_INCLUDE TSRMLS_CC);

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/session session.c /main main.c

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 15:58:48 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/sessionsession.c 
/php-src/main   main.c 
  Log:
  MFH: fix retval type
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.19r2=1.417.2.8.2.20diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.19 
php-src/ext/session/session.c:1.417.2.8.2.20
--- php-src/ext/session/session.c:1.417.2.8.2.19Mon Dec  4 15:19:26 2006
+++ php-src/ext/session/session.c   Mon Dec  4 15:58:48 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.19 2006/12/04 15:19:26 iliaa Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.20 2006/12/04 15:58:48 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -276,7 +276,7 @@
 
 static void php_rinit_session_globals(TSRMLS_D);
 static void php_rshutdown_session_globals(TSRMLS_D);
-static zend_bool php_session_destroy(TSRMLS_D);
+static int php_session_destroy(TSRMLS_D);
 
 zend_module_entry session_module_entry = {
STANDARD_MODULE_HEADER,
@@ -1304,9 +1304,9 @@
}
 }
 
-static zend_bool php_session_destroy(TSRMLS_D)
+static int php_session_destroy(TSRMLS_D)
 {
-   zend_bool retval = SUCCESS;
+   int retval = SUCCESS;
 
if (PS(session_status) != php_session_active) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Trying to destroy 
uninitialized session);
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.19r2=1.640.2.23.2.20diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.19 php-src/main/main.c:1.640.2.23.2.20
--- php-src/main/main.c:1.640.2.23.2.19 Thu Nov 23 08:37:21 2006
+++ php-src/main/main.c Mon Dec  4 15:58:48 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.19 2006/11/23 08:37:21 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.20 2006/12/04 15:58:48 tony2001 Exp $ */
 
 /* {{{ includes
  */
@@ -1893,7 +1893,7 @@
 PHPAPI int php_lint_script(zend_file_handle *file TSRMLS_DC)
 {
zend_op_array *op_array;
-   zend_bool retval = FAILURE;
+   int retval = FAILURE;
 
zend_try {
op_array = zend_compile_file(file, ZEND_INCLUDE TSRMLS_CC);

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2006-12-04 Thread Dmitry Stogov
dmitry  Mon Dec  4 16:20:02 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  Fixed bug #38274 (Memlimit fatal error sent to wrong stderr when using 
fastcgi)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.398r2=1.2027.2.547.2.399diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.398 php-src/NEWS:1.2027.2.547.2.399
--- php-src/NEWS:1.2027.2.547.2.398 Mon Dec  4 15:19:26 2006
+++ php-src/NEWSMon Dec  4 16:20:02 2006
@@ -133,6 +133,8 @@
   ErrorDocument). (Ilia)
 - Fixed bug #38319 (Remove bogus warnings from persistent PDO connections).
   (Ilia)
+- Fixed bug #38274 (Memlimit fatal error sent to wrong stderr when using
+  fastcgi). (Dmitry)
 - Fixed bug #38252 (Incorrect PDO error message on invalid default fetch
   mode). (Ilia)
 - Fixed bug #37773 (iconv_substr() gives Unknown error when string length = 
1).

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



[PHP-CVS] cvs: php-src /sapi/cli/tests 002-win32.phpt 002.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt 011.phpt 012.phpt 013.phpt

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 17:48:27 2006 UTC

  Modified files:  
/php-src/sapi/cli/tests 002-win32.phpt 002.phpt 004.phpt 005.phpt 
006.phpt 007.phpt 008.phpt 009.phpt 
010-2.phpt 010.phpt 011.phpt 012.phpt 
013.phpt 
  Log:
  fix tests, use -n to prevent any problems with existing php.ini
  
  http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002-win32.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cli/tests/002-win32.phpt
diff -u php-src/sapi/cli/tests/002-win32.phpt:1.1 
php-src/sapi/cli/tests/002-win32.phpt:1.2
--- php-src/sapi/cli/tests/002-win32.phpt:1.1   Fri Nov 24 13:32:07 2006
+++ php-src/sapi/cli/tests/002-win32.phpt   Mon Dec  4 17:48:27 2006
@@ -12,7 +12,7 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php -r var_dump('hello');`);
+var_dump(`$php -n -r var_dump('hello');`);
 
 echo Done\n;
 ?
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cli/tests/002.phpt
diff -u php-src/sapi/cli/tests/002.phpt:1.1 php-src/sapi/cli/tests/002.phpt:1.2
--- php-src/sapi/cli/tests/002.phpt:1.1 Fri Nov 24 13:32:07 2006
+++ php-src/sapi/cli/tests/002.phpt Mon Dec  4 17:48:27 2006
@@ -12,7 +12,7 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php -r 'var_dump(hello);'`);
+var_dump(`$php -n -r 'var_dump(hello);'`);
 
 echo Done\n;
 ?
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/004.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cli/tests/004.phpt
diff -u php-src/sapi/cli/tests/004.phpt:1.1 php-src/sapi/cli/tests/004.phpt:1.2
--- php-src/sapi/cli/tests/004.phpt:1.1 Fri Nov 24 13:32:07 2006
+++ php-src/sapi/cli/tests/004.phpt Mon Dec  4 17:48:27 2006
@@ -7,9 +7,9 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php --rf unknown`);
-var_dump(`$php --rf echo`);
-var_dump(`$php --rf phpinfo`);
+var_dump(`$php -n --rf unknown`);
+var_dump(`$php -n --rf echo`);
+var_dump(`$php -n --rf phpinfo`);
 
 echo Done\n;
 ?
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/005.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cli/tests/005.phpt
diff -u php-src/sapi/cli/tests/005.phpt:1.1 php-src/sapi/cli/tests/005.phpt:1.2
--- php-src/sapi/cli/tests/005.phpt:1.1 Fri Nov 24 13:32:07 2006
+++ php-src/sapi/cli/tests/005.phpt Mon Dec  4 17:48:27 2006
@@ -7,9 +7,9 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php --rc unknown`);
-var_dump(`$php --rc stdclass`);
-var_dump(`$php --rc exception`);
+var_dump(`$php -n --rc unknown`);
+var_dump(`$php -n --rc stdclass`);
+var_dump(`$php -n --rc exception`);
 
 echo Done\n;
 ?
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/006.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cli/tests/006.phpt
diff -u php-src/sapi/cli/tests/006.phpt:1.1 php-src/sapi/cli/tests/006.phpt:1.2
--- php-src/sapi/cli/tests/006.phpt:1.1 Fri Nov 24 13:32:07 2006
+++ php-src/sapi/cli/tests/006.phpt Mon Dec  4 17:48:27 2006
@@ -7,8 +7,8 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php --re unknown`);
-var_dump(`$php --re `);
+var_dump(`$php -n --re unknown`);
+var_dump(`$php -n --re `);
 var_dump(`$php -n --re date`);
 
 echo Done\n;
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/007.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cli/tests/007.phpt
diff -u php-src/sapi/cli/tests/007.phpt:1.1 php-src/sapi/cli/tests/007.phpt:1.2
--- php-src/sapi/cli/tests/007.phpt:1.1 Fri Nov 24 13:32:07 2006
+++ php-src/sapi/cli/tests/007.phpt Mon Dec  4 17:48:27 2006
@@ -32,9 +32,9 @@
 
 file_put_contents($filename, $code);
 
-var_dump(`$php -w $filename`);
-var_dump(`$php -w wrong`);
-var_dump(`echo ?php /* comment */ class test {\n // comment \n function 
foo() {} } ? | $php -w`);
+var_dump(`$php -n -w $filename`);
+var_dump(`$php -n -w wrong`);
+var_dump(`echo ?php /* comment */ class test {\n // comment \n function 
foo() {} } ? | $php -n -w`);
 
 @unlink($filename);
 
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/008.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cli/tests/008.phpt
diff -u php-src/sapi/cli/tests/008.phpt:1.1 php-src/sapi/cli/tests/008.phpt:1.2
--- php-src/sapi/cli/tests/008.phpt:1.1 Fri Nov 24 13:32:07 2006
+++ php-src/sapi/cli/tests/008.phpt Mon Dec  4 17:48:27 2006
@@ -26,8 +26,8 @@
 
 file_put_contents($filename, $code);
 
-var_dump(`$php -f $filename`);
-var_dump(`$php -f wrong`);
+var_dump(`$php -n -f $filename`);
+var_dump(`$php -n -f wrong`);
 
 @unlink($filename);
 
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/009.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/sapi/cli/tests/009.phpt
diff -u php-src/sapi/cli/tests/009.phpt:1.1 php-src/sapi/cli/tests/009.phpt:1.2
--- php-src/sapi/cli/tests/009.phpt:1.1 Fri Nov 24 13:32:07 2006
+++ php-src/sapi/cli/tests/009.phpt Mon Dec  4 17:48:27 2006
@@ -8,8 +8,8 @@
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
 var_dump(`$php -n -c -r 'echo hello;'`);

[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli/tests 002-win32.phpt 002.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt 011.phpt 012.phpt 013.phpt

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 17:48:52 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cli/tests 002-win32.phpt 002.phpt 004.phpt 005.phpt 
006.phpt 007.phpt 008.phpt 009.phpt 
010-2.phpt 010.phpt 011.phpt 012.phpt 
013.phpt 
  Log:
  fix tests
  
  http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002-win32.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cli/tests/002-win32.phpt
diff -u php-src/sapi/cli/tests/002-win32.phpt:1.1.2.2 
php-src/sapi/cli/tests/002-win32.phpt:1.1.2.3
--- php-src/sapi/cli/tests/002-win32.phpt:1.1.2.2   Fri Nov 24 13:33:38 2006
+++ php-src/sapi/cli/tests/002-win32.phpt   Mon Dec  4 17:48:52 2006
@@ -12,7 +12,7 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php -r var_dump('hello');`);
+var_dump(`$php -n -r var_dump('hello');`);
 
 echo Done\n;
 ?
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cli/tests/002.phpt
diff -u php-src/sapi/cli/tests/002.phpt:1.1.2.2 
php-src/sapi/cli/tests/002.phpt:1.1.2.3
--- php-src/sapi/cli/tests/002.phpt:1.1.2.2 Fri Nov 24 13:33:38 2006
+++ php-src/sapi/cli/tests/002.phpt Mon Dec  4 17:48:52 2006
@@ -12,7 +12,7 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php -r 'var_dump(hello);'`);
+var_dump(`$php -n -r 'var_dump(hello);'`);
 
 echo Done\n;
 ?
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/004.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cli/tests/004.phpt
diff -u php-src/sapi/cli/tests/004.phpt:1.1.2.2 
php-src/sapi/cli/tests/004.phpt:1.1.2.3
--- php-src/sapi/cli/tests/004.phpt:1.1.2.2 Fri Nov 24 13:33:38 2006
+++ php-src/sapi/cli/tests/004.phpt Mon Dec  4 17:48:52 2006
@@ -7,9 +7,9 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php --rf unknown`);
-var_dump(`$php --rf echo`);
-var_dump(`$php --rf phpinfo`);
+var_dump(`$php -n --rf unknown`);
+var_dump(`$php -n --rf echo`);
+var_dump(`$php -n --rf phpinfo`);
 
 echo Done\n;
 ?
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/005.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cli/tests/005.phpt
diff -u php-src/sapi/cli/tests/005.phpt:1.1.2.2 
php-src/sapi/cli/tests/005.phpt:1.1.2.3
--- php-src/sapi/cli/tests/005.phpt:1.1.2.2 Fri Nov 24 13:33:38 2006
+++ php-src/sapi/cli/tests/005.phpt Mon Dec  4 17:48:52 2006
@@ -7,9 +7,9 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php --rc unknown`);
-var_dump(`$php --rc stdclass`);
-var_dump(`$php --rc exception`);
+var_dump(`$php -n --rc unknown`);
+var_dump(`$php -n --rc stdclass`);
+var_dump(`$php -n --rc exception`);
 
 echo Done\n;
 ?
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/006.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cli/tests/006.phpt
diff -u php-src/sapi/cli/tests/006.phpt:1.1.2.2 
php-src/sapi/cli/tests/006.phpt:1.1.2.3
--- php-src/sapi/cli/tests/006.phpt:1.1.2.2 Fri Nov 24 13:33:38 2006
+++ php-src/sapi/cli/tests/006.phpt Mon Dec  4 17:48:52 2006
@@ -7,8 +7,8 @@
 
 $php = $_ENV['TEST_PHP_EXECUTABLE'];
 
-var_dump(`$php --re unknown`);
-var_dump(`$php --re `);
+var_dump(`$php -n --re unknown`);
+var_dump(`$php -n --re `);
 var_dump(`$php -n --re date`);
 
 echo Done\n;
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/007.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cli/tests/007.phpt
diff -u php-src/sapi/cli/tests/007.phpt:1.1.2.2 
php-src/sapi/cli/tests/007.phpt:1.1.2.3
--- php-src/sapi/cli/tests/007.phpt:1.1.2.2 Fri Nov 24 13:33:38 2006
+++ php-src/sapi/cli/tests/007.phpt Mon Dec  4 17:48:52 2006
@@ -32,9 +32,9 @@
 
 file_put_contents($filename, $code);
 
-var_dump(`$php -w $filename`);
-var_dump(`$php -w wrong`);
-var_dump(`echo ?php /* comment */ class test {\n // comment \n function 
foo() {} } ? | $php -w`);
+var_dump(`$php -n -w $filename`);
+var_dump(`$php -n -w wrong`);
+var_dump(`echo ?php /* comment */ class test {\n // comment \n function 
foo() {} } ? | $php -n -w`);
 
 @unlink($filename);
 
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/008.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cli/tests/008.phpt
diff -u php-src/sapi/cli/tests/008.phpt:1.1.2.2 
php-src/sapi/cli/tests/008.phpt:1.1.2.3
--- php-src/sapi/cli/tests/008.phpt:1.1.2.2 Fri Nov 24 13:33:38 2006
+++ php-src/sapi/cli/tests/008.phpt Mon Dec  4 17:48:52 2006
@@ -26,8 +26,8 @@
 
 file_put_contents($filename, $code);
 
-var_dump(`$php -f $filename`);
-var_dump(`$php -f wrong`);
+var_dump(`$php -n -f $filename`);
+var_dump(`$php -n -f wrong`);
 
 @unlink($filename);
 
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/009.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/sapi/cli/tests/009.phpt
diff -u php-src/sapi/cli/tests/009.phpt:1.1.2.2 
php-src/sapi/cli/tests/009.phpt:1.1.2.3
--- php-src/sapi/cli/tests/009.phpt:1.1.2.2 Fri Nov 24 13:33:38 2006
+++ 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo/tests bug_39656.phpt

2006-12-04 Thread Ilia Alshanetsky
iliaa   Mon Dec  4 17:55:46 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo/tests  bug_39656.phpt 
  Log:
  Fixed test (user is a reserved keyword in pgsql)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/bug_39656.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/pdo/tests/bug_39656.phpt
diff -u php-src/ext/pdo/tests/bug_39656.phpt:1.1.2.1 
php-src/ext/pdo/tests/bug_39656.phpt:1.1.2.2
--- php-src/ext/pdo/tests/bug_39656.phpt:1.1.2.1Tue Nov 28 16:55:05 2006
+++ php-src/ext/pdo/tests/bug_39656.phptMon Dec  4 17:55:46 2006
@@ -17,8 +17,8 @@
 
 $db-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
-$db-exec(CREATE TABLE testtable (id INTEGER NOT NULL PRIMARY KEY, user 
VARCHAR( 256 ) NOT NULL));
-$db-exec(INSERT INTO testtable (id, user) VALUES (1, 'user'));
+$db-exec(CREATE TABLE testtable (id INTEGER NOT NULL PRIMARY KEY, usr 
VARCHAR( 256 ) NOT NULL));
+$db-exec(INSERT INTO testtable (id, usr) VALUES (1, 'user'));
 
 $stmt = $db-prepare(SELECT * FROM testtable WHERE id = ?);
 $stmt-bindValue(1, 1, PDO::PARAM_INT );

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



[PHP-CVS] cvs: php-src /ext/pdo/tests bug_39656.phpt

2006-12-04 Thread Ilia Alshanetsky
iliaa   Mon Dec  4 17:55:56 2006 UTC

  Modified files:  
/php-src/ext/pdo/tests  bug_39656.phpt 
  Log:
  MFB: Fixed test (user is a reserved keyword in pgsql)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/bug_39656.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/pdo/tests/bug_39656.phpt
diff -u php-src/ext/pdo/tests/bug_39656.phpt:1.2 
php-src/ext/pdo/tests/bug_39656.phpt:1.3
--- php-src/ext/pdo/tests/bug_39656.phpt:1.2Tue Nov 28 16:55:25 2006
+++ php-src/ext/pdo/tests/bug_39656.phptMon Dec  4 17:55:56 2006
@@ -17,8 +17,8 @@
 
 $db-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
-$db-exec(CREATE TABLE testtable (id INTEGER NOT NULL PRIMARY KEY, user 
VARCHAR( 256 ) NOT NULL));
-$db-exec(INSERT INTO testtable (id, user) VALUES (1, 'user'));
+$db-exec(CREATE TABLE testtable (id INTEGER NOT NULL PRIMARY KEY, usr 
VARCHAR( 256 ) NOT NULL));
+$db-exec(INSERT INTO testtable (id, usr) VALUES (1, 'user'));
 
 $stmt = $db-prepare(SELECT * FROM testtable WHERE id = ?);
 $stmt-bindValue(1, 1, PDO::PARAM_INT );

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



[PHP-CVS] cvs: php-src /ext/pcre config0.m4 /ext/spl config.m4

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 18:01:24 2006 UTC

  Modified files:  
/php-src/ext/splconfig.m4 
/php-src/ext/pcre   config0.m4 
  Log:
  partly fix #39724
  ext/spl has a soft dependcy from ext/pcre (not ext/pcre-regex)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.m4?r1=1.21r2=1.22diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.21 php-src/ext/spl/config.m4:1.22
--- php-src/ext/spl/config.m4:1.21  Sun Nov 12 19:01:33 2006
+++ php-src/ext/spl/config.m4   Mon Dec  4 18:01:22 2006
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.21 2006/11/12 19:01:33 bjori Exp $
+dnl $Id: config.m4,v 1.22 2006/12/04 18:01:22 tony2001 Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -31,4 +31,5 @@
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, no)
   PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h])
+  PHP_ADD_EXTENSION_DEP(spl, pcre, true)
 fi
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/config0.m4?r1=1.43r2=1.44diff_format=u
Index: php-src/ext/pcre/config0.m4
diff -u php-src/ext/pcre/config0.m4:1.43 php-src/ext/pcre/config0.m4:1.44
--- php-src/ext/pcre/config0.m4:1.43Wed Aug 30 20:00:58 2006
+++ php-src/ext/pcre/config0.m4 Mon Dec  4 18:01:24 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config0.m4,v 1.43 2006/08/30 20:00:58 iliaa Exp $
+dnl $Id: config0.m4,v 1.44 2006/12/04 18:01:24 tony2001 Exp $
 dnl
 
 dnl By default we'll compile and link against the bundled PCRE library
@@ -53,6 +53,8 @@
 AC_DEFINE(HAVE_PCRE, 1, [ ])
 PHP_ADD_INCLUDE($PCRE_INCDIR)
 PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 
-DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 
-DMATCH_LIMIT=1000 -DMATCH_LIMIT_RECURSION=1000 -DMAX_NAME_SIZE=32 
-DMAX_NAME_COUNT=1 -DMAX_DUPLENGTH=3)
+PHP_SUBST(PCRE_SHARED_LIBADD)
   fi
-  PHP_SUBST(PCRE_SHARED_LIBADD)
+else 
+  PHP_PCRE=no
 fi

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre config0.m4 /ext/spl config.m4

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 18:01:53 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/splconfig.m4 
/php-src/ext/pcre   config0.m4 
  Log:
  MFH: partly fix #39724
  ext/spl has a soft dependcy from ext/pcre (not ext/pcre-regex)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/config.m4?r1=1.13.2.4.2.2r2=1.13.2.4.2.3diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.13.2.4.2.2 
php-src/ext/spl/config.m4:1.13.2.4.2.3
--- php-src/ext/spl/config.m4:1.13.2.4.2.2  Sun Nov 12 19:00:33 2006
+++ php-src/ext/spl/config.m4   Mon Dec  4 18:01:53 2006
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.13.2.4.2.2 2006/11/12 19:00:33 bjori Exp $
+dnl $Id: config.m4,v 1.13.2.4.2.3 2006/12/04 18:01:53 tony2001 Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -28,4 +28,5 @@
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) 
support]) 
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c 
spl_observer.c, no)
   PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h 
spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h 
spl_sxe.h])
+  PHP_ADD_EXTENSION_DEP(spl, pcre, true)
 fi
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/config0.m4?r1=1.38.2.3.2.3r2=1.38.2.3.2.4diff_format=u
Index: php-src/ext/pcre/config0.m4
diff -u php-src/ext/pcre/config0.m4:1.38.2.3.2.3 
php-src/ext/pcre/config0.m4:1.38.2.3.2.4
--- php-src/ext/pcre/config0.m4:1.38.2.3.2.3Wed Aug 30 20:00:21 2006
+++ php-src/ext/pcre/config0.m4 Mon Dec  4 18:01:53 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config0.m4,v 1.38.2.3.2.3 2006/08/30 20:00:21 iliaa Exp $
+dnl $Id: config0.m4,v 1.38.2.3.2.4 2006/12/04 18:01:53 tony2001 Exp $
 dnl
 
 dnl By default we'll compile and link against the bundled PCRE library
@@ -52,6 +52,8 @@
 AC_DEFINE(HAVE_PCRE, 1, [ ])
 PHP_ADD_INCLUDE($PCRE_INCDIR)
 PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DEXPORT= -DNEWLINE=10 
-DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 
-DMATCH_LIMIT=1000 -DMATCH_LIMIT_RECURSION=1000 -DMAX_NAME_SIZE=32 
-DMAX_NAME_COUNT=1 -DMAX_DUPLENGTH=3)
+PHP_SUBST(PCRE_SHARED_LIBADD)
   fi
-  PHP_SUBST(PCRE_SHARED_LIBADD)
+else 
+  PHP_PCRE=no
 fi

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



[PHP-CVS] cvs: php-src / acinclude.m4 configure.in

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 18:28:34 2006 UTC

  Modified files:  
/php-srcacinclude.m4 configure.in 
  Log:
  fix build with Sun compiler, which doesn't support -O0
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.350r2=1.351diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.350 php-src/acinclude.m4:1.351
--- php-src/acinclude.m4:1.350  Mon Oct  2 20:49:13 2006
+++ php-src/acinclude.m4Mon Dec  4 18:28:34 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.350 2006/10/02 20:49:13 tony2001 Exp $
+dnl $Id: acinclude.m4,v 1.351 2006/12/04 18:28:34 tony2001 Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2574,3 +2574,19 @@
 ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
   fi
 ])
+
+dnl
+dnl PHP_DETECT_ICC
+dnl
+AC_DEFUN([PHP_DETECT_ICC],
+[
+  ICC=no
+  AC_MSG_CHECKING([for icc])
+  AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
+ICC=no
+AC_MSG_RESULT([no]),
+ICC=yes
+AC_MSG_RESULT([yes])
+  )
+])
+
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.615r2=1.616diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.615 php-src/configure.in:1.616
--- php-src/configure.in:1.615  Thu Nov 30 17:10:55 2006
+++ php-src/configure.inMon Dec  4 18:28:34 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.615 2006/11/30 17:10:55 iliaa Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.616 2006/12/04 18:28:34 tony2001 Exp $ -*- autoconf 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -120,6 +120,7 @@
 dnl -
 
 AC_PROG_CC
+PHP_DETECT_ICC
 AC_PROG_CC_C_O
 dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
 dnl AC_PROG_CC_STDC
@@ -684,8 +685,11 @@
   CFLAGS=`echo $CFLAGS | $SED -e 's/-O[0-9]*//g'`
   CXXFLAGS=`echo $CXXFLAGS | $SED -e 's/-O[0-9]*//g'`
   changequote([,])
-  CFLAGS=$CFLAGS -O0
-  CXXFLAGS=$CXXFLAGS -O0
+  dnl add -O0 only if GCC or ICC is used
+  if test $GCC = yes || test $ICC = yes; then
+CFLAGS=$CFLAGS -O0
+CXXFLAGS=$CXXFLAGS -O0
+  fi
 else
   PHP_DEBUG=0
   ZEND_DEBUG=no

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



[PHP-CVS] cvs: php-src(PHP_5_2) / acinclude.m4 configure.in

2006-12-04 Thread Antony Dovgal
tony2001Mon Dec  4 18:28:49 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcacinclude.m4 configure.in 
  Log:
  MFH: fix build with Sun compiler, which doesn't support -O0
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.5r2=1.332.2.14.2.6diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.332.2.14.2.5 php-src/acinclude.m4:1.332.2.14.2.6
--- php-src/acinclude.m4:1.332.2.14.2.5 Mon Oct  2 20:49:23 2006
+++ php-src/acinclude.m4Mon Dec  4 18:28:49 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.332.2.14.2.5 2006/10/02 20:49:23 tony2001 Exp $
+dnl $Id: acinclude.m4,v 1.332.2.14.2.6 2006/12/04 18:28:49 tony2001 Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2574,3 +2574,19 @@
 ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
   fi
 ])
+
+dnl
+dnl PHP_DETECT_ICC
+dnl
+AC_DEFUN([PHP_DETECT_ICC],
+[
+  ICC=no
+  AC_MSG_CHECKING([for icc])
+  AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
+ICC=no
+AC_MSG_RESULT([no]),
+ICC=yes
+AC_MSG_RESULT([yes])
+  )
+])
+
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.27r2=1.579.2.52.2.28diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.27 
php-src/configure.in:1.579.2.52.2.28
--- php-src/configure.in:1.579.2.52.2.27Thu Nov 30 17:10:46 2006
+++ php-src/configure.inMon Dec  4 18:28:49 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.52.2.27 2006/11/30 17:10:46 iliaa Exp $ -*- 
autoconf -*-
+ ## $Id: configure.in,v 1.579.2.52.2.28 2006/12/04 18:28:49 tony2001 Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -122,6 +122,7 @@
 dnl -
 
 AC_PROG_CC
+PHP_DETECT_ICC
 AC_PROG_CC_C_O
 dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
 dnl AC_PROG_CC_STDC
@@ -686,8 +687,11 @@
   CFLAGS=`echo $CFLAGS | $SED -e 's/-O[0-9]*//g'`
   CXXFLAGS=`echo $CXXFLAGS | $SED -e 's/-O[0-9]*//g'`
   changequote([,])
-  CFLAGS=$CFLAGS -O0
-  CXXFLAGS=$CXXFLAGS -O0
+  dnl add -O0 only if GCC or ICC is used
+  if test $GCC = yes || test $ICC = yes; then
+CFLAGS=$CFLAGS -O0
+CXXFLAGS=$CXXFLAGS -O0
+  fi
 else
   PHP_DEBUG=0
   ZEND_DEBUG=no

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/calendar/tests easter_date.phpt unixtojd.phpt

2006-12-04 Thread Ilia Alshanetsky
iliaa   Mon Dec  4 18:29:49 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/calendar/tests easter_date.phpt unixtojd.phpt 
  Log:
  Fixed tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/easter_date.phpt?r1=1.4.2.2r2=1.4.2.3diff_format=u
Index: php-src/ext/calendar/tests/easter_date.phpt
diff -u php-src/ext/calendar/tests/easter_date.phpt:1.4.2.2 
php-src/ext/calendar/tests/easter_date.phpt:1.4.2.3
--- php-src/ext/calendar/tests/easter_date.phpt:1.4.2.2 Mon Oct  9 16:02:34 2006
+++ php-src/ext/calendar/tests/easter_date.phpt Mon Dec  4 18:29:49 2006
@@ -12,9 +12,9 @@
 echo date(Y-m-d, easter_date(1492)).\n;
 ?
 --EXPECTF--
-2000-04-22
-2001-04-14
-2002-03-30
+2000-04-23
+2001-04-15
+2002-03-31
 
 Warning: easter_date(): This function is only valid for years between 1970 and 
2037 inclusive in %s on line %d
 1970-01-01
http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/unixtojd.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/calendar/tests/unixtojd.phpt
diff -u php-src/ext/calendar/tests/unixtojd.phpt:1.1.2.2 
php-src/ext/calendar/tests/unixtojd.phpt:1.1.2.3
--- php-src/ext/calendar/tests/unixtojd.phpt:1.1.2.2Mon Oct  9 16:02:34 2006
+++ php-src/ext/calendar/tests/unixtojd.phptMon Dec  4 18:29:49 2006
@@ -10,5 +10,5 @@
 ?
 --EXPECT--
 2440588
-2452162
+2452161
 2453926

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



[PHP-CVS] cvs: php-src(PHP_5_2) /main main.c

2006-12-04 Thread Stanislav Malyshev
stasMon Dec  4 18:37:15 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   main.c 
  Log:
  Improve tolower()-related functions on Windows and VC2005 by caching locale 
and using
  tolower_l function.
  # Gives 10-18% speedup on bench.php
  # Does not change behaviour for non-windows
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.20r2=1.640.2.23.2.21diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.20 php-src/main/main.c:1.640.2.23.2.21
--- php-src/main/main.c:1.640.2.23.2.20 Mon Dec  4 15:58:48 2006
+++ php-src/main/main.c Mon Dec  4 18:37:15 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.20 2006/12/04 15:58:48 tony2001 Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.21 2006/12/04 18:37:15 stas Exp $ */
 
 /* {{{ includes
  */
@@ -1502,6 +1502,7 @@
 
 #if HAVE_SETLOCALE
setlocale(LC_CTYPE, );
+   zend_update_current_locale();
 #endif
 
 #if HAVE_TZSET

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



[PHP-CVS] cvs: php-src /ext/standard head.c

2006-12-04 Thread Andrei Zmievski
andrei  Mon Dec  4 20:43:42 2006 UTC

  Modified files:  
/php-src/ext/standard   head.c 
  Log:
  Make headers-related functions accept Unicode strings, but only if their
  contents can be converted to ASCII.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/head.c?r1=1.92r2=1.93diff_format=u
Index: php-src/ext/standard/head.c
diff -u php-src/ext/standard/head.c:1.92 php-src/ext/standard/head.c:1.93
--- php-src/ext/standard/head.c:1.92Thu Oct 19 20:55:08 2006
+++ php-src/ext/standard/head.c Mon Dec  4 20:43:42 2006
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf [EMAIL PROTECTED]|
+--+
  */
-/* $Id: head.c,v 1.92 2006/10/19 20:55:08 andrei Exp $ */
+/* $Id: head.c,v 1.93 2006/12/04 20:43:42 andrei Exp $ */
 
 #include stdio.h
 #include php.h
@@ -34,16 +34,17 @@
 
 
 /* Implementation of the language Header() function */
-/* {{{ proto void header(string header [, bool replace, [int 
http_response_code]])
+/* {{{ proto void header(string header [, bool replace, [int 
http_response_code]]) U
Sends a raw HTTP header */
 PHP_FUNCTION(header)
 {
zend_bool rep = 1;
sapi_header_line ctr = {0};

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|bl, ctr.line,
-   ctr.line_len, rep, ctr.response_code) == 
FAILURE)
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|bl, ctr.line,
+   ctr.line_len, UG(ascii_conv), rep, 
ctr.response_code) == FAILURE) {
return;
+   }

sapi_header_op(rep ? SAPI_HEADER_REPLACE:SAPI_HEADER_ADD, ctr 
TSRMLS_CC);
 }
@@ -144,7 +145,7 @@
 
 
 /* php_set_cookie(name, value, expires, path, domain, secure) */
-/* {{{ proto bool setcookie(string name [, string value [, int expires [, 
string path [, string domain [, bool secure[, bool httponly]])
+/* {{{ proto bool setcookie(string name [, string value [, int expires [, 
string path [, string domain [, bool secure[, bool httponly]]) U
Send a cookie */
 PHP_FUNCTION(setcookie)
 {
@@ -153,9 +154,11 @@
zend_bool secure = 0, httponly = 0;
int name_len, value_len = 0, path_len = 0, domain_len = 0;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|slssbb, name,
- name_len, value, 
value_len, expires, path,
- path_len, domain, 
domain_len, secure, httponly) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|slssbb, 
name,
+ name_len, 
UG(ascii_conv), value, value_len,
+ UG(ascii_conv), 
expires, path, path_len,
+ UG(ascii_conv), 
domain, domain_len,
+ UG(ascii_conv), 
secure, httponly) == FAILURE) {
return;
}
 
@@ -167,7 +170,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool setrawcookie(string name [, string value [, int expires [, 
string path [, string domain [, bool secure[, bool httponly]])
+/* {{{ proto bool setrawcookie(string name [, string value [, int expires [, 
string path [, string domain [, bool secure[, bool httponly]]) U
Send a cookie with no url encoding of the value */
 PHP_FUNCTION(setrawcookie)
 {
@@ -176,9 +179,11 @@
zend_bool secure = 0, httponly = 0;
int name_len, value_len = 0, path_len = 0, domain_len = 0;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|slssbb, name,
- name_len, value, 
value_len, expires, path,
- path_len, domain, 
domain_len, secure, httponly) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|slssbb, 
name,
+ name_len, 
UG(ascii_conv), value, value_len,
+ UG(ascii_conv), 
expires, path, path_len,
+ UG(ascii_conv), 
domain, domain_len,
+ UG(ascii_conv), 
secure, httponly) == FAILURE) {
return;
}
 

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/filter filter.c

2006-12-04 Thread Pierre-Alain Joye
pajoye  Mon Dec  4 21:16:01 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/filter filter.c 
  Log:
  - default filter is not string anymore (in comment)
  - WS and error msg sync with head
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.52.2.30r2=1.52.2.31diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.52.2.30 
php-src/ext/filter/filter.c:1.52.2.31
--- php-src/ext/filter/filter.c:1.52.2.30   Mon Dec  4 21:07:13 2006
+++ php-src/ext/filter/filter.c Mon Dec  4 21:16:01 2006
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.52.2.30 2006/12/04 21:07:13 pajoye Exp $ */
+/* $Id: filter.c,v 1.52.2.31 2006/12/04 21:16:01 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -123,7 +123,7 @@
return SUCCESS;
}
}
-   /* Fallback to string filter */
+   /* Fallback to the default filter */
IF_G(default_filter) = FILTER_DEFAULT;
return SUCCESS;
 }
@@ -170,9 +170,9 @@
REGISTER_INI_ENTRIES();
 
REGISTER_LONG_CONSTANT(INPUT_POST,PARSE_POST, CONST_CS | 
CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(INPUT_GET, PARSE_GET,  CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(INPUT_GET, PARSE_GET,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(INPUT_COOKIE,  PARSE_COOKIE,   CONST_CS | 
CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(INPUT_ENV, PARSE_ENV,  CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(INPUT_ENV, PARSE_ENV,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(INPUT_SERVER,  PARSE_SERVER,   CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(INPUT_SESSION, PARSE_SESSION,  CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(INPUT_REQUEST, PARSE_REQUEST,  CONST_CS | 
CONST_PERSISTENT);
@@ -274,8 +274,8 @@
 PHP_MINFO_FUNCTION(filter)
 {
php_info_print_table_start();
-   php_info_print_table_header( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.52.2.30 $);
+   php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
+   php_info_print_table_row( 2, Revision, $Revision: 1.52.2.31 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -638,10 +638,10 @@
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(op));
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(op), pos);
zend_hash_get_current_data_ex(Z_ARRVAL_PP(op), (void 
**) arg_elm, pos) == SUCCESS;
-   zend_hash_move_forward_ex(Z_ARRVAL_PP(op), pos)) 
+   zend_hash_move_forward_ex(Z_ARRVAL_PP(op), pos))
{
if (zend_hash_get_current_key_ex(Z_ARRVAL_PP(op), 
arg_key, arg_key_len, index, 0, pos) != HASH_KEY_IS_STRING) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Numeric keys are not allowed in the definition array.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Numeric keys are not allowed in the definition array);
zval_dtor(return_value);
RETURN_FALSE;
}
@@ -791,7 +791,7 @@
int i, size = sizeof(filter_list) / sizeof(filter_list_entry);
 
if (ZEND_NUM_ARGS()) {
-   WRONG_PARAM_COUNT;  
+   WRONG_PARAM_COUNT;
}
 
array_init(return_value);

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



[PHP-CVS] cvs: php-src /ext/filter filter.c

2006-12-04 Thread Pierre-Alain Joye
pajoye  Mon Dec  4 21:16:46 2006 UTC

  Modified files:  
/php-src/ext/filter filter.c 
  Log:
  - WS
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.78r2=1.79diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.78 php-src/ext/filter/filter.c:1.79
--- php-src/ext/filter/filter.c:1.78Sun Dec  3 21:27:51 2006
+++ php-src/ext/filter/filter.c Mon Dec  4 21:16:46 2006
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.78 2006/12/03 21:27:51 iliaa Exp $ */
+/* $Id: filter.c,v 1.79 2006/12/04 21:16:46 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -52,7 +52,7 @@
{ stripped,FILTER_SANITIZE_STRING,php_filter_string   
   },
{ encoded, FILTER_SANITIZE_ENCODED,   php_filter_encoded  
   },
{ special_chars,   FILTER_SANITIZE_SPECIAL_CHARS, 
php_filter_special_chars   },
-   { unsafe_raw,  FILTER_UNSAFE_RAW, 
php_filter_unsafe_raw  },
+   { unsafe_raw,  FILTER_UNSAFE_RAW, 
php_filter_unsafe_raw  },
{ email,   FILTER_SANITIZE_EMAIL, php_filter_email
   },
{ url, FILTER_SANITIZE_URL,   php_filter_url  
   },
{ number_int,  FILTER_SANITIZE_NUMBER_INT,
php_filter_number_int  },
@@ -170,9 +170,9 @@
REGISTER_INI_ENTRIES();
 
REGISTER_LONG_CONSTANT(INPUT_POST,PARSE_POST, CONST_CS | 
CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(INPUT_GET, PARSE_GET,  
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(INPUT_GET, PARSE_GET,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(INPUT_COOKIE,  PARSE_COOKIE,   CONST_CS | 
CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(INPUT_ENV, PARSE_ENV,  
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(INPUT_ENV, PARSE_ENV,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(INPUT_SERVER,  PARSE_SERVER,   CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(INPUT_SESSION, PARSE_SESSION,  CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(INPUT_REQUEST, PARSE_REQUEST,  CONST_CS | 
CONST_PERSISTENT);
@@ -256,6 +256,7 @@
zval_ptr_dtor(IF_G(a)); \
IF_G(a) = NULL;  \
}
+
 PHP_RSHUTDOWN_FUNCTION(filter)
 {
VAR_ARRAY_COPY_DTOR(get_array)
@@ -274,7 +275,7 @@
 {
php_info_print_table_start();
php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.78 $);
+   php_info_print_table_row( 2, Revision, $Revision: 1.79 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/filter/tests callback_non_modified_var.phpt

2006-12-04 Thread Pierre-Alain Joye
pajoye  Mon Dec  4 21:33:22 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/filter/tests   callback_non_modified_var.phpt 
  Log:
  - MFH: callback test
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/callback_non_modified_var.phpt?view=markuprev=1.1
Index: php-src/ext/filter/tests/callback_non_modified_var.phpt
+++ php-src/ext/filter/tests/callback_non_modified_var.phpt
--TEST--
callback function returns non modified value
--FILE--
?php
function callback($var) {
return $var;
}
$var = test;
var_dump(filter_var($var, FILTER_CALLBACK, array('options'='callback')));
?
--EXPECT--  
string(4) test

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



[PHP-CVS] cvs: php-src /ext/filter sanitizing_filters.c

2006-12-04 Thread Pierre-Alain Joye
pajoye  Mon Dec  4 21:34:48 2006 UTC

  Modified files:  
/php-src/ext/filter sanitizing_filters.c 
  Log:
  - WS
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/sanitizing_filters.c?r1=1.15r2=1.16diff_format=u
Index: php-src/ext/filter/sanitizing_filters.c
diff -u php-src/ext/filter/sanitizing_filters.c:1.15 
php-src/ext/filter/sanitizing_filters.c:1.16
--- php-src/ext/filter/sanitizing_filters.c:1.15Sat Jul 22 13:01:03 2006
+++ php-src/ext/filter/sanitizing_filters.c Mon Dec  4 21:34:48 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: sanitizing_filters.c,v 1.15 2006/07/22 13:01:03 pajoye Exp $ */
+/* $Id: sanitizing_filters.c,v 1.16 2006/12/04 21:34:48 pajoye Exp $ */
 
 #include php_filter.h
 #include filter_private.h
@@ -177,7 +177,6 @@
 }
 /* }}} */
 
-
 /* {{{ php_filter_string */
 void php_filter_string(PHP_INPUT_FILTER_PARAM_DECL)
 {

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



[PHP-CVS] cvs: php-src /ext/filter filter.c filter_private.h /ext/filter/tests 010.phpt 039.phpt

2006-12-04 Thread Pierre-Alain Joye
pajoye  Tue Dec  5 01:23:42 2006 UTC

  Modified files:  
/php-src/ext/filter filter.c filter_private.h 
/php-src/ext/filter/tests   010.phpt 039.phpt 
  Log:
  - invalid filter id should not return unsafe values
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.79r2=1.80diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.79 php-src/ext/filter/filter.c:1.80
--- php-src/ext/filter/filter.c:1.79Mon Dec  4 21:16:46 2006
+++ php-src/ext/filter/filter.c Tue Dec  5 01:23:42 2006
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.79 2006/12/04 21:16:46 pajoye Exp $ */
+/* $Id: filter.c,v 1.80 2006/12/05 01:23:42 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -275,7 +275,7 @@
 {
php_info_print_table_start();
php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.79 $);
+   php_info_print_table_row( 2, Revision, $Revision: 1.80 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -653,6 +653,11 @@
zval_dtor(return_value);
RETURN_FALSE;
}
+   if (arg_key_len  2) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Empty keys are not allowed in the definition array);
+   zval_dtor(return_value);
+   RETURN_FALSE;
+   }
if (zend_hash_find(Z_ARRVAL_P(input), arg_key, 
arg_key_len, (void **)tmp) != SUCCESS) {
add_assoc_null_ex(return_value, arg_key, 
arg_key_len);
} else {
@@ -688,6 +693,10 @@
return;
}
 
+   if (!PHP_FILTER_ID_EXISTS(filter)) {
+   RETURN_FALSE;
+   }
+
input = php_filter_get_storage(fetch_from TSRMLS_CC);
 
if (!input || !HASH_OF(input) || zend_hash_find(HASH_OF(input), var, 
var_len + 1, (void **)tmp) != SUCCESS) {
@@ -734,6 +743,10 @@
return;
}
 
+   if (!PHP_FILTER_ID_EXISTS(filter)) {
+   RETURN_FALSE;
+   }
+
*return_value = *data;
zval_copy_ctor(data);
 
@@ -753,6 +766,11 @@
return;
}
 
+   if (op  ( (Z_TYPE_PP(op) == IS_LONG  
!PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op)))
+   || Z_TYPE_PP(op) != IS_ARRAY)) {
+   RETURN_FALSE;
+   }
+
array_input = php_filter_get_storage(fetch_from TSRMLS_CC);
 
if (!array_input || !HASH_OF(array_input)) {
@@ -788,6 +806,11 @@
return;
}
 
+   if (op  ( (Z_TYPE_PP(op) == IS_LONG  
!PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op)))
+   || Z_TYPE_PP(op) != IS_ARRAY)) {
+   RETURN_FALSE;
+   }
+
php_filter_array_handler(array_input, op, return_value TSRMLS_CC);
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter_private.h?r1=1.16r2=1.17diff_format=u
Index: php-src/ext/filter/filter_private.h
diff -u php-src/ext/filter/filter_private.h:1.16 
php-src/ext/filter/filter_private.h:1.17
--- php-src/ext/filter/filter_private.h:1.16Tue Oct 17 15:26:42 2006
+++ php-src/ext/filter/filter_private.h Tue Dec  5 01:23:42 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: filter_private.h,v 1.16 2006/10/17 15:26:42 iliaa Exp $ */
+/* $Id: filter_private.h,v 1.17 2006/12/05 01:23:42 pajoye Exp $ */
 
 #ifndef FILTER_PRIVATE_H
 #define FILTER_PRIVATE_H
@@ -62,6 +62,7 @@
 #define FILTER_VALIDATE_URL   0x0111
 #define FILTER_VALIDATE_EMAIL 0x0112
 #define FILTER_VALIDATE_IP0x0113
+#define FILTER_VALIDATE_LAST  0x0113
 
 #define FILTER_VALIDATE_ALL   0x0100
 
@@ -76,11 +77,17 @@
 #define FILTER_SANITIZE_NUMBER_INT0x0207
 #define FILTER_SANITIZE_NUMBER_FLOAT  0x0208
 #define FILTER_SANITIZE_MAGIC_QUOTES  0x0209
+#define FILTER_SANITIZE_LAST  0x0209
 
 #define FILTER_SANITIZE_ALL   0x0200
 
 #define FILTER_CALLBACK   0x0400
 
+#define PHP_FILTER_ID_EXISTS(id) \
+((id = FILTER_SANITIZE_ALL  id = FILTER_SANITIZE_LAST) \
+|| (id = FILTER_VALIDATE_ALL  id = FILTER_VALIDATE_LAST) \
+|| id == FILTER_CALLBACK)
+
 #define PHP_FILTER_TRIM_DEFAULT(p, len, end) { \
while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\v') { \
p++; \
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/010.phpt?r1=1.9r2=1.10diff_format=u
Index: php-src/ext/filter/tests/010.phpt
diff -u php-src/ext/filter/tests/010.phpt:1.9 
php-src/ext/filter/tests/010.phpt:1.10
--- php-src/ext/filter/tests/010.phpt:1.9   Tue Oct 17 22:05:43 2006
+++ php-src/ext/filter/tests/010.phpt   Tue Dec  5 01:23:42 2006
@@ -55,6 +55,6 @@
 string(1) 1

[PHP-CVS] cvs: php-src /ext/openssl xp_ssl.c

2006-12-04 Thread Ilia Alshanetsky
iliaa   Tue Dec  5 01:39:21 2006 UTC

  Modified files:  
/php-src/ext/opensslxp_ssl.c 
  Log:
  MFB: Fixed bug #39571 (timeout ssl:// connections).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/xp_ssl.c?r1=1.27r2=1.28diff_format=u
Index: php-src/ext/openssl/xp_ssl.c
diff -u php-src/ext/openssl/xp_ssl.c:1.27 php-src/ext/openssl/xp_ssl.c:1.28
--- php-src/ext/openssl/xp_ssl.c:1.27   Thu Oct  5 00:38:18 2006
+++ php-src/ext/openssl/xp_ssl.cTue Dec  5 01:39:21 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: xp_ssl.c,v 1.27 2006/10/05 00:38:18 iliaa Exp $ */
+/* $Id: xp_ssl.c,v 1.28 2006/12/05 01:39:21 iliaa Exp $ */
 
 #include php.h
 #include ext/standard/file.h
@@ -99,7 +99,7 @@
/* re-negotiation, or perhaps the SSL layer needs more
 * packets: retry in next iteration */
errno = EAGAIN;
-   retry = sslsock-s.is_blocked;
+   retry = 1;
break;
case SSL_ERROR_SYSCALL:
if (ERR_peek_error() == 0) {
@@ -386,6 +386,9 @@
int n, retry = 1;
 
if (cparam-inputs.activate  !sslsock-ssl_active) {
+   float timeout = sslsock-s.timeout.tv_sec + 
sslsock-s.timeout.tv_usec / 100;
+   int blocked = sslsock-s.is_blocked;
+
if (!sslsock-state_set) {
if (sslsock-is_client) {
SSL_set_connect_state(sslsock-ssl_handle);
@@ -395,9 +398,23 @@
sslsock-state_set = 1;
}

+   if (sslsock-is_client  SUCCESS == 
php_set_sock_blocking(sslsock-s.socket, 0 TSRMLS_CC)) {
+   sslsock-s.is_blocked = 0;
+   }
do {
if (sslsock-is_client) {
+   struct timeval tvs, tve;
+   struct timezone tz;
+
+   gettimeofday(tvs, tz);
n = SSL_connect(sslsock-ssl_handle);
+   gettimeofday(tve, tz);
+
+   timeout -= (tve.tv_sec + tve.tv_usec / 100) 
- (tvs.tv_sec + tvs.tv_usec / 100);
+   if (timeout  0) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, SSL: connection timeout);
+   return -1;
+   }
} else {
n = SSL_accept(sslsock-ssl_handle);
}
@@ -409,6 +426,10 @@
}
} while (retry);
 
+   if (sslsock-is_client  sslsock-s.is_blocked != blocked  
SUCCESS == php_set_sock_blocking(sslsock-s.socket, blocked TSRMLS_CC)) {
+   sslsock-s.is_blocked = blocked;
+   }
+
if (n == 1) {
X509 *peer_cert;
 
@@ -740,8 +761,8 @@
memset(sslsock, 0, sizeof(*sslsock));
 
sslsock-s.is_blocked = 1;
-   sslsock-s.timeout.tv_sec = FG(default_socket_timeout);
-   sslsock-s.timeout.tv_usec = 0;
+   sslsock-s.timeout.tv_sec = timeout-tv_sec;
+   sslsock-s.timeout.tv_usec = timeout-tv_usec;
 
/* we don't know the socket until we have determined if we are binding 
or
 * connecting */

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



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c string.c

2006-12-04 Thread Stanislav Malyshev
stasTue Dec  5 02:54:07 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c string.c 
  Log:
  Merge from 5.2:
  Improve tolower()-related functions on Windows and VC2005 by caching locale 
and using
  tolower_l function.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.827r2=1.828diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.827 
php-src/ext/standard/basic_functions.c:1.828
--- php-src/ext/standard/basic_functions.c:1.827Thu Nov 30 21:23:07 2006
+++ php-src/ext/standard/basic_functions.c  Tue Dec  5 02:54:07 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.827 2006/11/30 21:23:07 andrei Exp $ */
+/* $Id: basic_functions.c,v 1.828 2006/12/05 02:54:07 stas Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4164,6 +4164,7 @@
if (BG(locale_string) != NULL) {
setlocale(LC_ALL, C);
setlocale(LC_CTYPE, );
+   zend_update_current_locale();
}
STR_FREE(BG(locale_string));
BG(locale_string) = NULL;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.617r2=1.618diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.617 php-src/ext/standard/string.c:1.618
--- php-src/ext/standard/string.c:1.617 Mon Dec  4 18:55:40 2006
+++ php-src/ext/standard/string.c   Tue Dec  5 02:54:07 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.617 2006/12/04 18:55:40 andrei Exp $ */
+/* $Id: string.c,v 1.618 2006/12/05 02:54:07 stas Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6083,6 +6083,7 @@
}
 
retval = setlocale (cat, loc);
+   zend_update_current_locale();
if (retval) {
/* Remember if locale was changed */
if (loc) {

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



[PHP-CVS] cvs: php-src /main main.c

2006-12-04 Thread Stanislav Malyshev
stasTue Dec  5 02:55:27 2006 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  Merge from 5.2:
  Improve tolower()-related functions on Windows and VC2005 by caching locale 
and using
  tolower_l function.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.710r2=1.711diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.710 php-src/main/main.c:1.711
--- php-src/main/main.c:1.710   Mon Dec  4 15:58:35 2006
+++ php-src/main/main.c Tue Dec  5 02:55:27 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.710 2006/12/04 15:58:35 tony2001 Exp $ */
+/* $Id: main.c,v 1.711 2006/12/05 02:55:27 stas Exp $ */
 
 /* {{{ includes
  */
@@ -1620,6 +1620,7 @@
 
 #if HAVE_SETLOCALE
setlocale(LC_CTYPE, );
+   zend_update_current_locale();
 #endif
 
 #if HAVE_TZSET

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



[PHP-CVS] cvs: php-src /ext/filter/tests 008.phpt

2006-12-04 Thread Pierre-Alain Joye
pajoye  Mon Dec  4 21:23:02 2006 UTC

  Modified files:  
/php-src/ext/filter/tests   008.phpt 
  Log:
  - MFB: use %s
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/008.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/filter/tests/008.phpt
diff -u php-src/ext/filter/tests/008.phpt:1.5 
php-src/ext/filter/tests/008.phpt:1.6
--- php-src/ext/filter/tests/008.phpt:1.5   Fri Oct 20 15:03:22 2006
+++ php-src/ext/filter/tests/008.phpt   Mon Dec  4 21:23:02 2006
@@ -48,6 +48,6 @@
   string(8) callback
 }
 
-Warning: Wrong parameter count for filter_list() in %s008.php on line 4
+Warning: Wrong parameter count for filter_list() in %s on line %d
 NULL
 Done

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



[PHP-CVS] cvs: php-src /ext/standard file.c file.h /ext/standard/tests/file bug12556.phpt fgetcsv.phpt

2006-12-04 Thread Sara Golemon
pollita Tue Dec  5 04:13:47 2006 UTC

  Modified files:  
/php-src/ext/standard   file.c file.h 
/php-src/ext/standard/tests/filebug12556.phpt fgetcsv.phpt 
  Log:
  Unicode upgrade for fgetcsv()
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.469r2=1.470diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.469 php-src/ext/standard/file.c:1.470
--- php-src/ext/standard/file.c:1.469   Wed Nov 22 12:56:26 2006
+++ php-src/ext/standard/file.c Tue Dec  5 04:13:46 2006
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.469 2006/11/22 12:56:26 pajoye Exp $ */
+/* $Id: file.c,v 1.470 2006/12/05 04:13:46 pollita Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1932,43 +1932,6 @@
 }
 /* }}} */
 
-static const char *php_fgetcsv_lookup_trailing_spaces(const char *ptr, size_t 
len, const char delimiter TSRMLS_DC)
-{
-   int inc_len;
-   unsigned char last_chars[2] = { 0, 0 };
-
-   while (len  0) {
-   inc_len = (*ptr == '\0' ? 1: php_mblen(ptr, len));
-   switch (inc_len) {
-   case -2:
-   case -1:
-   inc_len = 1;
-   php_mblen(NULL, 0);
-   break;
-   case 0:
-   goto quit_loop;
-   case 1:
-   default:
-   last_chars[0] = last_chars[1];
-   last_chars[1] = *ptr;
-   break;
-   }
-   ptr += inc_len;
-   len -= inc_len;
-   }
-quit_loop:
-   switch (last_chars[1]) {
-   case '\n':
-   if (last_chars[0] == '\r') {
-   return ptr - 2;
-   }
-   /* break is omitted intentionally */
-   case '\r':
-   return ptr - 1;
-   }
-   return ptr;
-}
-
 #define FPUTCSV_FLD_CHK(c) memchr(Z_STRVAL_PP(field), c, Z_STRLEN_PP(field))
 
 /* {{{ proto int fputcsv(resource fp, array fields [, string delimiter [, 
string enclosure]])
@@ -2072,87 +2035,149 @@
 }
 /* }}} */
 
-/* {{{ proto array fgetcsv(resource fp [,int length [, string delimiter [, 
string enclosure]]])
+/* {{{ proto array fgetcsv(resource fp [,int length [, string delimiter [, 
string enclosure[, string escape) U
Get line from file pointer and parse for CSV fields */
-/* UTODO: Accept unicode contents */
+#define PHP_FGETCSV_TRUNCATE(field) \
+if (argc  4) { \
+   /* Caller knows about new semantics since they're using new param, 
allow multichar */ \
+} else if (field##_type == IS_STRING  field##_len  1) { \
+   php_error_docref(NULL TSRMLS_CC, E_NOTICE, #field  must be a single 
character); \
+   delimiter_len = 1; \
+} else if (field##_type == IS_UNICODE  u_countChar32((UChar*)field, 
field##_len)  1) { \
+   int __tmp = 0; \
+   php_error_docref(NULL TSRMLS_CC, E_NOTICE, #field  must be a single 
character); \
+   U16_FWD_1(((UChar*)field), __tmp, field##_len); \
+   field##_len = __tmp; \
+}
+
 PHP_FUNCTION(fgetcsv)
 {
-   char delimiter = ',';   /* allow this to be set as parameter */
-   char enclosure = '';   /* allow this to be set as parameter */
-   /* first section exactly as php_fgetss */
-
-   long len = 0;
-   size_t buf_len;
-   char *buf;
+   zend_uchar delimiter_type = IS_STRING, enclosure_type = IS_STRING, 
escape_type = IS_STRING;
+   char *delimiter = ,, *enclosure = \, *escape = \\;
+   int delimiter_len = 1, enclosure_len = 1, escape_len = 1;
+   long len = -1;
+   zstr buf;
+   int buf_len, argc = ZEND_NUM_ARGS();
php_stream *stream;
+   zval *zstream;
+   zend_uchar delimiter_free = 0, enclosure_free = 0, escape_free = 0;
 
-   {
-   zval *fd, **len_zv = NULL;
-   char *delimiter_str = NULL;
-   int delimiter_str_len = 0;
-   char *enclosure_str = NULL;
-   int enclosure_str_len = 0;
-
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|Zss,
-   fd, len_zv, delimiter_str, 
delimiter_str_len,
-   enclosure_str, enclosure_str_len) == 
FAILURE) {
-   return;
-   }   
+   if (zend_parse_parameters(argc TSRMLS_CC, r|l!ttt, zstream, len,
+   delimiter, delimiter_len, 
delimiter_type,
+   enclosure, enclosure_len, 
enclosure_type,
+   escape,escape_len,
escape_type) == FAILURE) {
+   return;
+   }
 
-   if