You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* If max_memory_limit is not set to unlimited, verify change */
337
+
if (PG(max_memory_limit) !=-1) {
338
+
if (value==-1) {
339
+
zend_error(
340
+
E_WARNING,
341
+
"Failed to set memory_limit to unlimited. memory_limit (currently: "ZEND_LONG_FMT" bytes) cannot be set to unlimited if max_memory_limit ("ZEND_LONG_FMT" bytes) is not unlimited",
342
+
PG(memory_limit),
343
+
PG(max_memory_limit)
344
+
);
345
+
346
+
returnFAILURE;
347
+
}
348
+
349
+
if (value>PG(max_memory_limit)) {
350
+
zend_error(
351
+
E_WARNING,
352
+
"Failed to set memory_limit to %zd bytes. memory_limit (currently: "ZEND_LONG_FMT" bytes) cannot exceed max_memory_limit ("ZEND_LONG_FMT" bytes)",
353
+
value,
354
+
PG(memory_limit),
355
+
PG(max_memory_limit)
356
+
);
357
+
358
+
returnFAILURE;
359
+
}
360
+
}
361
+
335
362
if (zend_set_memory_limit(value) ==FAILURE) {
336
363
/* When the memory limit is reset to the original level during deactivation, we may be
337
364
* using more memory than the original limit while shutdown is still in progress.
Warning: Failed to set memory_limit to unlimited. memory_limit (currently: %d bytes) cannot be set to unlimited ifmax_memory_limit (%d bytes) is not unlimited in %s
0 commit comments