[PHP-CVS] cvs: CVSROOT / avail

2006-02-19 Thread Derick Rethans
derick  Mon Feb 20 07:32:52 2006 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Ulf Wendel is going to focus on MySQL in PHP.
  - Removed superfluous entries for georg (he has access to the full tree
already).
  
  
http://cvs.php.net/viewcvs.cgi/CVSROOT/avail?r1=1.1092&r2=1.1093&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1092 CVSROOT/avail:1.1093
--- CVSROOT/avail:1.1092Sat Feb 18 04:15:09 2006
+++ CVSROOT/avail   Mon Feb 20 07:32:52 2006
@@ -179,8 +179,6 @@
 avail|musone,chagenbu|php-src/ext/mcal
 avail|derick|php-src/ext/mcrypt
 avail|fmk|php-src/ext/mssql
-avail|georg|php-src/ext/mysql
-avail|georg,nicos|php-src/ext/mysqli
 avail|asautins,dbenson,maxim,ray,abonamous,ldixon|php-src/ext/oci8
 avail|kara,fmk,sschadt,nicos|php-src/ext/odbc
 avail|venaas|php-src/ext/openssl
@@ -279,7 +277,7 @@
 avail|luckec|pear/HTTP_SessionServer,pear/Services_Ebay,pear/Date_Holidays
 avail|jystewart|pear/Services_Technorati,pear/XML_Feed_Parser
 avail|msmarcal|pear/Image_Barcode
-avail|uw|pecl/maxdb
+avail|uw|pecl/maxdb,php-src/ext/mysqli,php-src/ext/mysql,phpdoc
 avail|magnus,michael|Zend/tests,ZendEngine2/tests
 avail|michael|php-src/tests
 avail|blindman|pecl/colorer

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



[PHP-CVS] cvs: php-src /ext/hash package.xml

2006-02-19 Thread Michael Wallner
mikeSun Feb 19 23:53:06 2006 UTC

  Modified files:  
/php-src/ext/hash   package.xml 
  Log:
  - changelog
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/hash/package.xml?r1=1.17&r2=1.18&diff_format=u
Index: php-src/ext/hash/package.xml
diff -u php-src/ext/hash/package.xml:1.17 php-src/ext/hash/package.xml:1.18
--- php-src/ext/hash/package.xml:1.17   Wed Dec  7 19:51:38 2005
+++ php-src/ext/hash/package.xmlSun Feb 19 23:53:06 2006
@@ -21,11 +21,11 @@
   
 
   
-   1.1
+   1.2
stable
-   2005-12-00
+   2006-02-00

-Fixed PECL bug #6183 - haval source file entries missing in package.xml
+Fixed tiger algorithm generating wrong results on big endian platforms.
 
 Supported Algorithms:
  * md4, md5

-- 
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

2006-02-19 Thread Michael Wallner
mikeSun Feb 19 23:50:46 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
  Log:
  BFN: fixed ext/hash/tiger on big endian platforms
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.419&r2=1.2027.2.420&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.419 php-src/NEWS:1.2027.2.420
--- php-src/NEWS:1.2027.2.419   Sat Feb 18 17:11:06 2006
+++ php-src/NEWSSun Feb 19 23:50:46 2006
@@ -22,6 +22,8 @@
 - Added ReflectionClass::newInstanceArgs($args). (Marcus)
 - Added imap_savebody() that allows message body to be written to a file.
   (Mike)
+- Fixed tiger hash algorithm generating wrong results on big endian platforms.
+  (Mike)
 - Fixed bug #36436 (DBA problem with Berkeley DB4). (Marcus)
 - Fixed bug #36420 (segfault when access result->num_rows after calling 
   result->close()). (Ilia)

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



[PHP-CVS] cvs: php-src /ext/hash config.m4 hash_tiger.c php_hash_types.h

2006-02-19 Thread Michael Wallner
mikeSun Feb 19 23:43:23 2006 UTC

  Modified files:  
