Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If the PHP memory limit is lower than recommended the Status report page (admin/reports/status) currently only directs you to the Requirements page (drupal.org/requirements). With the patch I attached the notice also displays a link to the handbook page on increasing you memory limit (drupal.org/node/207036). As this handbook page is quite useful and covers all different options for different types of users, this is to my mind a small but nice usability improvement.
Comment | File | Size | Author |
---|---|---|---|
#20 | check-memory-limit-343706-20.patch | 2.25 KB | drupal_was_my_past |
#16 | 343706_check_memory_limit[2].patch | 2.55 KB | tstoeckler |
#14 | 343706_check_memory_limit.patch | 2.53 KB | deviantintegral |
#8 | check_php_mem_limit_03.patch | 1 KB | tstoeckler |
#5 | check_php_mem_limit_03.patch | 1 KB | tstoeckler |
Comments
Comment #1
tstoecklerSorry, wrong status...
Comment #3
tstoecklerWrong range in the chunk of the patch. Hope this works...
Comment #5
tstoecklerOne last try.... (poor testbot, just because I can't roll a patch properly...)
Comment #6
tstoecklerYay!
Comment #8
tstoecklerretry...
Comment #9
lambic CreditAttribution: lambic commentedComment #10
deviantintegral CreditAttribution: deviantintegral commentedThis looks good to me. It's been suggested that a test for the memory limit requirement would be useful, but I think that could be handled in a subsequent patch. +1 committing #8.
Comment #11
roychri CreditAttribution: roychri commentedI had problems trying to test this.
The system.module contains the constant that defines what the minimum memory limit should be. It is currently set to 16M.
First I made my memory limit to 15M and tried installing drupal and the requirements verification did not complain about it.
The system_requirements() is considering the memory limit requirements to be a warning when it is not met.
I suspected that maybe the system would not care if only warnings were detected.
@deviantintegral confirmed that for me.
So, I tested this by upping the php version requirement to 5.9.0 (line 22 from system.module) in order to trigger an error from the install so I can see the warning.
This is working for me and I think this is rtbc.
Comment #12
deviantintegral CreditAttribution: deviantintegral commentedWhich makes me think... a new issue for throwing an error if the memory is < 16MB, a warning for 16.1-32, pass for 32+?
Comment #13
webchickI definitely like this change. But let's massage that string a little:
"See the Drupal requirements or the online handbook entry for increasing the PHP memory limit for more information."
1. I'd say the instructions for resolving the issue are way more important than Drupal's list of system requirements. I'd definitely put it first.
2. However, since the requirements list is about more than just the memory requirement, what if we moved the link to the requirements outside of this one error message to somewhere else in the installer error page that's more 'global'?
3. Then, we could shorten this string to something like "You need to increase PHP's memory limit in php.ini. Learn more" (make it consistent with other error messages on that screen).
Also, "@php_memory_limit-handbook" looks funny with the mixed dashes/underscores, and is also really long. The standard in core seems to be picking one-word descriptions for these placeholders. How about @requirements and @documentation, or just @url if we remove the requirements link?
Comment #14
deviantintegral CreditAttribution: deviantintegral commentedHere's an update that:
For more information, see the online handbook entry for <a href="@memory-limit">increasing the PHP memory limit</a>.
This text is very similar to the Cron error text.Before filing a support request, ensure that your web server meets <a href=\"@system-requirements\">Drupal's system requirements</a>.
to the top of the intro paragraph for the status page.Comment #15
cosmicdreams CreditAttribution: cosmicdreams commented#14: 343706_check_memory_limit.patch queued for re-testing.
Comment #16
tstoecklerI think I remember there was some kind of standard of Drupal not referring to itself, ie not calling itself "Drupal". I manually edited the patch file, which now contains the string:
Before filing a support request, ensure that your web server meets the <a href=\"@system-requirements\">system requirements</a>.
Otherwise, I'd say #14 is RTBC (didn't manually test it though. But if no tests fail, and the strings are good...)
Comment #18
deviantintegral CreditAttribution: deviantintegral commentedI'm pretty sure Drupal is fine to use in strings; currently it's used in over 100 strings.
Comment #19
yoroy CreditAttribution: yoroy commentedActually, it's discouraged to use Drupal, it complicates custom distributions, and well, the Drupal context is ususally a given.
Comment #20
drupal_was_my_past CreditAttribution: drupal_was_my_past commentedRe-rolled patch from #16.
Comment #21
drupal_was_my_past CreditAttribution: drupal_was_my_past commentedComment #22
deviantintegral CreditAttribution: deviantintegral commentedPatch in #20 looks good to me.
Comment #23
webchickCommitted and pushed to 8.x. Thanks!