[wp-trac] [WordPress Trac] #14889: Memory Comparison Broken / WordPress Memory Limit

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 2 22:21:45 UTC 2011

#14889: Memory Comparison Broken / WordPress Memory Limit
 Reporter:  hakre                |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  General              |     Version:  3.0
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.2-early  |

Comment (by hakre):

 Thanks for providing an additional patch, the test code and your efforts
 in benchmarking it.

 I could quickly review your patch. Even I did work on this ticket and
 reviewed the case multiple times I do not fully remember whether ini_get
 does return the shorthand notation or the expanded value in bytes and if
 so that one or other would be the case on every time, version and system

 Next to that, I think both cases (WP:"1G" as INT 1 < PHP:"1024M" as INT
 1024) and (WP:"2048M" as (int) 2048 > PHP:"4G" as (int) 4) need to be
 dealt with.

 The way how to deal with those two cases is not specified in documentation
 so far. The current behavior is, that the memory_limit setting is only
 updated/set to when it is _assumed_ (I call it assumption as that part of
 the process is broken) that the PHP configuration is lower then the
 WordPress configuration value.

 If I read your patch right, you assume that the configuration value is
 returned as an integer number of bytes in any case. I can't say so.

Ticket URL: <http://core.trac.wordpress.org/ticket/14889#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list