/php-src/ext/hash   config.m4 hash_tiger.c php_hash_types.h 
  Log:
  MF51: fix tiger on big endian platforms
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/hash/config.m4?r1=1.10&r2=1.11&diff_format=u
Index: php-src/ext/hash/config.m4
diff -u php-src/ext/hash/config.m4:1.10 php-src/ext/hash/config.m4:1.11
--- php-src/ext/hash/config.m4:1.10 Sat Nov 26 13:15:06 2005
+++ php-src/ext/hash/config.m4  Sun Feb 19 23:43:23 2006
@@ -1,12 +1,14 @@
-dnl $Id: config.m4,v 1.10 2005/11/26 13:15:06 mike Exp $
+dnl $Id: config.m4,v 1.11 2006/02/19 23:43:23 mike Exp $
 dnl config.m4 for extension hash
 
 PHP_ARG_ENABLE(hash, whether to enable hash support,
-[  --enable-hash   Enable hash support])
+[  --disable-hash   Disable hash support], yes)
 
 if test "$PHP_HASH" != "no"; then
   AC_DEFINE(HAVE_HASH_EXT,1,[Have HASH Extension])
 
+  PHP_C_BIGENDIAN
+
   AC_CHECK_SIZEOF(short, 2)
   AC_CHECK_SIZEOF(int, 4)
   AC_CHECK_SIZEOF(long, 4)
