User Tools

Site Tools


informatica:servidor_internet_2009

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
informatica:servidor_internet_2009 [2022/11/07 15:48]
miquel [La grandària màxima per pujar fitxers ha disminuït - Novembre de 2022]
informatica:servidor_internet_2009 [2022/11/28 15:11] (current)
miquel [La grandària màxima per pujar fitxers ha disminuït - Novembre de 2022]
Line 121: Line 121:
   * [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896083]]   * [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896083]]
  
-===== La grandària màxima per pujar fitxers ha disminuït - Novembre de 2022 =====+===== La grandària màxima permesa pels fitxers a penjar ha disminuït - Novembre de 2022 =====
  
 Dilluns 2022-11-07, la Míriam indica que no pot pujar fitxers ZIP d'uns 40 MB i que només pot pujar fitxers de mida petita. Dilluns 2022-11-07, la Míriam indica que no pot pujar fitxers ZIP d'uns 40 MB i que només pot pujar fitxers de mida petita.
Line 153: Line 153:
 </code> </code>
  
-Els he canviat a totes les versions, tenint present les instruccions al [[https://www.php.net/manual/en/ini.core.php#ini.post-max-size | manual,]] i, després de reiniciar el servidor, el límit torna a ser de 2 GB (ho he comprovat):+He canviat els paràmetres rellevants a totes les versions, tenint present les instruccions al manual (veure referències) i, després de reiniciar el servidor, el límit torna a ser de 2 GB (FIXME ho he comprovat): 
 + 
 +<WRAP info> 
 +The ''MAX_FILE_SIZE'' item cannot specify a file size greater than the file size that has been set in the ''upload_max_filesize'' in the ''php.ini'' file. The default is 2 megabytes. 
 + 
 +If a memory limit is enabled, a larger ''memory_limit'' may be needed. Make sure you set ''memory_limit'' large enough. 
 + 
 +If ''max_execution_time'' is set too small, script execution may be exceeded by the value. Make sure you set ''max_execution_time'' large enough. 
 + 
 +Note: ''max_execution_time'' only affects the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using ''system()'', the ''sleep()'' function, database queries, time taken by the file upload process, etc. is not included when determining the maximum time that the script has been running.  
 + 
 +Warning: ''max_input_time'' sets the maximum time, in seconds, the script is allowed to receive input; this includes file uploads. For large or multiple files, or users on slower connections, the default of 60 seconds may be exceeded. 
 + 
 +If ''post_max_size'' is set too small, large files cannot be uploaded. Make sure you set ''post_max_size'' large enough. 
 + 
 +''post_max_size int'' must be larger than ''upload_max_filesize''
 + 
 +</WRAP>
  
 <code> <code>
 # grep -e "memory_limit" -e "upload_max_filesize" -e "post_max_size" /etc/php/*/apache2/php.ini # grep -e "memory_limit" -e "upload_max_filesize" -e "post_max_size" /etc/php/*/apache2/php.ini
-/etc/php/5.6/apache2/php.ini:post_max_size = 2500M +/etc/php/5.6/apache2/php.ini:memory_limit = 256M 
-/etc/php/5.6/apache2/php.ini:upload_max_filesize = 2600M +/etc/php/5.6/apache2/php.ini:post_max_size = 2150M 
-/etc/php/7.3/apache2/php.ini:post_max_size = 2500M +/etc/php/5.6/apache2/php.ini:upload_max_filesize = 2060M 
-/etc/php/7.3/apache2/php.ini:upload_max_filesize = 2600M + 
-/etc/php/8.1/apache2/php.ini:post_max_size = 2500M +/etc/php/7.3/apache2/php.ini:memory_limit = 128M 
-/etc/php/8.1/apache2/php.ini:upload_max_filesize = 2600M+/etc/php/7.3/apache2/php.ini:post_max_size = 2150M 
 +/etc/php/7.3/apache2/php.ini:upload_max_filesize = 2060M 
 + 
 +/etc/php/8.1/apache2/php.ini:memory_limit = 128M 
 +/etc/php/8.1/apache2/php.ini:post_max_size = 2150M 
 +/etc/php/8.1/apache2/php.ini:upload_max_filesize = 2060M 
 +</code> 
 + 
 +i en el fitxer de configuració d'Apache ''/etc/apache2/sites-enabled/sermn_uab_cat-3-https.conf'' afegeixo 
 + 
 +<code apache> 
 +#### File upload limit set to 2200 MBytes 
 +LimitRequestBody 2306867200
 </code> </code>
  
 Faig unes proves amb fitxers de diverses mides i veig que: Faig unes proves amb fitxers de diverses mides i veig que:
  
-  * un fitxer de 200 MB es transfereix en aprox. 20 segons +  * un fitxer de 200 MB es transfereix en aprox. 22 segons 
-  * un fitxer de 1024 MB (1 GB) es transfereix en aprox. xx segons +  * un fitxer de 400 MB es transfereix en aprox. 48 segons 
-  * un fitxer de 2048 MB (2 GB) es transfereix en aprox. xx segons+  * un fitxer de 600 MB es transfereix en aprox. 1:17 minuts 
 +  * un fitxer de 800 MB es transfereix en aprox. 1:50 minuts 
 +  * un fitxer de 1024 MB (1 GB) es transfereix en aprox. 2:10 minuts 
 +  * un fitxer de 2048 MB (2 GB) es transfereix en aprox. 4:13 minuts 
 + 
 +==== Referències ==== 
 + 
 +  * [[https://kinsta.com/knowledgebase/the-uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini/ | How to Fix the uploaded file exceeds the upload_max_filesize directive in php.ini Error.]] 
 +    * [[https://www.php.net/manual/en/ini.core.php#ini.post-max-size | PHP Manual - post_max_size]] 
 +    * [[https://www.php.net/manual/en/features.file-upload.common-pitfalls.php | PHP Manual - Common Pitfalls]] 
 +  * [[https://support.cpanel.net/hc/en-us/articles/6994682816023-Requested-content-length-is-larger-than-the-configured-limit-of-1073741824-Apache-2-4-54-413-error-code- | Requested content-length is larger than the configured limit of 1073741824 ( Apache 2.4.54 , 413 error code ) – cPanel]] 
 +    * [[https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestbody | limitrequestbody - core - Apache HTTP Server Version 2.4.]] 
  
  
  
informatica/servidor_internet_2009.1667832498.txt.gz · Last modified: 2022/11/07 15:48 by miquel