Author Topic: cp sql error  (Read 3541 times)

0 Members and 1 Guest are viewing this topic.

Offline der moser

  • Pre-Newbie
  • Posts: 9
    • View Profile
cp sql error
« on: July 23, 2007, 12:34:46 AM »
opening the cp 'statistics' displays the following error, i presume its because of the db size (by now over 1.000 folders and nearly 38.000 pics)
Quote
Fatal error: Maximum execution time of 30 seconds exceeded in /is/htdocs/-xyz-/admin/admin_functions.php on line 661
running 1.7.4, any ideas anyone?

thx in advance...

beim aufrufen des cp erscheint unter 'statistik' seit einiger zeit nur noch dieser fehler, liegt wohl einfach an der größe der db (inzwischen über 1.000 ordner und knappe 38.000 bilder)
Quote
Fatal error: Maximum execution time of 30 seconds exceeded in /is/htdocs/-xyz-/admin/admin_functions.php on line 661
als system läuft die aktuelle 1.7.4, irgendjemand eine idee?

danke im vorraus...
« Last Edit: July 23, 2007, 12:45:14 AM by der moser »

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Re: cp sql error
« Reply #1 on: July 23, 2007, 09:54:23 AM »
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline der moser

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: cp sql error
« Reply #2 on: August 07, 2007, 01:32:53 AM »
excuse my late answer but for all others having the same prob: v@no's second advice really did it -

Quote
2) if your server is on linux and SAFE MODE is off (or atleast if you can use exec() function, then you can try modify get_dir_size() function in admin_functions.php so instead calculating directory size by scanning each file one-by-one, you can execute a server side command that returns the directory size much faster. So you  can try this:
find:

Code: [Select]
$size = 0;
Insert above:

Code: [Select]
  $size = explode(" ", @exec("du -csb \"".$dir."\""));
  $size = $size[0];
  return $size;


...so thx for the fast and helpful answer and sorry for not finding this out on my own. i searched quite a while but haven't thought this to be the answer to my probs ;)