Open ybbluesky opened 6 years ago
It mainly depends on your configuration. please check :
https://github.com/seblucas/cops/blob/master/config_default.php#L66-L73
If this configuration item is empty then please check your php.ini to be sure that php can use that much memory.
If you're using X-Accel-Redirect
or X-Sendfile
then there will be no limit other than your webserver.
I checked on my main COPS library and downloading a 100Mb file works perfectly (None larger available).
I can downloading a 100Mb file works perfectly ,but if large more 200M,can not down,the config_default.php is OK,and my php.ini is OK
Did you check you php log ? Did you enable cops_update_epub-metadata, if yes, can you check if disabling it fixes the problem ?
i use xampp,i have other website in xampp,it can dowm over 200M file but in cops,the book more than 200M can not down,the cops_update_epub-metadata is no,thanks
I found that the default php5.6 default settings are the problem causing large files not to download. I was able to adjust the values in the php.ini file (you may find multiple php.ini files) I use a Synology server: Upload_max_filesize = 2000M Max_input_time = 1000 Memory_limit = 4000M Max_execution_time = 133000 Post_max_size = 2000M Default_output_buffering = Off File_uploads = On Default_socket_timeout = 300
I found these values by trial and error. Memory_limit seems to be the most important value to allow the larger book file downloads, eg Audiobooks over 300MB. Keep track of php.ini default setting in case you have a problem. Server needs a restart to effect the php.ini new settings. Good luck!
I was having the same sort of issue with my COPS installation (could not download a 154mb file).
NOTE: 1 The exact parameters you use for solving this issue depend on the configuration of your Web Server. Specifically, how much memory is allocated to the server. Use your judgement and a little common sense.
My Solution: Modify php.ini (below are the parameters I used to fix the upload limit problem)
Upload_max_filesize - 299 M Max_input_time - 150 Memory_limit - 512M Max_execution_time - 180 Post_max_size - 299 M
NOTE 2: For reference, my web server running COPS is a CenOS 7 vm with NGINX and PHP 7.3. Ram allocated to the VM is 2048mb. This is dynamically allocated with 512mb minimum and 4096mb maximum.
Hope this helps others.
do some people have the same question?