http://cvs.php.net/viewcvs.cgi/php-src/ext/hash/hash_tiger.c?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/hash/hash_tiger.c
diff -u php-src/ext/hash/hash_tiger.c:1.5 php-src/ext/hash/hash_tiger.c:1.6
--- php-src/ext/hash/hash_tiger.c:1.5   Sun Jan  1 13:09:50 2006
+++ php-src/ext/hash/hash_tiger.c   Sun Feb 19 23:43:23 2006
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: hash_tiger.c,v 1.5 2006/01/01 13:09:50 sniper Exp $ */
+/* $Id: hash_tiger.c,v 1.6 2006/02/19 23:43:23 mike Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_tiger.h"
@@ -88,6 +88,24 @@
} \
feedforward
 
+#define split_ex(str) \
+   x0=str[0]; x1=str[1]; x2=str[2]; x3=str[3]; \
+   x4=str[4]; x5=str[5]; x6=str[6]; x7=str[7];
+#ifdef WORDS_BIGENDIAN
+#  define split(str) \
+   { \
+   int i; \
+   php_hash_uint64 tmp[8]; \
+\
+   for (i = 0; i < 64; ++i) { \
+   ((unsigned char *) tmp)[i^7] = ((unsigned char *) 
str)[i]; \
+   } \
+   split_ex(tmp); \
+   }
+#else
+#  define split split_ex
+#endif
+
 #define tiger_compress(passes, str, state) \
 { \
register php_hash_uint64 a, b, c, tmpa, x0, x1, x2, x3, x4, x5, x6, x7; 
\
@@ -98,8 +116,7 @@
b = state[1]; \
c = state[2]; \
\
-   x0=str[0]; x1=str[1]; x2=str[2]; x3=str[3]; \
-   x4=str[4]; x5=str[5]; x6=str[6]; x7=str[7]; \
+   split(str); \
\
compress(passes); \
\
@@ -118,7 +135,7 @@
memset(&context->buffer[context->length], 0, 
8-context->length%8);
context->length += 8-context->length%8;
}
-
+   
if (context->length > 56) {
memset(&context->buffer[context->length], 0, 64 - 
context->length);
tiger_compress(context->passes, ((php_hash_uint64 *) 
context->buffer), context->state);
@@ -126,8 +143,19 @@
} else {
memset(&context->buffer[context->length], 0, 56 - 
context->length);
}
-   
+
+#ifndef WORDS_BIGENDIAN
memcpy(&context->buffer[56], &context->passed, sizeof(php_hash_uint64));
+#else
+   context->buffer[56] = (unsigned char) (context->passed & 0xff);
+   context->buffer[57] = (unsigned char) ((context->passed >> 8) & 0xff);
+   context->buffer[58] = (unsigned char) ((context->passed >> 16) & 0xff);
+   context->buffer[59] = (unsigned char) ((context->passed >> 24) & 0xff);
+   context->buffer[60] = (unsigned char) ((context->passed >> 32) & 0xff);
+   context->buffer[61] = (unsigned char) ((context->passed >> 40) & 0xff);
+   context->buffer[62] = (unsigned char) ((context->passed >> 48) & 0xff);
+   context->buffer[63] = (unsigned char) ((context->passed >> 56) & 0xff);
+#endif
tiger_compress(context->passes, ((php_hash_uint64 *) context->buffer), 
context->state);
 }
 
@@ -165,11 +193,12 @@
}

for (; i + 64 <= len; i += 64) {
-   tiger_compress(context->passes, ((const php_hash_uint64 
*) (input + i)), context->state);
+   memcpy(context->buffer, &input[i], 64);
+   tiger_compress(context->passes, ((const php_hash_uint64 
*) context->buffer), context->state);
context->passed += 512;
}
-   
-   memcpy(context->buffer, input + i, r);
+   memset(&context->buffer[r], 0, 64-r);
+   memcpy(context->buffer, &input[i], r);
context->length = r;
}
 }
http://cvs.php.net/viewcvs.cgi/php-src/ext/hash/php_hash_types.h?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/hash/php_hash_types.h
diff -u php-src/ext/hash/php_hash_types.h:1.3 
php-src/ext/hash/php_hash_types.h:1.4
--- php-src/ext/hash/php_hash_types.h:1.3   

[PHP-CVS] cvs: php-src(PHP_5_1) /ext/hash config.m4 hash_tiger.c php_hash_types.h

2006-02-19 Thread Michael Wallner
mikeSun Feb 19 23:39:53 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/hash   config.m4 hash_tiger.c php_hash_types.h 
  Log:
  - fix tiger on big endian platforms
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/hash/config.m4?r1=1.10.2.3&r2=1.10.2.4&diff_format=u
Index: php-src/ext/hash/config.m4
diff -u php-src/ext/hash/config.m4:1.10.2.3 php-src/ext/hash/config.m4:1.10.2.4
--- php-src/ext/hash/config.m4:1.10.2.3 Fri Dec  2 02:18:54 2005
+++ php-src/ext/hash/config.m4  Sun Feb 19 23:39:53 2006
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.10.2.3 2005/12/02 02:18:54 iliaa Exp $
+dnl $Id: config.m4,v 1.10.2.4 2006/02/19 23:39:53 mike Exp $
 dnl config.m4 for extension hash
 
 PHP_ARG_ENABLE(hash, whether to enable hash support,
@@ -7,6 +7,8 @@
 if test "$PHP_HASH" != "no"; then
   AC_DEFINE(HAVE_HASH_EXT,1,[Have HASH Extension])
 
+  PHP_C_BIGENDIAN
+
   AC_CHECK_SIZEOF(short, 2)
   AC_CHECK_SIZEOF(int, 4)
   AC_CHECK_SIZEOF(long, 4)
http://cvs.php.net/viewcvs.cgi/php-src/ext/hash/hash_tiger.c?r1=1.4.2.3&r2=1.4.2.4&diff_format=u
Index: php-src/ext/hash/hash_tiger.c
diff -u php-src/ext/hash/hash_tiger.c:1.4.2.3 
php-src/ext/hash/hash_tiger.c:1.4.2.4
--- php-src/ext/hash/hash_tiger.c:1.4.2.3   Sun Jan  1 12:50:07 2006
+++ php-src/ext/hash/hash_tiger.c   Sun Feb 19 23:39:53 2006
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: hash_tiger.c,v 1.4.2.3 2006/01/01 12:50:07 sniper Exp $ */
+/* $Id: hash_tiger.c,v 1.4.2.4 2006/02/19 23:39:53 mike Exp $ */
 
 #include "php_hash.h"
 #include "php_hash_tiger.h"
@@ -88,6 +88,24 @@
} \
feedforward
 
