1
Cuidiu
Admin Find Users
  • 2007/1/29 16:30

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Does anyone happen to know why I only get a total of 50 users per page when I do a search for users even though I've specified more per page? Is this simply a limitation of the XOOPS version, MySQL or PHP version or what? Why put a limit of 50? Not really complaining as much as I am curious as to why the limit.

Thanks,

Cuidiu
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

2
vaughan
Re: Admin Find Users
  • 2007/1/29 16:36

  • vaughan

  • Friend of XOOPS

  • Posts: 680

  • Since: 2005/11/26


some server settings on shared hosts only set a php memory limit of 8M.

8M is extremely low by todays standards, and results in memory exhausted error in PHP under certain conditions such as when find users is used..

3
Cuidiu
Re: Admin Find Users
  • 2007/1/29 17:18

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Thanks for the reply vaughan. That would make sense except I can run at least 100 users per page when it comes to xm-memberstats and 200+ with profile search so I'm not sure the server memory is the issue.

Running PHP info it shows memory_limit 18388608. Is that the memory you're referring to?
Quote:

vaughan wrote:
some server settings on shared hosts only set a php memory limit of 8M.

8M is extremely low by todays standards, and results in memory exhausted error in PHP under certain conditions such as when find users is used..
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

4
Cuidiu
SOLVED Re: Admin Find Users
  • 2007/3/22 21:49

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I solved this issue and it has been such a time saver for me. In case anyone else wants to know, this is what I did.

** Back up your file first - proceed at your own risk **
For XOOPS verson 2.2.4

Edit file: /modules/system/admin/findusers/main.php

Do a search for the word: limit
On or around line 78 you will see the following:
$limit_text = new XoopsFormText(_AM_LIMIT, "limit", 6, 2);

Change the number 2 to 3

Find this code on or around line 224:
$limit = (!empty($_POST['limit'])) ? intval($_POST['limit']) : 50;
if ( $limit == 0 || $limit > 50 ) {
$limit = 50;

Change 50 to the desired number. I assume it depends on how well your server handles these calls. I changed 50 to 200 in all three places because I have 190 users so that works well for me. The "limit users per page" option seems to work fine as well.

Are there any repercussions to modifying the number? I have no idea. I wish someone would tell me but unfortunately, I can only guess. So if you decide to adjust your limit, please do so with caution, at your own risk and only after first backing up main.php. Good luck.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

Login

Who's Online

269 user(s) are online (81 user(s) are browsing Support Forums)


Members: 0


Guests: 269


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits