Hi,

for example, i need to sort topics alphabetically on the private band forum - there's a list of song to be sorted.

i've almost finished the desired extension, will publish it soon..

P

2

(117 replies, posted in Supported extensions)

khurrammunawar wrote:

hi friends
i m using punbb 1.4.2 and pun attachment latest extension 1.1.19

now the problem is when i attach the file with the post it upload pefectly according to the size. i mean there is no issue in uploading the file. but when i download it. it size become 0 kb.

please help.

hi, how big is your file? i've just discovered a bug in pun_attachment / php (mine is v 5.2.17) by accident - download handling is done by fpassthru - in older versions of php, this function stores whole file in memory. Memory limit is usually set on low values on common webhosts (8 - 32 MB) so downloading bigger files leads to php memory limit exceed error.

here's a first aid that worked for me:

1) open ./cache/cache_hooks.php
2) find text "fpassthru" and comment that line (add "//" on beginning)
3) after that line, insert this code:

while(!feof($fp)){
    echo fread($fp, 524288);
    flush();
    ob_flush();
}

this code will set the buffer size to 512 kiB

hope this helps