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

2006-03-14 Thread changelog
changelog   Wed Mar 15 06:31:45 2006 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewcvs.cgi/php-src/ChangeLog?r1=1.2284r2=1.2285diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2284 php-src/ChangeLog:1.2285
--- php-src/ChangeLog:1.2284Tue Mar 14 06:31:42 2006
+++ php-src/ChangeLog   Wed Mar 15 06:31:44 2006
@@ -1,3 +1,97 @@
+2006-03-14  Sara Golemon  [EMAIL PROTECTED]
+
+* ext/standard/file.c
+  main/php_streams.h
+  main/streams/streams.c:
+  More stream updates.
+  fgets() will work now as will anything which calls one of the
+  _php_stream_get_line() family of functions.
+  The one exception here is when the legacy defines are used on a unicode
+  stream.  At the moment they'll simply return NULL, I'll update these
+  to do sloppy conversion in a bit.
+  
+  'make (u)test' still doesn't work, but it's a different doesn't work.
+
+2006-03-14  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* README.UPDATING_TO_PHP6:
+  - initial commit, feel free to change/adapt
+
+2006-03-14  Georg Richter  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  ext/mysqli/mysqli_api.c:
+  fixed a 64-bit problem reported by Pierre
+
+2006-03-14  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  NEWS
+  TSRM/TSRM.c
+  TSRM/TSRM.c
+  TSRM/TSRM.h
+  TSRM/TSRM.h
+  main/main.c
+  main/main.c:
+  Fixed bug #35988 (Unknown persistent list entry type in module shutdown)
+
+2006-03-14  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/standard/string.c:
+  add brackets and clarity
+
+2006-03-14  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/standard/string.c:
+  MFB51: Fixed offset/length parameter validation in substr_compare()
+  function.
+
+* (PHP_5_1)
+  NEWS
+  ext/standard/string.c:
+  Fixed offset/length parameter validation in substr_compare() function.
+
+2006-03-14  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  NEWS
+  ZendEngine2/zend.h
+  ZendEngine2/zend.h
+  ZendEngine2/zend_config.w32.h
+  ZendEngine2/zend_config.w32.h
+  ZendEngine2/tests/bug36568.phpt
+  ZendEngine2/tests/bug36568.phpt
+  ZendEngine2/tests/bug36568.phpt:
+  Fixed bug #36568 (memory_limit setting on win32 has no effect)
+
+* ZendEngine2/zend_constants.c
+  ZendEngine2/zend_constants.c
+  ZendEngine2/zend_execute_API.c
+  ZendEngine2/zend_execute_API.c
+  ZendEngine2/zend_opcode.c
+  ZendEngine2/zend_opcode.c:
+  zend_hash_apply() doesn't use ZEND_HASH_APPLY_... macros
+
+* ZendEngine2/zend_compile.c
+  ZendEngine2/zend_language_scanner.l
+  ZendEngine2/tests/jump01.phpt
+  ZendEngine2/tests/jump02.phpt
+  ZendEngine2/tests/jump03.phpt
+  ZendEngine2/tests/jump04.phpt
+  ZendEngine2/tests/jump05.phpt
+  ZendEngine2/tests/jump06.phpt
+  ZendEngine2/tests/jump07.phpt
+  ZendEngine2/tests/jump08.phpt
+  ZendEngine2/tests/jump09.phpt
+  ZendEngine2/tests/jump10.phpt:
+  jump - goto
+
+2006-03-14  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* ext/gd/libgd/gd_gif_out.c
+  ext/gd/tests/bug36697.phpt:
+  - MFB: #36697, truecolor image lost im-transparent
+
 2006-03-13  Marcus Boerger  [EMAIL PROTECTED]
 
 * (PHP_5_1)


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

2006-03-14 Thread changelog
changelog   Wed Mar 15 06:31:57 2006 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewcvs.cgi/ZendEngine2/ChangeLog?r1=1.878r2=1.879diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.878 ZendEngine2/ChangeLog:1.879
--- ZendEngine2/ChangeLog:1.878 Tue Mar 14 06:31:48 2006
+++ ZendEngine2/ChangeLog   Wed Mar 15 06:31:57 2006
@@ -1,3 +1,39 @@
+2006-03-14  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend.h
+  zend.h
+  zend_config.w32.h
+  zend_config.w32.h
+  tests/bug36568.phpt:
+  Fixed bug #36568 (memory_limit setting on win32 has no effect)
+
+* tests/bug36568.phpt
+  tests/bug36568.phpt:
+  
+  file bug36568.phpt was initially added on branch PHP_5_1.
+
+* zend_constants.c
+  zend_constants.c
+  zend_execute_API.c
+  zend_execute_API.c
+  zend_opcode.c
+  zend_opcode.c:
+  zend_hash_apply() doesn't use ZEND_HASH_APPLY_... macros
+
+* zend_compile.c
+  zend_language_scanner.l
+  tests/jump01.phpt
+  tests/jump02.phpt
+  tests/jump03.phpt
+  tests/jump04.phpt
+  tests/jump05.phpt
+  tests/jump06.phpt
+  tests/jump07.phpt
+  tests/jump08.phpt
+  tests/jump09.phpt
+  tests/jump10.phpt:
+  jump - goto
+
 2006-03-13  Dmitry Stogov  [EMAIL PROTECTED]
 
 * zend_compile.h
@@ -12648,7 +12684,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.878 2006/03/14 06:31:48 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.879 2006/03/15 06:31:57 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -14372,7 +14408,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.878 2006/03/14 06:31:48 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.879 2006/03/15 06:31:57 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo_pgsql config.w32 pdo_pgsql.c

2006-03-14 Thread Edin Kadribasic
edink   Tue Mar 14 10:49:18 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/pdo_pgsql  config.w32 pdo_pgsql.c 
  Log:
  Be more verbose in phpinfo() output
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_pgsql/config.w32?r1=1.4r2=1.4.2.1diff_format=u
Index: php-src/ext/pdo_pgsql/config.w32
diff -u php-src/ext/pdo_pgsql/config.w32:1.4 
php-src/ext/pdo_pgsql/config.w32:1.4.2.1
--- php-src/ext/pdo_pgsql/config.w32:1.4Mon May 16 17:34:44 2005
+++ php-src/ext/pdo_pgsql/config.w32Tue Mar 14 10:49:18 2006
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.4 2005/05/16 17:34:44 edink Exp $
+// $Id: config.w32,v 1.4.2.1 2006/03/14 10:49:18 edink Exp $
 // vim:ft=javascript
 
 ARG_WITH(pdo-pgsql, PostgreSQL support for PDO, no);