+#define split_ex(str) \
+   x0=str[0]; x1=str[1]; x2=str[2]; x3=str[3]; \
+   x4=str[4]; x5=str[5]; x6=str[6]; x7=str[7];
+#ifdef WORDS_BIGENDIAN
+#  define split(str) \
+   { \
+   int i; \
+   php_hash_uint64 tmp[8]; \
+\
+   for (i = 0; i < 64; ++i) { \
+   ((unsigned char *) tmp)[i^7] = ((unsigned char *) 
str)[i]; \
+   } \
+   split_ex(tmp); \
+   }
+#else
+#  define split split_ex
+#endif
+
 #define tiger_compress(passes, str, state) \
 { \
register php_hash_uint64 a, b, c, tmpa, x0, x1, x2, x3, x4, x5, x6, x7; 
\
@@ -98,8 +116,7 @@
b = state[1]; \
c = state[2]; \
\
-   x0=str[0]; x1=str[1]; x2=str[2]; x3=str[3]; \
-   x4=str[4]; x5=str[5]; x6=str[6]; x7=str[7]; \
+   split(str); \
\
compress(passes); \
\
@@ -118,7 +135,7 @@
memset(&context->buffer[context->length], 0, 
8-context->length%8);
context->length += 8-context->length%8;
}
-
+   
if (context->length > 56) {
memset(&context->buffer[context->length], 0, 64 - 
context->length);
tiger_compress(context->passes, ((php_hash_uint64 *) 
context->buffer), context->state);
@@ -126,8 +143,19 @@
} else {
memset(&context->buffer[context->length], 0, 56 - 
context->length);
}
-   
+
+#ifndef WORDS_BIGENDIAN
memcpy(&context->buffer[56], &context->passed, sizeof(php_hash_uint64));
+#else
+   context->buffer[56] = (unsigned char) (context->passed & 0xff);
+   context->buffer[57] = (unsigned char) ((context->passed >> 8) & 0xff);
+   context->buffer[58] = (unsigned char) ((context->passed >> 16) & 0xff);
+   context->buffer[59] = (unsigned char) ((context->passed >> 24) & 0xff);
+   context->buffer[60] = (unsigned char) ((context->passed >> 32) & 0xff);
+   context->buffer[61] = (unsigned char) ((context->passed >> 40) & 0xff);
+   context->buffer[62] = (unsigned char) ((context->passed >> 48) & 0xff);
+   context->buffer[63] = (unsigned char) ((context->passed >> 56) & 0xff);
+#endif
tiger_compress(context->passes, ((php_hash_uint64 *) context->buffer), 
context->state);
 }
 
@@ -165,11 +193,12 @@
}

for (; i + 64 <= len; i += 64) {
-   tiger_compress(context->passes, ((const php_hash_uint64 
*) (input + i)), context->state);
+   memcpy(context->buffer, &input[i], 64);
+   tiger_compress(context->passes, ((const php_hash_uint64 
*) context->buffer), context->state);
context->passed += 512;
}
-   
-   memcpy(context->buffer, input + i, r);
+   memset(&context->buffer[r], 0, 64-r);
+   memcpy(context->buffer, &input[i], r);
context->length = r;
}
 }
http://cvs.php.net/viewcvs.cgi/php-src/ext/hash/php_hash_types.h?r1=1.2.2.3&r2=1.2.2.4&diff_format=u
Index: php-src/ext/hash/php_hash_types.h
diff -u php-src/ext/hash/php_hash_types.h:1.2.2.3 
php-src/ext/hash/php_hash_types.h:1.2.2.4
--- php-src/ext/hash/php_hash_types.h:1.2.2.3   Sun Jan 

[PHP-CVS] cvs: php-src /ext/dba/libflatfile flatfile.c /ext/dba/libinifile inifile.c /ext/dbase dbase.c /ext/filepro filepro.c /ext/standard/tests/file bug22414.phpt

2006-02-19 Thread Ilia Alshanetsky
iliaa   Sun Feb 19 18:20:51 2006 UTC

  Modified files:  
/php-src/ext/dbase  dbase.c 
/php-src/ext/dba/libinifile inifile.c 
/php-src/ext/dba/libflatfileflatfile.c 
/php-src/ext/fileprofilepro.c 
/php-src/ext/standard/tests/filebug22414.phpt 
  Log:
  More safe_mode nuking
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/dbase/dbase.c?r1=1.77&r2=1.78&diff_format=u
Index: php-src/ext/dbase/dbase.c
diff -u php-src/ext/dbase/dbase.c:1.77 php-src/ext/dbase/dbase.c:1.78
--- php-src/ext/dbase/dbase.c:1.77  Sun Feb 19 00:55:19 2006
+++ php-src/ext/dbase/dbase.c   Sun Feb 19 18:20:51 2006
@@ -16,14 +16,13 @@
+--+
  */
 
