Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What about PHPCMS upload error 413?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

What about PHPCMS upload error 413? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

PHPCMS upload error 413, because the default limit of Nginx is 1m, so if you upload a file more than 1m, you will report a 413m error. The solution: find the "client_max_body_size" in the "nginx.conf" configuration and change it to 10m.

Apache server solution

Modify the LimitRequestBody configuration in the Apache configuration file. If it is a virtual host, please contact the space provider to help modify it.

Specific steps:

When uploading larger software in the apache environment, there is sometimes a 413 error. The reason for this error is due to the improper configuration of apache. Find the configuration file directory of apache, that is, the conf directory, and a directory parallel to this directory is called conf.d. Open the conf.d with a php.conf in it.

The contents of the directory are as follows:

# # PHP is an HTML-embedded scripting language which attempts to make it# easy for developers to write dynamically generated webpages.#LoadModule php4_module modules/libphp4.so## Cause the PHP interpreter handle files with a .php extension.#SetOutputFilter PHPSetInputFilter PHPLimitRequestBody 6550000## Add index.php to the list of files that will be served as directory# indexes.#DirectoryIndex index.php

The error occurs in this LimitRequestBody configuration. Just change this value to more than the size of your software.

If you do not have this profile, please set the

SetOutputFilter PHPSetInputFilter PHPLimitRequestBody 6550000

Just write it to the configuration file of apache.

After reading the above, have you mastered the method of PHPCMS upload error 413? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report