当前位置:网站首页>Apache+php uploading large files
Apache+php uploading large files
2022-06-25 04:51:00 【Oglie's magic slippers~】
apache+php Upload big files
There are two restrictions on uploading large files ,
1 yes php.ini The limitation of , This is easy to understand
2 yes apache The limitation of ,apahce The default setting has a file size limit , You need to customize the configuration to override
1.php.ini Set up
Basic conditions for uploading files :
The size of the uploaded file <= upload_max_filesize < post_max_size < memory_limit
post_max_size
Control in use POST Method to submit a form PHP The maximum amount of data that can be received . If you want to use PHP File upload function , You need to change this value to the ratio upload_max_filesize Be big
max_input_time
Pass... In seconds POST、GET as well as PUT To limit the time of receiving data . If the application is running in a low-speed chain , You need to increase this value to accommodate the more time required to receive data
memory_limit
In order to avoid running scripts using a lot of available system memory ,PHP Allow defining memory usage quotas . adopt memory_limit Variable to specify the maximum amount of memory that a single script program can use memory_limit The value of should be appropriately greater than post_max_size Value
max_execution_time
max_execution_time Set before the script is forced to terminate PHP Waiting for the script to finish , This time is measured in seconds . This variable is very useful when the script enters an infinite loop state . However , When there is a legal activity that takes a long time to complete ( For example, uploading large files ), This feature also causes the operation to fail . In this case, you must consider increasing the value of this variable
2.apache Set up
open Apache Of httpd.conf The configuration file , Add the following parameter settings to this file .
MaxRequestLen 10240000
I'm going to set it to zero 10M, Than PHP Upload the default maximum value slightly larger . You can do it according to your needs , Adjust the value of this parameter , Note that this parameter is in bytes .
10240000 = 10M
Restart after the configuration is complete Apache that will do .
边栏推荐
猜你喜欢

Simple text analysis of malicious samples - Introduction

《QDebug 2022年6月》

In Net 6 using dotnet format formatting code

本轮压力测试下,DeFi协议们表现如何?

JS' sort() function

jsz中的join()

buuctf(pwn)

Virtual honeypot Honeyd installation and deployment

"Daily practice, happy water" 1108 IP address invalidation

Qdebug June 2022
随机推荐
Vscade setting clang format
great! Auto like, I use pyautogui!
Upgrade PHP to php7 The impact of X (I). The problem of session retention. Keep login
Which programming language is the most cumbersome to implement Hello world?
Heavy broadcast | phase shift method + mathematical principle derivation of multi frequency heterodyne + implementation
OpenSea PHP开发包
ORA-00800: soft external error
Triangle class (construction and deconstruction)
基于SSH实现的学生成绩管理系统
Google Earth Engine(GEE)——全球JRC/GSW1_1/YearlyHistory数据集的批量下载(中国区域)
Part I Verilog quick start
为什么TCP握手刚刚好是3次呢?
How do the defi protocols perform under this round of stress test?
Sleep more, you can lose weight. According to the latest research from the University of Chicago, sleeping more than 1 hour a day is equivalent to eating less than one fried chicken leg
DMA double buffer mode of stm32
小白一键重装官网下载使用方法
ASEMI三相整流桥的工作原理
Kotlin compose listens to the soft keyboard and clicks enter to submit the event
JDBC (IV)
Qdebug June 2022