-/* $Id: dbase.c,v 1.77 2006/02/19 00:55:19 andi Exp $ */
+/* $Id: dbase.c,v 1.78 2006/02/19 18:20:51 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include "php.h"
-#include "safe_mode.h"
 #include "fopen_wrappers.h"
 #include "php_globals.h"
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/dba/libinifile/inifile.c?r1=1.15&r2=1.16&diff_format=u
Index: php-src/ext/dba/libinifile/inifile.c
diff -u php-src/ext/dba/libinifile/inifile.c:1.15 
php-src/ext/dba/libinifile/inifile.c:1.16
--- php-src/ext/dba/libinifile/inifile.c:1.15   Sun Jan  1 13:09:49 2006
+++ php-src/ext/dba/libinifile/inifile.cSun Feb 19 18:20:51 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: inifile.c,v 1.15 2006/01/01 13:09:49 sniper Exp $ */
+/* $Id: inifile.c,v 1.16 2006/02/19 18:20:51 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -24,7 +24,6 @@
 
 #include "php.h"
 #include "php_globals.h"
-#include "safe_mode.h"
 
 #include 
 #include 
@@ -43,7 +42,7 @@
 /* {{{ inifile_version */
 char *inifile_version() 
 {
-   return "1.0, $Revision: 1.15 $";
+   return "1.0, $Revision: 1.16 $";
 }
 /* }}} */ 
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/dba/libflatfile/flatfile.c?r1=1.15&r2=1.16&diff_format=u
Index: php-src/ext/dba/libflatfile/flatfile.c
diff -u php-src/ext/dba/libflatfile/flatfile.c:1.15 
php-src/ext/dba/libflatfile/flatfile.c:1.16
--- php-src/ext/dba/libflatfile/flatfile.c:1.15 Sun Jan  1 13:09:49 2006
+++ php-src/ext/dba/libflatfile/flatfile.c  Sun Feb 19 18:20:51 2006
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: flatfile.c,v 1.15 2006/01/01 13:09:49 sniper Exp $ */
+/* $Id: flatfile.c,v 1.16 2006/02/19 18:20:51 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -27,7 +27,6 @@
 
 #include "php.h"
 #include "php_globals.h"
-#include "safe_mode.h"
 
 #include 
 #include 
@@ -307,7 +306,7 @@
 /* {{{ flatfile_version */
 char *flatfile_version() 
 {
-   return "1.0, $Revision: 1.15 $";
+   return "1.0, $Revision: 1.16 $";
 }
 /* }}} */ 
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/filepro/filepro.c?r1=1.60&r2=1.61&diff_format=u
Index: php-src/ext/filepro/filepro.c
diff -u php-src/ext/filepro/filepro.c:1.60 php-src/ext/filepro/filepro.c:1.61
--- php-src/ext/filepro/filepro.c:1.60  Sun Feb 19 00:55:19 2006
+++ php-src/ext/filepro/filepro.c   Sun Feb 19 18:20:51 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: filepro.c,v 1.60 2006/02/19 00:55:19 andi Exp $ */
+/* $Id: filepro.c,v 1.61 2006/02/19 18:20:51 iliaa Exp $ */
 
 /*
   filePro 4.x support developed by Chad Robinson, [EMAIL PROTECTED]
@@ -31,7 +31,6 @@
 #endif
 
 #include "php.h"
-#include "safe_mode.h"
 #include "fopen_wrappers.h"
 #include 
 #if HAVE_SYS_PARAM_H
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/file/bug22414.phpt?r1=1.10&r2=1.11&diff_format=u
Index: php-src/ext/standard/tests/file/bug22414.phpt
diff -u php-src/ext/standard/tests/file/bug22414.phpt:1.10 
php-src/ext/standard/tests/file/bug22414.phpt:1.11
--- php-src/ext/standard/tests/file/bug22414.phpt:1.10  Fri Oct 24 03:31:54 2003
+++ php-src/ext/standard/tests/file/bug22414.phpt   Sun Feb 19 18:20:51 2006
@@ -1,7 +1,6 @@
 --TEST--
 Bug #22414 (passthru() does not read data correctly)
 --INI--
-safe_mode=
 output_handler=
 --FILE--
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c dl.c exec.c file.c filestat.c head.c link.c mail.c pack.c proc_open.c var_unserializer.c

2006-02-19 Thread Ilia Alshanetsky
iliaa   Sun Feb 19 18:19:34 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c dl.c exec.c file.c 
filestat.c head.c link.c mail.c pack.c 
proc_open.c var_unserializer.c 
  Log:
  Nuke safe_mode
  
  http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.752&r2=1.753&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.752 
php-src/ext/standard/basic_functions.c:1.753
--- php-src/ext/standard/basic_functions.c:1.752Sun Feb 19 04:29:41 2006
+++ php-src/ext/standard/basic_functions.c  Sun Feb 19 18:19:33 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.752 2006/02/19 04:29:41 andi Exp $ */
+/* $Id: basic_functions.c,v 1.753 2006/02/19 18:19:33 iliaa Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -82,8 +82,6 @@
 #include 
 #endif
 
-#include "safe_mode.h"
-
 #ifdef PHP_WIN32
 # include "win32/unistd.h"
 #endif
@@ -851,42 +849,6 @@
{NULL, NULL, NULL}
 };
 
-
-static PHP_INI_MH(OnUpdateSafeModeProtectedEnvVars)
-{
-   char *protected_vars, *protected_var;
-   char *token_buf;
-   int dummy = 1;
-
-   protected_vars = estrndup(new_value, new_value_length);
-   zend_hash_clean(&BG(sm_protected_env_vars));
-
-   protected_var = php_strtok_r(protected_vars, ", ", &token_buf);
-   while (protected_var) {
-   zend_hash_update(&BG(sm_protected_env_vars), protected_var, 
strlen(protected_var), &dummy, sizeof(int), NULL);
-   protected_var = php_strtok_r(NULL, ", ", &token_buf);
-   }
-   efree(protected_vars);
-   return SUCCESS;
-}
-
-
-static PHP_INI_MH(OnUpdateSafeModeAllowedEnvVars)
-{
-   if (BG(sm_allowed_env_vars)) {
-   free(BG(sm_allowed_env_vars));
-   }
-   BG(sm_allowed_env_vars) = zend_strndup(new_value, new_value_length);
-   return SUCCESS;
-}
-
-
-PHP_INI_BEGIN()
-   PHP_INI_ENTRY_EX("safe_mode_protected_env_vars", 
SAFE_MODE_PROTECTED_ENV_VARS, PHP_INI_SYSTEM, OnUpdateSafeModeProtectedEnvVars, 
NULL)
-   PHP_INI_ENTRY_EX("safe_mode_allowed_env_vars",   
SAFE_MODE_ALLOWED_ENV_VARS,   PHP_INI_SYSTEM, OnUpdateSafeModeAllowedEnvVars,   
NULL)
-PHP_INI_END()
-
-
 zend_module_entry basic_functions_module = {
 STANDARD_MODULE_HEADER,
"standard", /* extension name */
@@ -1070,8 +1032,6 @@
test_class_startup();
 #endif
 
