当前位置:网站首页>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 .
边栏推荐
- The consciousness of a programmer
- Records of ros2/dds/qos/ topics
- Paper notes: multi label learning ESMC (I don't understand it, but I haven't written it yet, so I'll put it here for a place temporarily)
- Use text analysis to identify the main gender in a text
- Wechat likes to pay attention to the solution of invalid automatic reply
- EL & JSTL (XIII)
- buuctf web
- 成功解决:selenium.common.exceptions.TimeoutException: Message: timeout: Timed out receiving message from
- 电脑的dwg文件怎么打开
- Web3 DApp用户体验最佳实践
猜你喜欢

Web3 DAPP user experience best practices

为什么SQL语句命中索引比不命中索引要快?

执行SQL响应比较慢,你有哪些排查思路?

《牛客刷verilog》Part I Verilog快速入门

台式电脑连不上wifi怎么办

绝了!自动点赞,我用 PyAutoGUI!

Code scanning payment flow chart of Alipay payment function developed by PHP

JS arguments

Successfully solved: selenium common. exceptions. TimeoutException: Message: timeout: Timed out receiving message from

Simple text analysis of malicious samples - Introduction
随机推荐
Kotlin compose perfect todo project surface rendering background and shadow
File upload vulnerability shooting range upload labs learning (pass1-pass5)
jsz中的join()
Method of opening data recovery of solid state disk
以太网是什么要怎么连接电脑
[esp32 learning path 6 - Flash encryption]
WPF uses Maui's self drawing logic
ASEMI三相整流桥的工作原理
执行SQL响应比较慢,你有哪些排查思路?
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
Use text analysis to identify the main gender in a text
《牛客刷verilog》Part I Verilog快速入门
【Keil】ADuCM4050官方库的GPIO输出宏定义
Virtual honeypot Honeyd installation and deployment
epplus复制模板后打印区域变小的问题
Concat() in JS
计算学生成绩等级(虚函数和多态)
Write shell script error summary
Vscode 设置clang-format
[Flink] problems and solutions of the continuous growth of checkpoint size in rocksdb incremental mode