[wp-trac] [WordPress Trac] #11726: wp-admin/users.php crashes on sites with large number of subscribers

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 7 13:19:24 UTC 2010


#11726: wp-admin/users.php crashes on sites with large number of subscribers
--------------------------+-------------------------------------------------
 Reporter:  prettyboymp   |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:  2.9.1     
 Severity:  major         |    Keywords:            
--------------------------+-------------------------------------------------
Changes (by prettyboymp):

  * keywords:  reporter-feedback =>


Comment:

 I've run into this on my dev machine and on the live server before the
 config was modified to up the memory limit.  Locally I'm running PHP
 v5.2.11.

 While looking at this more, I realized that the actual user list being
 display is retrieved using WP_User_Search{}.  get_users_of_blog() is only
 being used to display the roles:


 {{{
 $role_links = array();
 $avail_roles = array();
 $users_of_blog = get_users_of_blog();
 $total_users = count( $users_of_blog );
 foreach ( (array) $users_of_blog as $b_user ) {
         $b_roles = unserialize($b_user->meta_value);
         foreach ( (array) $b_roles as $b_role => $val ) {
                 if ( !isset($avail_roles[$b_role]) )
                         $avail_roles[$b_role] = 0;
                 $avail_roles[$b_role]++;
         }
 }
 unset($users_of_blog);
 }}}

 get_users_of_blog() should probably be deprecated in favor of
 WP_User_Search{} and places that need to get all users should probably
 switch to using WP_User_Search{} set limits to the amount of users in
 memory at once.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11726#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list