@@ -7,6 +7,11 @@
if (CHECK_LIB(libpq.lib, pdo_pgsql, PHP_PDO_PGSQL) 
CHECK_HEADER_ADD_INCLUDE(libpq-fe.h, 
CFLAGS_PDO_PGSQL, PHP_PDO_PGSQL + ; + PHP_PHP_BUILD + \\include\\pgsql)) {
EXTENSION(pdo_pgsql, pdo_pgsql.c pgsql_driver.c 
pgsql_statement.c);
+
+   if (CHECK_HEADER_ADD_INCLUDE(pg_config.h, CFLAGS_PDO_PGSQL, 
PHP_PDO_PGSQL + ; + PHP_PHP_BUILD + \\include\\pgsql)) {
+   ADD_FLAG('CFLAGS_PDO_PGSQL', /D HAVE_PG_CONFIG_H);
+   }
+
ADD_FLAG('CFLAGS_PDO_PGSQL', /I ..\\pecl);
AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library');
ADD_FLAG('CFLAGS_PDO_PGSQL', /D HAVE_PQPARAMETERSTATUS=1 /D 
HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D 
HAVE_PQUNESCAPEBYTEA=1 /D HAVE_PQRESULTERRORFIELD=1);
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_pgsql/pdo_pgsql.c?r1=1.7.2.10r2=1.7.2.11diff_format=u
Index: php-src/ext/pdo_pgsql/pdo_pgsql.c
diff -u php-src/ext/pdo_pgsql/pdo_pgsql.c:1.7.2.10 
php-src/ext/pdo_pgsql/pdo_pgsql.c:1.7.2.11
--- php-src/ext/pdo_pgsql/pdo_pgsql.c:1.7.2.10  Sun Jan  1 12:50:12 2006
+++ php-src/ext/pdo_pgsql/pdo_pgsql.c   Tue Mar 14 10:49:18 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: pdo_pgsql.c,v 1.7.2.10 2006/01/01 12:50:12 sniper Exp $ */
+/* $Id: pdo_pgsql.c,v 1.7.2.11 2006/03/14 10:49:18 edink Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -30,6 +30,10 @@
 #include php_pdo_pgsql.h
 #include php_pdo_pgsql_int.h
 
+#ifdef HAVE_PG_CONFIG_H
+#include pg_config.h
+#endif
+
 /* {{{ pdo_pgsql_functions[] */
 zend_function_entry pdo_pgsql_functions[] = {
{NULL, NULL, NULL}
@@ -115,6 +119,12 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, PDO Driver for PostgreSQL, enabled);
+#ifdef HAVE_PG_CONFIG_H
+   php_info_print_table_row(2, PostgreSQL(libpq) Version, PG_VERSION);
+#endif 
+   php_info_print_table_row(2, Module version, 
pdo_pgsql_module_entry.version);
+   php_info_print_table_row(2, Revision,  $Id: pdo_pgsql.c,v 1.7.2.11 
2006/03/14 10:49:18 edink Exp $ );
+
php_info_print_table_end();
 }
 /* }}} */

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



[PHP-CVS] cvs: php-src /ext/pdo_pgsql config.w32 pdo_pgsql.c

2006-03-14 Thread Edin Kadribasic
edink   Tue Mar 14 11:04:13 2006 UTC

  Modified files:  
/php-src/ext/pdo_pgsql  config.w32 pdo_pgsql.c 
  Log:
  MFB: more verbose phpinfo() output
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_pgsql/config.w32?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/pdo_pgsql/config.w32
diff -u php-src/ext/pdo_pgsql/config.w32:1.4 
php-src/ext/pdo_pgsql/config.w32:1.5
--- php-src/ext/pdo_pgsql/config.w32:1.4Mon May 16 17:34:44 2005
+++ php-src/ext/pdo_pgsql/config.w32Tue Mar 14 11:04:13 2006
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.4 2005/05/16 17:34:44 edink Exp $
+// $Id: config.w32,v 1.5 2006/03/14 11:04:13 edink Exp $
 // vim:ft=javascript
 
 ARG_WITH(pdo-pgsql, PostgreSQL support for PDO, no);
@@ -7,6 +7,11 @@
if (CHECK_LIB(libpq.lib, pdo_pgsql, PHP_PDO_PGSQL) 
CHECK_HEADER_ADD_INCLUDE(libpq-fe.h, 
CFLAGS_PDO_PGSQL, PHP_PDO_PGSQL + ; + PHP_PHP_BUILD + \\include\\pgsql)) {
EXTENSION(pdo_pgsql, pdo_pgsql.c pgsql_driver.c 
pgsql_statement.c);
+
+   if (CHECK_HEADER_ADD_INCLUDE(pg_config.h, CFLAGS_PDO_PGSQL, 
PHP_PDO_PGSQL + ; + PHP_PHP_BUILD + \\include\\pgsql)) {
+   ADD_FLAG('CFLAGS_PDO_PGSQL', /D HAVE_PG_CONFIG_H);
+   }
+
ADD_FLAG('CFLAGS_PDO_PGSQL', /I ..\\pecl);
AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library');
ADD_FLAG('CFLAGS_PDO_PGSQL', /D HAVE_PQPARAMETERSTATUS=1 /D 
HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D 
HAVE_PQUNESCAPEBYTEA=1 /D HAVE_PQRESULTERRORFIELD=1);
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_pgsql/pdo_pgsql.c?r1=1.12r2=1.13diff_format=u
Index: php-src/ext/pdo_pgsql/pdo_pgsql.c
diff -u php-src/ext/pdo_pgsql/pdo_pgsql.c:1.12 
php-src/ext/pdo_pgsql/pdo_pgsql.c:1.13
--- php-src/ext/pdo_pgsql/pdo_pgsql.c:1.12  Sun Jan  1 13:09:53 2006
+++ php-src/ext/pdo_pgsql/pdo_pgsql.c   Tue Mar 14 11:04:13 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: pdo_pgsql.c,v 1.12 2006/01/01 13:09:53 sniper Exp $ */
+/* $Id: pdo_pgsql.c,v 1.13 2006/03/14 11:04:13 edink Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -30,6 +30,10 @@
 #include php_pdo_pgsql.h
 #include php_pdo_pgsql_int.h
 
+#ifdef HAVE_PG_CONFIG_H
+#include pg_config.h
+#endif
+
 /* {{{ pdo_pgsql_functions[] */
 zend_function_entry pdo_pgsql_functions[] = {
{NULL, NULL, NULL}
@@ -115,6 +119,12 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, PDO Driver for PostgreSQL, enabled);
+#ifdef HAVE_PG_CONFIG_H
+   php_info_print_table_row(2, PostgreSQL(libpq) Version, PG_VERSION);
+#endif 
+   php_info_print_table_row(2, Module version, 
pdo_pgsql_module_entry.version);
+   php_info_print_table_row(2, Revision,  $Id: pdo_pgsql.c,v 1.13 
2006/03/14 11:04:13 edink Exp $ );
+
php_info_print_table_end();
 }
 /* }}} */


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



RE: [PHP-CVS] cvs: php-src /ext/bz2 bz2_filter.c /ext/standard file.c filters.c streamsfuncs.c user_filters.c /ext/unicode unicode_filter.c /ext/zlib zlib_filter.c /main php_streams.h /main/strea

2006-03-14 Thread Dmitry Stogov
Hi Sara,

make test stops work after this patch, because now fgets() always returns
FALSE.
It is not possible for me to commit ZE patches without testing.
Please fix this ASAP or revert your patches.