-   REGISTER_INI_ENTRIES();
-
register_phpinfo_constants(INIT_FUNC_ARGS_PASSTHRU);
register_html_constants(INIT_FUNC_ARGS_PASSTHRU);
register_string_constants(INIT_FUNC_ARGS_PASSTHRU);
@@ -1453,38 +1413,6 @@
}
pe.key_len = strlen(pe.key);
 
-   if (PG(safe_mode)) {
-   /* Check the protected list */
-   if (zend_hash_exists(&BG(sm_protected_env_vars), 
pe.key, pe.key_len)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Safe Mode warning: Cannot override protected environment variable '%s'", 
pe.key);
-   efree(pe.putenv_string);
-   efree(pe.key);
-   RETURN_FALSE;
-   }
-
-   /* Check the allowed list */
-   if (BG(sm_allowed_env_vars) && 
*BG(sm_allowed_env_vars)) {
-   char *allowed_env_vars = 
estrdup(BG(sm_allowed_env_vars));
-   char *allowed_prefix = strtok(allowed_env_vars, 
", ");
-   zend_bool allowed = 0;
-
-   while (allowed_prefix) {
-   if (!strncmp(allowed_prefix, pe.key, 
strlen(allowed_prefix))) {
-   allowed = 1;
-   break;
-   }
-   allowed_prefix = strtok(NULL, ", ");
-   }
-   efree(allowed_env_vars);
-   if (!allowed) {
-   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Safe Mode warning: Cannot set environment variable '%s' - it's not 
in the allowed list", pe.key);
-   efree(pe.putenv_string);
-   efree(pe.key);
-   RETURN_FALSE;
-   }
-   }
-   }
-
zend_hash_del(&BG(putenv_ht), pe.key, pe.key_len+1);
 
