]> granicus.if.org Git - php/commitdiff
Fixed bug #36568 (memory_limit setting on win32 has no effect)
authorDmitry Stogov <dmitry@php.net>
Tue, 14 Mar 2006 14:19:00 +0000 (14:19 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 14 Mar 2006 14:19:00 +0000 (14:19 +0000)
NEWS
Zend/tests/bug36568.phpt [new file with mode: 0755]
Zend/zend.h
Zend/zend_config.w32.h
win32/build/config.w32.h.in

diff --git a/NEWS b/NEWS
index 9081fd70915cfaa8d4db172ece5a4a68b067ac3b..ac8aa97208303efa10f49337f013208f57234d20 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ PHP                                                                        NEWS
 - 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)
diff --git a/Zend/tests/bug36568.phpt b/Zend/tests/bug36568.phpt
new file mode 100755 (executable)
index 0000000..d621491
--- /dev/null
@@ -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
index d965cb4e137253fb6e4c594b429292ff83ab5cea..0a5a00491f94cb0000b348204a6495f0ce49ebb8 100644 (file)
@@ -91,7 +91,7 @@ const char *zend_mh_bundle_error(void);
 
 #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) */
index 236e99652f6beb350943fd4da74af7d1eed295b9..59a812c8361f80d093ed1dc796d36780b640843b 100644 (file)
@@ -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  |
@@ -23,8 +23,9 @@
 #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>
 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 @@ typedef unsigned int uint;
 #define ZEND_DLEXPORT          __declspec(dllexport)
 #define ZEND_DLIMPORT          __declspec(dllimport)
 
-/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT 
+/* 0x00200000L 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
index e251d96f53e7767d0e41ff9290cbce93523ed25a..512afe9177678e69b557db62ab6dbaf6d474777a 100644 (file)
 #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