Thanks. Dmitry.

 -Original Message-
 From: Sara Golemon [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 13, 2006 7:40 AM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src /ext/bz2 bz2_filter.c 
 /ext/standard file.c filters.c streamsfuncs.c user_filters.c 
 /ext/unicode unicode_filter.c /ext/zlib zlib_filter.c /main 
 php_streams.h /main/streams cast.c filter.c 
 php_stream_filter_api.h streams.c 
 
 
 pollita   Mon Mar 13 04:40:12 2006 UTC
 
   Modified files:  
 /php-src/main php_streams.h 
 /php-src/main/streams streams.c filter.c cast.c 
   php_stream_filter_api.h 
 /php-src/ext/standard file.c user_filters.c filters.c 
   streamsfuncs.c 
 /php-src/ext/zlib zlib_filter.c 
 /php-src/ext/bz2  bz2_filter.c 
 /php-src/ext/unicode  unicode_filter.c 
   Log:
   Refactor streams layer for PHP6.
   
   Don't be frightened by the size of this commit.
   A significant portion of it is restoring the read buffer 
 semantics back
   to what PHP4/5 use.  (Or a close aproximation thereof).
   
   See main/streams/streams.c and ext/standard/file.c for a set of
   UTODO comments covering work yet to be done.
   
   
 

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



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

2006-03-14 Thread Edin Kadribasic
edink   Tue Mar 14 11:14:05 2006 UTC

  Modified files:  
/php-src/ext/pdo_pgsql  pgsql_driver.c 
  Log:
  MFB: Fixed build
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.57r2=1.58diff_format=u
Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.57 
php-src/ext/pdo_pgsql/pgsql_driver.c:1.58
--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.57   Sun Jan 29 17:36:12 2006
+++ php-src/ext/pdo_pgsql/pgsql_driver.cTue Mar 14 11:14:05 2006
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pgsql_driver.c,v 1.57 2006/01/29 17:36:12 iliaa Exp $ */
+/* $Id: pgsql_driver.c,v 1.58 2006/03/14 11:14:05 edink Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -223,13 +223,14 @@
pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh-driver_data;
PGresult *res;
long ret = 1;
+   ExecStatusType qs;

if (!(res = PQexec(H-server, sql))) {
/* fatal error */
pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, NULL);
return -1;
}
-   ExecStatusType qs = PQresultStatus(res);
+   qs = PQresultStatus(res);
if (qs != PGRES_COMMAND_OK  qs != PGRES_TUPLES_OK) {
pdo_pgsql_error(dbh, qs, pdo_pgsql_sqlstate(res));
PQclear(res);

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /win32/build config.w32.h.in ZendEngine2 zend.h zend_config.w32.h ZendEngine2/tests bug36568.phpt

2006-03-14 Thread Dmitry Stogov
dmitry  Tue Mar 14 14:19:00 2006 UTC

  Added files: (Branch: PHP_5_1)
/ZendEngine2/tests  bug36568.phpt 

  Modified files:  
/php-srcNEWS 
/ZendEngine2zend.h zend_config.w32.h 
/php-src/win32/buildconfig.w32.h.in 
  Log:
  Fixed bug #36568 (memory_limit setting on win32 has no effect)
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.458r2=1.2027.2.459diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.458 php-src/NEWS:1.2027.2.459
--- php-src/NEWS:1.2027.2.458   Mon Mar 13 21:56:38 2006
+++ php-src/NEWSTue Mar 14 14:19:00 2006
@@ -7,6 +7,7 @@
 - Fixed bug #36629 (SoapServer::handle() exits on SOAP faults). (Dmitry)
 - Fixed bug #36697 (Transparency is lost when using imagecreatetruecolor).
  (Pierre)
+- Fixed bug #36568 (memory_limit setting on win32 has no effect). (Dmitry)
 
 09 Mar 2006, PHP 5.1.3RC1
 - Updated PCRE to version 6.6. (Andrei)
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.h?r1=1.293.2.9r2=1.293.2.10diff_format=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.293.2.9 ZendEngine2/zend.h:1.293.2.10
--- ZendEngine2/zend.h:1.293.2.9Wed Jan  4 23:53:03 2006
+++ ZendEngine2/zend.h  Tue Mar 14 14:19:00 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.h,v 1.293.2.9 2006/01/04 23:53:03 andi Exp $ */
+/* $Id: zend.h,v 1.293.2.10 2006/03/14 14:19:00 dmitry Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -91,7 +91,7 @@
 
 #endif /* HAVE_MACH_O_DYLD_H */
 
-#if defined(HAVE_LIBDL)  !defined(HAVE_MACH_O_DYLD_H)
+#if defined(HAVE_LIBDL)  !defined(HAVE_MACH_O_DYLD_H)  !defined(ZEND_WIN32)
 
 # ifndef RTLD_LAZY
 #  define RTLD_LAZY 1/* Solaris 1, FreeBSD's (2.1.7.1 and older) */
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_config.w32.h?r1=1.39.2.1r2=1.39.2.2diff_format=u
Index: ZendEngine2/zend_config.w32.h
diff -u ZendEngine2/zend_config.w32.h:1.39.2.1 
ZendEngine2/zend_config.w32.h:1.39.2.2
--- ZendEngine2/zend_config.w32.h:1.39.2.1  Wed Jan  4 23:53:04 2006
+++ ZendEngine2/zend_config.w32.h   Tue Mar 14 14:19:00 2006
@@ -5,7 +5,7 @@
| Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) |
+--+
| This source file is subject to version 2.00 of the Zend license, |
-   | that is bundled with this package in the file LICENSE, and is| 
+   | that is bundled with this package in the file LICENSE, and is|
| available through the world-wide-web at the following url:   |
| http://www.zend.com/license/2_00.txt.|
| If you did not receive a copy of the Zend license and are unable to  |
@@ -17,14 +17,15 @@
+--+
 */
 
-/* $Id: zend_config.w32.h,v 1.39.2.1 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_config.w32.h,v 1.39.2.2 2006/03/14 14:19:00 dmitry Exp $ */
 
 #ifndef ZEND_CONFIG_W32_H
 #define ZEND_CONFIG_W32_H
 
 #define USE_ZEND_ALLOC 1
-#define HAVE_ALLOCA 1
-#define HAVE_LIMITS_H 1
+
+#include ../main/config.w32.h
+
 #define _CRTDBG_MAP_ALLOC
 
 #include malloc.h
@@ -44,19 +45,9 @@
 typedef unsigned long ulong;
 typedef unsigned int uint;
 
-#undef HAVE_KILL
-#define HAVE_GETPID 1
-/* #define HAVE_ALLOCA_H 1 */
-#define HAVE_MEMCPY 1
-#define HAVE_STRDUP 1
-#define HAVE_SYS_TYPES_H 1
 #define HAVE_STDIOSTR_H 1
 #define HAVE_CLASS_ISTDIOSTREAM
 #define istdiostream stdiostream
