I don't know why you are using 4x times quota because of 4k blocks. I had to fix this manually after each Kloxo update...
Proper code is as follows:
// Issue #680 - Too high inode count in Kloxo quota - set 0 that unlimited
// $inode = $disk * 500;
// $inode = 0;
if ($disk === 0) {
// MR -- that meaning 'unlimited'
$totalblock = 0;
$totalinode = 5000000;
} else {
// MR -- assume 1GB space = 1.000.000 KB / 4 KB = 250.000 blocksize
// where blocksize = 4KB -> inode = 25.000
// So, make set $totalblock = $inode * 10
if ($inode === 0) {
$totalinode = (int) (($disk / 100) + 1);
} else {
$totalinode = (int) $inode;
}
$perblock = 1;
$totalblock = $disk / $perblock;
}
lxshell_return("setquota", "-u", $username, $totalblock, $totalblock, $totalinode, $totalinode, "-a");
}