Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: usrmgr.php Hangs up! Why?  (Read 3442 times)

0 Members and 1 Guest are viewing this topic.

kurt

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
usrmgr.php Hangs up! Why?
« on: November 15, 2004, 01:44:56 pm »

I got now ovar 6000 users in my database.
When I click on usermgr.php the script hangs up.

I figured out the this part of the script is to havy for the server:

   # $sql = "SELECT user_id, user_name, UNIX_TIMESTAMP(user_regdate) as user_regdate, UNIX_TIMESTAMP(user_lastvisit) as user_lastvisit, user_active, ".
   #        "COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_name, group_quota ".
   #        "FROM {$CONFIG['TABLE_USERS']} AS u ".
   #        "INNER JOIN {$CONFIG['TABLE_USERGROUPS']} AS g ON user_group = group_id ".
   #        "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.owner_id = u.user_id ".
   #        "GROUP BY user_id ".
   #        "ORDER BY " . $sort_codes[$sort] . " ".
   #        "LIMIT $lower_limit, $user_per_page;";


Any help or update?
« Last Edit: November 15, 2004, 03:03:21 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: usrmgr.php Hangs up! Why?
« Reply #1 on: November 15, 2004, 02:08:37 pm »

Can you verify you have an index on user_id on your users table ?
Logged

kurt

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: usrmgr.php Hangs up! Why?
« Reply #2 on: November 15, 2004, 02:17:59 pm »

user_id is underlined in phpMyAdin. PRIMERY_KEY is user_id.

Hope that is what you wanted to know.

I have changed user_id from INT(11) to bigint(20). Was that the mistake?
Logged

Nibbler

  • Guest
Re: usrmgr.php Hangs up! Why?
« Reply #3 on: November 15, 2004, 02:23:15 pm »

I dont know, but seems pretty pointless unless you are expecting more than 2 billion users to sign up for your gallery.

Add an index using

Code: [Select]
ALTER TABLE CPG_pictures ADD INDEX owner_id( `owner_id` );
where CPG_ is your tablename prefix as set on install.
Logged

kurt

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: usrmgr.php Hangs up! Why?
« Reply #4 on: November 15, 2004, 02:44:55 pm »

--> ALTER TABLE cpg132_pictures ADD INDEX owner_id( `owner_id` )

SQL Error Message: Allready exists 'owern_id'
I change BIGINT(20) back into to INT(11).

But it still hangsup. I think that maybe the SQL statement is wrong, or the result is to big, or it take too much time for this query, so an server time out comes.
Logged

kurt

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: usrmgr.php Hangs up! Why?
« Reply #5 on: November 15, 2004, 02:53:30 pm »

OK !!! EXCELLENT!!!

I create a new Index over the user_id on *_users
and one over *_pictures on ownerid!!!

Now it runs!

VERY GOOD SUPPORT HERE!!! THANKS A LOT!
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 19 queries.