-#define HAVE_STDARG_H  1
-#define HAVE_SNPRINTF  1
-#define HAVE_VSNPRINTF 1
-#define HAVE_STRCOLL   1
 
 #define snprintf _snprintf
 #define vsnprintf _vsnprintf
@@ -87,7 +78,7 @@
 #define ZEND_DLEXPORT  __declspec(dllexport)
 #define ZEND_DLIMPORT  __declspec(dllimport)
 
-/* 0x0020L is MB_SERVICE_NOTIFICATION, which is only supported under 
Windows NT 
+/* 0x0020L is MB_SERVICE_NOTIFICATION, which is only supported under 
Windows NT
  * (and requires _WIN32_WINNT to be defined, which prevents the resulting 
executable
  * from running under Windows 9x
  * Windows 9x should silently ignore it, so it's being used here directly
http://cvs.php.net/viewcvs.cgi/php-src/win32/build/config.w32.h.in?r1=1.7.2.3r2=1.7.2.4diff_format=u
Index: php-src/win32/build/config.w32.h.in
diff -u php-src/win32/build/config.w32.h.in:1.7.2.3 
php-src/win32/build/config.w32.h.in:1.7.2.4
--- php-src/win32/build/config.w32.h.in:1.7.2.3 Wed Jan 11 20:31:05 2006
+++ php-src/win32/build/config.w32.h.in Tue Mar 14 14:19:00 2006
@@ -1,6 +1,6 @@
 /*
Build Configuration Template for Win32.
-   $Id: config.w32.h.in,v 1.7.2.3 2006/01/11 20:31:05 helly Exp $
+   $Id: config.w32.h.in,v 1.7.2.4 2006/03/14 14:19:00 dmitry Exp $
 */
 
 /* Default PHP / PEAR directories */
@@ -107,7 +107,11 @@
 #undef HAVE_SYS_WAIT_H
 #define HAVE_SYSLOG_H 1
 #undef HAVE_UNISTD_H
-#define HAVE_LIBDL 1
+#define 

[PHP-CVS] cvs: php-src /win32/build config.w32.h.in ZendEngine2 zend.h zend_config.w32.h ZendEngine2/tests bug36568.phpt

2006-03-14 Thread Dmitry Stogov
dmitry  Tue Mar 14 14:19:20 2006 UTC

  Modified files:  
/ZendEngine2zend.h zend_config.w32.h 
/ZendEngine2/tests  bug36568.phpt 
/php-src/win32/buildconfig.w32.h.in 
  Log:
  Fixed bug #36568 (memory_limit setting on win32 has no effect)
  
  
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.h?r1=1.316r2=1.317diff_format=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.316 ZendEngine2/zend.h:1.317
--- ZendEngine2/zend.h:1.316Fri Mar  3 09:56:47 2006
+++ ZendEngine2/zend.h  Tue Mar 14 14:19:19 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.h,v 1.316 2006/03/03 09:56:47 johannes Exp $ */
+/* $Id: zend.h,v 1.317 2006/03/14 14:19:19 dmitry Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -92,7 +92,7 @@
 
 #endif /* HAVE_MACH_O_DYLD_H */
 
-#if defined(HAVE_LIBDL)  !defined(HAVE_MACH_O_DYLD_H)
+#if defined(HAVE_LIBDL)  !defined(HAVE_MACH_O_DYLD_H)  !defined(ZEND_WIN32)
 
 # ifndef RTLD_LAZY
 #  define RTLD_LAZY 1/* Solaris 1, FreeBSD's (2.1.7.1 and older) */
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_config.w32.h?r1=1.41r2=1.42diff_format=u
Index: ZendEngine2/zend_config.w32.h
diff -u ZendEngine2/zend_config.w32.h:1.41 ZendEngine2/zend_config.w32.h:1.42
--- ZendEngine2/zend_config.w32.h:1.41  Tue Feb 21 08:00:38 2006
+++ ZendEngine2/zend_config.w32.h   Tue Mar 14 14:19:19 2006
@@ -17,14 +17,15 @@
+--+
 */
 
-/* $Id: zend_config.w32.h,v 1.41 2006/02/21 08:00:38 dmitry Exp $ */
+/* $Id: zend_config.w32.h,v 1.42 2006/03/14 14:19:19 dmitry Exp $ */
 
 #ifndef ZEND_CONFIG_W32_H
 #define ZEND_CONFIG_W32_H
 
 #define USE_ZEND_ALLOC 1
-#define HAVE_ALLOCA 1
-#define HAVE_LIMITS_H 1
+
+#include ../main/config.w32.h
+
 #define _CRTDBG_MAP_ALLOC
 
 #include malloc.h
@@ -44,19 +45,9 @@
 typedef unsigned long ulong;
 typedef unsigned int uint;
 
-#undef HAVE_KILL
-#define HAVE_GETPID 1
-/* #define HAVE_ALLOCA_H 1 */
-#define HAVE_MEMCPY 1
-#define HAVE_STRDUP 1
-#define HAVE_SYS_TYPES_H 1
 #define HAVE_STDIOSTR_H 1
 #define HAVE_CLASS_ISTDIOSTREAM
 #define istdiostream stdiostream
-#define HAVE_STDARG_H  1
-#define HAVE_SNPRINTF  1
-#define HAVE_VSNPRINTF 1
-#define HAVE_STRCOLL   1
 
 #define snprintf _snprintf
 #define vsnprintf _vsnprintf