/* find previous value */
@@ -2690,16 +2618,6 @@
}
}   

-   /* che

[PHP-CVS] cvs: php-src /tests/classes abstract_user_call.phpt

2006-02-19 Thread Marcus Boerger
helly   Sun Feb 19 12:18:28 2006 UTC

  Added files: 
/php-src/tests/classes  abstract_user_call.phpt 
  Log:
  - Add new function
  

http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/abstract_user_call.phpt?view=markup&rev=1.1
Index: php-src/tests/classes/abstract_user_call.phpt
+++ php-src/tests/classes/abstract_user_call.phpt
--TEST--
ZE2 An abstrcat method cannot be called indirectly
--FILE--
func();

call_user_func(array($o, 'test_base::func'));

?>
===DONE===
--EXPECTF--
test::func()

Fatal error: Cannot call abstract method test_base::func() in %s on line %d

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



[PHP-CVS] cvs: php-src /tests/classes abstract_static.phpt ZendEngine2 zend_API.c zend_compile.c

2006-02-19 Thread Marcus Boerger
helly   Sun Feb 19 11:55:11 2006 UTC

  Modified files:  
/ZendEngine2zend_compile.c zend_API.c 
/php-src/tests/classes  abstract_static.phpt 
  Log:
  - Interfaces may have static methods to enforce their existance in
implementing classes
  
  
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_compile.c?r1=1.680&r2=1.681&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.680 ZendEngine2/zend_compile.c:1.681
--- ZendEngine2/zend_compile.c:1.680Sun Feb 19 11:42:30 2006
+++ ZendEngine2/zend_compile.c  Sun Feb 19 11:55:11 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.c,v 1.680 2006/02/19 11:42:30 helly Exp $ */
+/* $Id: zend_compile.c,v 1.681 2006/02/19 11:55:11 helly Exp $ */
 
 #include 
 #include "zend.h"
@@ -1108,7 +1108,7 @@
} else {
fn_flags = 0;
}
-   if ((fn_flags & ZEND_ACC_STATIC) && (fn_flags & ZEND_ACC_ABSTRACT)) {
+   if ((fn_flags & ZEND_ACC_STATIC) && (fn_flags & ZEND_ACC_ABSTRACT) && 
!(CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE)) {
zend_error(E_COMPILE_ERROR, "Static function %v%s%R() cannot be 
abstract", is_method ? CG(active_class_entry)->name : "", is_method ? "::" : 
"", Z_TYPE(function_name->u.constant), Z_UNIVAL(function_name->u.constant));
}
 
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.c?r1=1.341&r2=1.342&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.341 ZendEngine2/zend_API.c:1.342
--- ZendEngine2/zend_API.c:1.341Sun Feb 19 11:42:30 2006
+++ ZendEngine2/zend_API.c  Sun Feb 19 11:55:11 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: zend_API.c,v 1.341 2006/02/19 11:42:30 helly Exp $ */
+/* $Id: zend_API.c,v 1.342 2006/02/19 11:55:11 helly Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -2081,7 +2081,7 @@
scope->ce_flags |= 
ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
}
}
-   if (ptr->flags & ZEND_ACC_STATIC) {
+   if (ptr->flags & ZEND_ACC_STATIC && (!scope || 
(scope->ce_flags & ZEND_ACC_INTERFACE))) {
zend_error(error_type, "Static function 
%s%s%s() cannot be abstract", scope ? scope->name : "", scope ? "::" : "", 
ptr->fname);
}
} else {
http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/abstract_static.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/tests/classes/abstract_static.phpt
diff -u php-src/tests/classes/abstract_static.phpt:1.3 
php-src/tests/classes/abstract_static.phpt:1.4
--- php-src/tests/classes/abstract_static.phpt:1.3  Sat Aug  9 14:48:47 2003
+++ php-src/tests/classes/abstract_static.phpt  Sun Feb 19 11:55:11 2006
@@ -1,21 +1,29 @@
 --TEST--
-ZE2 A static abstrcat method may not be called
---SKIPIF--
-
+ZE2 A static abstrcat methods
 --FILE--
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php