The best approach for quick debugging and efficiently fixing downloads of large image files

Consider the normal PHP image loading functionality (without using AJAX), and this problem occurs with large image loading, sometimes less often on one test server and more often on another test server. Assuming that the debugger has not yet started debugging the problem, and there are no problems with the resolution of the file / folder, how to proceed?

I'm sure I have file_uploadson. I do not want to just blindly set some safe values ​​or increase the values ​​until they work. Basically, I want the values ​​to be exactly the same as in my respective modules. I am ready to override the settings in my respective modules if this is the best approach.

According to the settings related to downloading files , these are all relevant / related settings -
  * file_uploads
  * upload_max_filesize
  * max_input_time
  * memory_limit
  * max_execution_time
  *post_max_size

  • Finding parameters / values ​​for the appropriate script -
    So that I can find out which one / how many of them are actually broken by my script and cause a crash, I need to first find the appropriate values ​​for my script. How to find the following values ​​for my script:

    • Total size of downloaded files
    • Input time
    • Memory usage
    • Script runtime
    • Size of published data

    Which tool can be used for the same. Using PHP code, I think I can find out a few:

    • Script runtime is the difference between microtime(true)a script's start and end.
    • - Foreach $_FILES, ['size']

    , , ..?

  • /
    , (-), , / . ? , memory_limit .. htaccess PHP . , . ?


  • , , , ? ? , ( , - script, ) ?

  • _limit
    memory_limit, ,

    , , , , , , .

?

,
Sandeepan

+3
1

:

, ( ) : 100 x 100, 100 x 200, 100 x 300.... . - , . error_reporting() (, - ), , .

, - , , $_FILES. script "" . , , script ( - -).

, , , , .

, "". , - , , . , - .

, (, resizer) , memory_limit , . a .htaccess.

+1

Source: https://habr.com/ru/post/1770257/


All Articles