http://cvs.php.net/viewcvs.cgi/ZendEngine2/tests/bug36568.phpt?r1=1.1r2=1.2diff_format=u
Index: ZendEngine2/tests/bug36568.phpt
diff -u /dev/null ZendEngine2/tests/bug36568.phpt:1.2
--- /dev/null   Tue Mar 14 14:19:20 2006
+++ ZendEngine2/tests/bug36568.phpt Tue Mar 14 14:19:19 2006
@@ -0,0 +1,15 @@
+--TEST--
+Bug #36568 (memory_limit has no effect)
+--SKIPIF--
+?php 
+   if (!function_exists('memory_get_usage')) die('skip PHP is configured 
without memory_limit');
+?
+--INI--
+memory_limit=16M
+--FILE--
+?php
+ini_set(memory_limit, 32M);
+echo ini_get(memory_limit);
+?
+--EXPECT--
+32M
http://cvs.php.net/viewcvs.cgi/php-src/win32/build/config.w32.h.in?r1=1.9r2=1.10diff_format=u
Index: php-src/win32/build/config.w32.h.in
diff -u php-src/win32/build/config.w32.h.in:1.9 
php-src/win32/build/config.w32.h.in:1.10
--- php-src/win32/build/config.w32.h.in:1.9 Wed Jan 11 20:24:07 2006
+++ php-src/win32/build/config.w32.h.in Tue Mar 14 14:19:19 2006
@@ -1,6 +1,6 @@
 /*
Build Configuration Template for Win32.
-   $Id: config.w32.h.in,v 1.9 2006/01/11 20:24:07 helly Exp $
+   $Id: config.w32.h.in,v 1.10 2006/03/14 14:19:19 dmitry Exp $
 */
 
 /* Default PHP / PEAR directories */
@@ -107,7 +107,11 @@
 #undef HAVE_SYS_WAIT_H
 #define HAVE_SYSLOG_H 1
 #undef HAVE_UNISTD_H
-#define HAVE_LIBDL 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDARG_H 1
+#undef HAVE_ALLOCA_H
+#undef HAVE_KILL
+#define HAVE_GETPID 1
 #define HAVE_LIBM 1
 #define HAVE_CUSERID 0
 #undef HAVE_RINT
@@ -143,3 +147,10 @@
 #undef HAVE_ATOF_ACCEPTS_NAN
 #undef HAVE_ATOF_ACCEPTS_INF
 #define HAVE_HUGE_VAL_NAN 1
+
+/* vs.net 2005 has a 64-bit time_t.  This will likely break
+ * 3rdParty libs that were built with older compilers; switch
+ * back to 32-bit */
+#define _USE_32BIT_TIME_T 1
+#define HAVE_STDLIB_H 1
+

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



Re: [PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /win32/build config.w32.h.in ZendEngine2 zend.h zend_config.w32.h ZendEngine2/tests bug36568.phpt

2006-03-14 Thread Derick Rethans
On Tue, 14 Mar 2006, Dmitry Stogov wrote:

 dmitryTue Mar 14 14:19:00 2006 UTC
 
   Added files: (Branch: PHP_5_1)
 /ZendEngine2/testsbug36568.phpt 
 
   Modified files:  
 /php-src  NEWS 
 /ZendEngine2  zend.h zend_config.w32.h 
 /php-src/win32/build  config.w32.h.in 
   Log:
   Fixed bug #36568 (memory_limit setting on win32 has no effect)

I think it was by design that our windows builds don't have memory limit 
enabled by default...

Derick

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/standard string.c

2006-03-14 Thread Ilia Alshanetsky
iliaa   Tue Mar 14 14:55:14 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard   string.c 
/php-srcNEWS 
  Log:
  Fixed offset/length parameter validation in substr_compare() function.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.445.2.10r2=1.445.2.11diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.10 
php-src/ext/standard/string.c:1.445.2.11
--- php-src/ext/standard/string.c:1.445.2.10Mon Mar 13 14:37:10 2006
+++ php-src/ext/standard/string.c   Tue Mar 14 14:55:13 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445.2.10 2006/03/13 14:37:10 iliaa Exp $ */
+/* $Id: string.c,v 1.445.2.11 2006/03/14 14:55:13 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4884,7 +4884,7 @@
RETURN_FALSE;
}
 
-   if (len  offset = s1_len) {
+   if (offset + len = s1_len) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, The start position 
cannot exceed initial string length.);
RETURN_FALSE;
}
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.459r2=1.2027.2.460diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.459 php-src/NEWS:1.2027.2.460
--- php-src/NEWS:1.2027.2.459   Tue Mar 14 14:19:00 2006
+++ php-src/NEWSTue Mar 14 14:55:13 2006
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? Mar 2006, PHP 5.1.3RC2
+- Fixed offset/length parameter validation in substr_compare() function. (Ilia)
 - Added overflow checks to wordwrap() function. (Ilia)
 - Removed the E_STRICT deprecation notice from var. (Ilia)
 - Fixed debug_zval_dump() to support private and protected members. (Dmitry)

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



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

2006-03-14 Thread Ilia Alshanetsky
iliaa   Tue Mar 14 14:55:27 2006 UTC

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  MFB51: Fixed offset/length parameter validation in substr_compare() function.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.526r2=1.527diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.526 php-src/ext/standard/string.c:1.527
--- php-src/ext/standard/string.c:1.526 Mon Mar 13 14:37:32 2006
+++ php-src/ext/standard/string.c   Tue Mar 14 14:55:27 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.526 2006/03/13 14:37:32 iliaa Exp $ */
+/* $Id: string.c,v 1.527 2006/03/14 14:55:27 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6492,7 +6492,7 @@
offset = s1_len + offset;
}
 
-   if (len  offset = s1_len) {
+   if (offset + len = s1_len) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, The start position 
cannot exceed initial string length.);
RETURN_FALSE;
}

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



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

2006-03-14 Thread Antony Dovgal
tony2001Tue Mar 14 15:14:59 2006 UTC

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  add brackets and clarity
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.527r2=1.528diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.527 php-src/ext/standard/string.c:1.528
--- php-src/ext/standard/string.c:1.527 Tue Mar 14 14:55:27 2006
+++ php-src/ext/standard/string.c   Tue Mar 14 15:14:59 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.527 2006/03/14 14:55:27 iliaa Exp $ */
+/* $Id: string.c,v 1.528 2006/03/14 15:14:59 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6492,7 +6492,7 @@
offset = s1_len + offset;
}
 
-   if (offset + len = s1_len) {
+   if ((offset + len) = s1_len) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, The start position 
cannot exceed initial string length.);
RETURN_FALSE;
}

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



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/standard string.c

2006-03-14 Thread Antony Dovgal
tony2001Tue Mar 14 15:15:22 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard   string.c 
  Log:
  MFH: add brackets and clarity
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.445.2.11r2=1.445.2.12diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.11 
php-src/ext/standard/string.c:1.445.2.12
--- php-src/ext/standard/string.c:1.445.2.11Tue Mar 14 14:55:13 2006
+++ php-src/ext/standard/string.c   Tue Mar 14 15:15:22 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445.2.11 2006/03/14 14:55:13 iliaa Exp $ */
+/* $Id: string.c,v 1.445.2.12 2006/03/14 15:15:22 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4884,7 +4884,7 @@
RETURN_FALSE;
}
 
-   if (offset + len = s1_len) {
+   if ((offset + len) = s1_len) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, The start position 
cannot exceed initial string length.);
RETURN_FALSE;
}

-- 
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 TSRM TSRM.c TSRM.h

2006-03-14 Thread Dmitry Stogov
dmitry  Tue Mar 14 15:16:27 2006 UTC

  Modified files:  
/TSRM   TSRM.c TSRM.h 
/php-src/main   main.c 
  Log:
  Fixed bug #35988 (Unknown persistent list entry type in module shutdown)
  
  
http://cvs.php.net/viewcvs.cgi/TSRM/TSRM.c?r1=1.70r2=1.71diff_format=u
Index: TSRM/TSRM.c
diff -u TSRM/TSRM.c:1.70 TSRM/TSRM.c:1.71
--- TSRM/TSRM.c:1.70Wed Jan  4 23:54:12 2006
+++ TSRM/TSRM.c Tue Mar 14 15:16:27 2006
@@ -480,6 +480,52 @@
 }
 
 
+/* frees all resources allocated for all threads except current */
+void ts_free_worker_threads(void)
+{
+   tsrm_tls_entry *thread_resources;
+   int i;
+   THREAD_T thread_id = tsrm_thread_id();
+   int hash_value;
+   tsrm_tls_entry *last=NULL;
+
+   tsrm_mutex_lock(tsmm_mutex);
+   hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
+   thread_resources = tsrm_tls_table[hash_value];
+
+   while (thread_resources) {
+   if (thread_resources-thread_id != thread_id) {
+   for (i=0; ithread_resources-count; i++) {
+   if (resource_types_table[i].dtor) {
+   
resource_types_table[i].dtor(thread_resources-storage[i], 
thread_resources-storage);
+   }
+   }
+   for (i=0; ithread_resources-count; i++) {
+   free(thread_resources-storage[i]);
+   }
+   free(thread_resources-storage);
+   if (last) {
+   last-next = thread_resources-next;
+   } else {
+   tsrm_tls_table[hash_value] = 
thread_resources-next;
+   }
+   free(thread_resources);
+   if (last) {
+   thread_resources = last-next;
+   } else {
+   thread_resources = tsrm_tls_table[hash_value];
+   }
+   } else {
+   if (thread_resources-next) {
+   last = thread_resources;
+   }
+   thread_resources = thread_resources-next;
+   }
+   }
+   tsrm_mutex_unlock(tsmm_mutex);
+}
+
+
 /* deallocates all occurrences of a given id */
 void ts_free_id(ts_rsrc_id id)
 {
http://cvs.php.net/viewcvs.cgi/TSRM/TSRM.h?r1=1.51r2=1.52diff_format=u
Index: TSRM/TSRM.h
diff -u TSRM/TSRM.h:1.51 TSRM/TSRM.h:1.52
--- TSRM/TSRM.h:1.51Wed Jan  4 23:54:12 2006
+++ TSRM/TSRM.h Tue Mar 14 15:16:27 2006
@@ -106,6 +106,9 @@
 /* frees all resources allocated for the current thread */
 TSRM_API void ts_free_thread(void);
 
+/* frees all resources allocated for all threads except current */
+void ts_free_worker_threads(void);
+
 /* deallocates all occurrences of a given id */
 TSRM_API void ts_free_id(ts_rsrc_id id);
 
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.673r2=1.674diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.673 php-src/main/main.c:1.674
--- php-src/main/main.c:1.673   Mon Mar 13 09:36:05 2006
+++ php-src/main/main.c Tue Mar 14 15:16:27 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.673 2006/03/13 09:36:05 dmitry Exp $ */
+/* $Id: main.c,v 1.674 2006/03/14 15:16:27 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -1699,6 +1699,10 @@
return;
}
 
+#ifdef ZTS
+   ts_free_worker_threads();
+#endif
+
 #if defined(PHP_WIN32) || (defined(NETWARE)  defined(USE_WINSOCK))
/*close winsock */
WSACleanup();

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



RE: [PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /win32/build config.w32.h.inZendEngine2 zend.h zend_config.w32.h ZendEngine2/tests bug36568.phpt

2006-03-14 Thread Dmitry Stogov
The problem was that even if memory_limit was enabled it couldn't be changed
throgh php.ini.

Thanks. Dmitry.

 -Original Message-
 From: Derick Rethans [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 14, 2006 5:25 PM
 To: Dmitry Stogov
 Cc: php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_1) / NEWS 
 /win32/build config.w32.h.inZendEngine2 zend.h 
 zend_config.w32.h ZendEngine2/tests bug36568.phpt 
 
 
 On Tue, 14 Mar 2006, Dmitry Stogov wrote:
 
  dmitry  Tue Mar 14 14:19:00 2006 UTC
  
Added files: (Branch: PHP_5_1)
  /ZendEngine2/tests  bug36568.phpt 
  
Modified files:  
  /php-srcNEWS 
  /ZendEngine2zend.h zend_config.w32.h 
  /php-src/win32/buildconfig.w32.h.in 
Log:
Fixed bug #36568 (memory_limit setting on win32 has no effect)
 
 I think it was by design that our windows builds don't have 
 memory limit 
 enabled by default...
 
 Derick
 
 

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



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

2006-03-14 Thread Georg Richter
georg   Tue Mar 14 15:53:17 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/mysqli mysqli_api.c 
  Log:
  fixed a 64-bit problem reported by Pierre
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.17r2=1.118.2.18diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.17 
php-src/ext/mysqli/mysqli_api.c:1.118.2.18
--- php-src/ext/mysqli/mysqli_api.c:1.118.2.17  Sat Mar 11 11:16:03 2006
+++ php-src/ext/mysqli/mysqli_api.c Tue Mar 14 15:53:16 2006
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.118.2.17 2006/03/11 11:16:03 georg Exp $ 
+  $Id: mysqli_api.c,v 1.118.2.18 2006/03/14 15:53:16 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -295,7 +295,7 @@
convert_to_long_ex(args[i]);
stmt-result.buf[ofs].type = IS_LONG;
stmt-result.buf[ofs].buflen = 0;
-   stmt-result.buf[ofs].val = (char 
*)emalloc(sizeof(long));
+   stmt-result.buf[ofs].val = (char 
*)emalloc(sizeof(int));
bind[ofs].buffer_type = MYSQL_TYPE_LONG;
bind[ofs].buffer = stmt-result.buf[ofs].val;
bind[ofs].is_null = stmt-result.is_null[ofs];
@@ -663,7 +663,7 @@
if (!stmt-result.is_null[i]) {
switch (stmt-result.buf[i].type) {
case IS_LONG:
-   if ((sizeof(long) ==4)  
(stmt-stmt-fields[i].type == MYSQL_TYPE_LONG) 
+   if ((stmt-stmt-fields[i].type 
== MYSQL_TYPE_LONG) 
 
(stmt-stmt-fields[i].flags  UNSIGNED_FLAG)) 
{
/* unsigned int (11) */
@@ -684,7 +684,11 @@
break;
}
}
-   ZVAL_LONG(stmt-result.vars[i], 
*(int *)stmt-result.buf[i].val);
+   if (stmt-stmt-fields[i].flags 
 UNSIGNED_FLAG) { 
+   
ZVAL_LONG(stmt-result.vars[i], *(unsigned int *)stmt-result.buf[i].val);
+   } else {
+   
ZVAL_LONG(stmt-result.vars[i], *(int *)stmt-result.buf[i].val);
+   };
break;
case IS_DOUBLE:
memcpy(dval, 
stmt-result.buf[i].val, sizeof(dval));

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



[PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-14 Thread Pierre-Alain Joye
pajoye  Tue Mar 14 16:28:35 2006 UTC

  Added files: 
/php-srcREADME.UPDATING_TO_PHP6 
  Log:
  - initial commit, feel free to change/adapt
  
  

http://cvs.php.net/viewcvs.cgi/php-src/README.UPDATING_TO_PHP6?view=markuprev=1.1
Index: php-src/README.UPDATING_TO_PHP6
+++ php-src/README.UPDATING_TO_PHP6
Updating your script to PHP6


This document attempts to describe portions of PHP that changed or
disapeared in PHP6 and the best practices for upgrading existing
applications to support PHP6.

1. Language
1.1 Functions and function aliases
1.2 Register globals
1.3 Magic quotes
1.4 References
2. Unicode (see README.UNICODE-UPGRADES)
2. Extensions
2.1 GD


1.1 Functions and function aliases
--

TODO: List all arguments order changes, aliases droped in php6...
1.2 Register globals
 

For security reasons, register_globals has been removed from php6.
ini_get('register_globals') will always return false.

You can emulate its behavior with some minimum changes in your code.

*DISCLAIMER*
people should get a short-term solution if they are willing to run
an insecure app.

Here is an example to emulate the session related functions and
a snippet to register variables:

$_register_globals_order = ini_get(variables_order);
$_register_globals_order_len = strlen($_register_globals_order);

for($_register_globals_i=0;$_register_globals_i$_register_globals_order_len;$_register_globals_i++)
 {
switch($_register_globals_order{$_register_globals_i}) {
case E:
extract($_ENV, EXTR_REFS|EXTR_OVERWRITE);
case G:
continue;
break;

case P:
extract($_POST, EXTR_REFS|EXTR_OVERWRITE);
break;

case C:
extract($_COOKIE, EXTR_REFS|EXTR_OVERWRITE);
break;

case S:
if(!isset($_SESSION)) {
continue;
}
extract($_SESSION, EXTR_REFS|EXTR_OVERWRITE);
break;
}
}
unset($_register_globals_order, $_register_globals_order_len, 
$_register_globals_i);

function session_register($mixed) {
static $started;
if(!isset($started) || session_id() === ) {
session_start();
$started = true;
}

$array = func_get_args();
foreach($array as $mixed) {

if(is_scalar($mixed)) {
$_SESSION[$mixed] = $GLOBALS[$mixed];
}
elseif(is_array($mixed)) {
foreach($mixed as $name) {
$ok = session_register($name);
if(!$ok) {
return false;
}
}
}
else {
return false;
}
}
return true;
}

function session_is_registered($name) {
if(is_scalar($name)) {
return isset($_SESSION[$name]);
}
return false;
}

function session_unregister($name) {
if(isset($_SESSION[$name])  is_scalar($name)) {
unset($_SESSION[$name]);
return true;
}
return false;
}

1.3 Magic quotes


1.4 References
--

TODO: Derick plans to clean the reference mess in php6

2.1 GD

TODO: gd2/ft2 only, functions droped

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



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl spl_engine.c spl_engine.h

2006-03-14 Thread Frank M. Kromann
fmk Tue Mar 14 18:07:51 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/splspl_engine.c spl_engine.h 
  Log:
  Fix Win32 compilation.
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_engine.c?r1=1.20.2.2r2=1.20.2.3diff_format=u
Index: php-src/ext/spl/spl_engine.c
diff -u php-src/ext/spl/spl_engine.c:1.20.2.2 
php-src/ext/spl/spl_engine.c:1.20.2.3
--- php-src/ext/spl/spl_engine.c:1.20.2.2   Sun Mar  5 17:39:49 2006
+++ php-src/ext/spl/spl_engine.cTue Mar 14 18:07:51 2006
@@ -32,7 +32,7 @@
 #include spl_array.h
 
 /* {{{ spl_instantiate */
-void spl_instantiate(zend_class_entry *pce, zval **object, int alloc TSRMLS_DC)
+PHPAPI void spl_instantiate(zend_class_entry *pce, zval **object, int alloc 
TSRMLS_DC)
 {
if (alloc) {
ALLOC_ZVAL(*object);
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_engine.h?r1=1.19.2.2r2=1.19.2.3diff_format=u
Index: php-src/ext/spl/spl_engine.h
diff -u php-src/ext/spl/spl_engine.h:1.19.2.2 
php-src/ext/spl/spl_engine.h:1.19.2.3
--- php-src/ext/spl/spl_engine.h:1.19.2.2   Sun Mar  5 17:39:49 2006
+++ php-src/ext/spl/spl_engine.hTue Mar 14 18:07:51 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_engine.h,v 1.19.2.2 2006/03/05 17:39:49 helly Exp $ */
+/* $Id: spl_engine.h,v 1.19.2.3 2006/03/14 18:07:51 fmk Exp $ */
 
 #ifndef SPL_ENGINE_H
 #define SPL_ENGINE_H
@@ -36,7 +36,7 @@
 }
 /* }}} */
 
-void spl_instantiate(zend_class_entry *pce, zval **object, int alloc 
TSRMLS_DC);
+PHPAPI void spl_instantiate(zend_class_entry *pce, zval **object, int alloc 
TSRMLS_DC);
 
 /* {{{ spl_instantiate_arg_ex1 */
 static inline int spl_instantiate_arg_ex1(zend_class_entry *pce, zval 
**retval, int alloc, zval *arg1 TSRMLS_DC)

-- 
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 /main php_streams.h /main/streams streams.c

2006-03-14 Thread Sara Golemon
pollita Tue Mar 14 21:15:05 2006 UTC

  Modified files:  
/php-src/main   php_streams.h 
/php-src/main/streams   streams.c 
/php-src/ext/standard   file.c 
  Log:
  More stream updates.
  fgets() will work now as will anything which calls one of the
  _php_stream_get_line() family of functions.
  The one exception here is when the legacy defines are used on a unicode
  stream.  At the moment they'll simply return NULL, I'll update these
  to do sloppy conversion in a bit.
  
  'make (u)test' still doesn't work, but it's a different doesn't work. 
  
  http://cvs.php.net/viewcvs.cgi/php-src/main/php_streams.h?r1=1.106r2=1.107diff_format=u
Index: php-src/main/php_streams.h
diff -u php-src/main/php_streams.h:1.106 php-src/main/php_streams.h:1.107
--- php-src/main/php_streams.h:1.106Mon Mar 13 04:40:11 2006
+++ php-src/main/php_streams.h  Tue Mar 14 21:15:05 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_streams.h,v 1.106 2006/03/13 04:40:11 pollita Exp $ */
+/* $Id: php_streams.h,v 1.107 2006/03/14 21:15:05 pollita Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -320,10 +320,14 @@
 PHPAPI int _php_stream_flush(php_stream *stream, int closing TSRMLS_DC);
 #define php_stream_flush(stream)   _php_stream_flush((stream), 0 TSRMLS_CC)
 
-PHPAPI char *_php_stream_get_line(php_stream *stream, char *buf, size_t 
maxlen, size_t *returned_len TSRMLS_DC);
-#define php_stream_gets(stream, buf, maxlen)   _php_stream_get_line((stream), 
(buf), (maxlen), NULL TSRMLS_CC)
+PHPAPI void *_php_stream_get_line(php_stream *stream, int buf_type, zstr buf, 
size_t maxlen, size_t maxchars, size_t *returned_len TSRMLS_DC);
+#define php_stream_get_line(stream, buf, maxlen, retlen)   
_php_stream_get_line((stream), IS_STRING, ZSTR(buf), (maxlen), 0, (retlen) 
TSRMLS_CC)
+#define php_stream_get_line_ex(stream, buf_type, buf, maxlen, maxchars, 
retlen) \
+   
_php_stream_get_line((stream), 
(buf_type), ZSTR(buf), (maxlen), (maxchars), (retlen) TSRMLS_CC)
+#define php_stream_gets(stream, buf, maxlen)   
_php_stream_get_line((stream), IS_STRING, ZSTR(buf), (maxlen), 0, NULL 
TSRMLS_CC)
+#define php_stream_gets_ex(stream, buf_type, buf, maxlen, maxchars) \
+   
_php_stream_get_line((stream), 
(buf_type), ZSTR(buf), (maxlen), (maxchars), NULL TSRMLS_CC)
 
-#define php_stream_get_line(stream, buf, maxlen, retlen) 
_php_stream_get_line((stream), (buf), (maxlen), (retlen) TSRMLS_CC)
 PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t 
*returned_len, char *delim, size_t delim_len TSRMLS_DC);
 
 PHPAPI UChar *_php_stream_u_get_line(php_stream *stream, UChar *buf, int32_t 
*pmax_bytes, int32_t *pmax_chars, int *pis_unicode TSRMLS_DC);
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/streams.c?r1=1.101r2=1.102diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.101 
php-src/main/streams/streams.c:1.102
--- php-src/main/streams/streams.c:1.101Mon Mar 13 20:54:06 2006
+++ php-src/main/streams/streams.c  Tue Mar 14 21:15:05 2006
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.101 2006/03/13 20:54:06 pollita Exp $ */
+/* $Id: streams.c,v 1.102 2006/03/14 21:15:05 pollita Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -955,18 +955,25 @@
 
 /* If buf == NULL, the buffer will be allocated automatically and will be of an
  * appropriate length to hold the line, regardless of the line length, memory
- * permitting -- returned string will be up to (maxlen-1), last byte holding 
terminating NULL
- * Like php_stream_read(), this will treat unicode streams as ugly binary data 
(use with caution) */
-PHPAPI char *_php_stream_get_line(php_stream *stream, char *buf, size_t maxlen,
-   size_t *returned_len TSRMLS_DC)
+ * permitting -- returned string will be up to (maxlen-1) units of (maxchars) 
characters, last byte holding terminating NULL
+ * Like php_stream_read(), this will (UTODO) treat unicode streams as ugly 
binary data (use with caution) */
+PHPAPI void *_php_stream_get_line(php_stream *stream, int buf_type, zstr buf, 
size_t maxlen, size_t maxchars, size_t *returned_len TSRMLS_DC)
 {
size_t avail = 0;
size_t current_buf_size = 0;
size_t total_copied = 0;
int grow_mode = 0;
-   char *bufstart = buf;
+   int is_unicode = php_stream_reads_unicode(stream);
+   int split_surrogate = 0;
+   zstr bufstart = buf;
+
+   if ((buf_type == IS_STRING  is_unicode) ||
+   (buf_type == IS_UNICODE  !is_unicode)) {
+   /* UTODO: Allow 

[PHP-CVS] cvs: php-src /ext/standard file.c /main/streams streams.c

2006-03-14 Thread Sara Golemon
pollita Wed Mar 15 00:28:57 2006 UTC

  Modified files:  
/php-src/ext/standard   file.c 
/php-src/main/streams   streams.c 
  Log:
  Switch (zstr) casts to use ZSTR() macro.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.426r2=1.427diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.426 php-src/ext/standard/file.c:1.427
--- php-src/ext/standard/file.c:1.426   Tue Mar 14 21:15:05 2006
+++ php-src/ext/standard/file.c Wed Mar 15 00:28:57 2006
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.426 2006/03/14 21:15:05 pollita Exp $ */
+/* $Id: file.c,v 1.427 2006/03/15 00:28:57 pollita Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -749,7 +749,7 @@
s = target_buf;
e = target_buf + target_len;

-   if (!(p = php_stream_locate_eol(stream, (zstr)target_buf, 
target_len TSRMLS_CC))) {
+   if (!(p = php_stream_locate_eol(stream, ZSTR(target_buf), 
target_len TSRMLS_CC))) {
p = e;
goto parse_eol;
}
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/streams.c?r1=1.102r2=1.103diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.102 
php-src/main/streams/streams.c:1.103
--- php-src/main/streams/streams.c:1.102Tue Mar 14 21:15:05 2006
+++ php-src/main/streams/streams.c  Wed Mar 15 00:28:57 2006
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.102 2006/03/14 21:15:05 pollita Exp $ */
+/* $Id: streams.c,v 1.103 2006/03/15 00:28:57 pollita Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -1335,7 +1335,7 @@
int ret = 0;
 
if (stream-writefilters.head) {
-   _php_stream_write_filtered(stream, IS_STRING, (zstr)NULL, 0, 
closing ? PSFS_FLAG_FLUSH_CLOSE : PSFS_FLAG_FLUSH_INC  TSRMLS_CC);
+   _php_stream_write_filtered(stream, IS_STRING, ZSTR(NULL), 0, 
closing ? PSFS_FLAG_FLUSH_CLOSE : PSFS_FLAG_FLUSH_INC  TSRMLS_CC);
}
 
if (stream-ops-flush) {
@@ -1352,9 +1352,9 @@
}
 
if (stream-writefilters.head) {
-   return _php_stream_write_filtered(stream, IS_STRING, 
(zstr)((char*)buf), count, PSFS_FLAG_NORMAL TSRMLS_CC);
+   return _php_stream_write_filtered(stream, IS_STRING, 
ZSTR((void*)buf), count, PSFS_FLAG_NORMAL TSRMLS_CC);
} else {
-   return _php_stream_write_buffer(stream, IS_STRING, 
(zstr)((char*)buf), count TSRMLS_CC);
+   return _php_stream_write_buffer(stream, IS_STRING, 
ZSTR((void*)buf), count TSRMLS_CC);
}
 }
 
@@ -1367,9 +1367,9 @@
}
 
if (stream-writefilters.head) {
-   ret = _php_stream_write_filtered(stream, IS_UNICODE, 
(zstr)((UChar*)buf), count, PSFS_FLAG_NORMAL TSRMLS_CC);
+   ret = _php_stream_write_filtered(stream, IS_UNICODE, 
ZSTR((void*)buf), count, PSFS_FLAG_NORMAL TSRMLS_CC);
} else {
-   ret = _php_stream_write_buffer(stream, IS_UNICODE, 
(zstr)((UChar*)buf), count TSRMLS_CC);
+   ret = _php_stream_write_buffer(stream, IS_UNICODE, 
ZSTR((void*)buf), count TSRMLS_CC);
}
 
return ret;

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



Re: [PHP-CVS] cvs: php-src /ext/bz2 bz2_filter.c /ext/standard file.c filters.c streamsfuncs.c user_filters.c /ext/unicode unicode_filter.c /ext/zlib zlib_filter.c /main php_streams.h /main/strea

2006-03-14 Thread Sara Golemon
 make test stops work after this patch, because now fgets() always
returns
 FALSE.
 It is not possible for me to commit ZE patches without testing.
 Please fix this ASAP or revert your patches.

Sorry about that.  Should look good now (though of course there's still
stuff to be done with streams to make it ready).

-Sara

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