• Resolved lapinzed

    (@lapinzed)


    Hello,
    First, thanks a lot for your work! Amazing plugin:-)

    My problem : If I enable stats in fileaway option, when I trie to download a large file from my server (~2500Mo), the download popup is very slow to appear or worse, nothing happend and apache.log said:

    “PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0”
    and
    ” PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 121110528 bytes) in /var/www/wordpress/wp-content/plugins/file-away/lib/cls/class.fileaway_downloader.php on line 40″

    I tried to change memory_limit in php.ini but it’s not working..

    With stats disabled, the download start immedatly and work fine.
    How can I fix that?
    (Fileaway version 3.8.4)
    Thx

    https://ww.wp.xz.cn/plugins/file-away/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author thomstark

    (@thomstark)

    Do you have a cache plugin installed, like WP Total Cache?

    Plugin Author thomstark

    (@thomstark)

    Try this for me. Navigate to

    wp-content/plugins/file-away/lib/cls/class.fileaway_downloader.php

    Go to line 40, and change this:

    print(fread($file, 1024*8));

    to this:

    print(fread($file, $size));

    See if that clears up the second Fatal Error at least.

    Thread Starter lapinzed

    (@lapinzed)

    No cache plugin installed

    same result with print(fread($file, $size));

    Plugin Author thomstark

    (@thomstark)

    Exact same error message?

    Plugin Author thomstark

    (@thomstark)

    It’s possible that some other plugin is initiating output buffering. Maybe try deactivating your plugins. Other than that, the other bet is it’s a limitation on your server by your host. Are you using php.ini single? If not, it’s possible you have more than one php.ini file and the one you changed isn’t the right one. That’s been the issue many times for other users.

    Thread Starter lapinzed

    (@lapinzed)

    No, no more “PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0”
    But still:
    PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 2915643515 bytes) in /var/www/wordpress/wp-content/plugins/file-away/lib/cls/class.fileaway_downloader.php on line 40

    Plugin Author thomstark

    (@thomstark)

    Right. See, the error is telling you that server’s allowed memory size is smaller than the file. The error message is saying that your allowed memory size is exactly 1GB, but your file is 2.7GB.

    Plugin Author thomstark

    (@thomstark)

    If you’re wondering why it downloads with stats off, it’s because with stats off, the client is requesting the file from the server. With stats on, the server is pushing the file to the client. Which means the server has to read the file first. Same would be the case if encryption were enabled.

    Thread Starter lapinzed

    (@lapinzed)

    Ok I see.
    So I have to change memory_limit in php.ini, but when I did that, my server memory is full until the download starts. Or it crashes .. There is nothing to do against this if I want to keep the stats ?

    Plugin Author thomstark

    (@thomstark)

    Have you tried disabling your other plugins? My download function flushes the memory before sending the file to the client. Something else is taking up your memory, or you have an issue with your server. I’d recommend asking your web host about this.

    Thread Starter lapinzed

    (@lapinzed)

    Yes I tried with all others plugins disabled. And it’s my own server working on ubuntu 13.10 and apache 2.4.6.
    Then I’ll look elsewhere and I ‘ll let you know.
    Thank you for your help!!

    Plugin Author thomstark

    (@thomstark)

    Yeah, please let me know what you find out, if anything.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Download problem with stats enabled’ is closed to new replies.