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

How to solve the problem of phpcms file upload failure

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Editor to share with you how to solve the failure of phpcms file upload, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The reasons are as follows:

First, the incorrect configuration parameters of the server php.

In the php.ini configuration file, if the parameters such as upload_max_filesize and post_max_size are not set properly, it may limit the maximum size of the file you can upload, resulting in an exception if the upload fails. The symptoms are often small files, pictures and other uploads are normal, but large files will fail.

The solution is also very simple: find the php.ini in the server and set all the parameter values related to upload to reasonable values.

1. Modify the configuration of phpcms backend

Phpcms backend-site settings-modify-attachment settings-allow attachment size, enter a value such as 10240. (this value can be the size you want.)

2. Modify php.ini file configuration

(1) Open the php configuration file php.ini to search for upload_max_filesize, and change the value of this to 10240. (as above, the value can be changed as needed)

(2) continue searching for post_max_size in php.ini and change the value of this to 30000. (the maximum limit for form submission, this is not to limit the size of the uploaded file, but to limit the data submitted by the entire form. )

Note: make sure that post_max_size > = upload_max_filesize, that is, the former must be greater than the latter. Be sure to restart the Web service after modification. Be sure to restart it.

2. Upload failure caused by file read and write permissions

Ensure read and write permissions for the uploadfile directory.

Third, the secondary development of the background php program results in an error in the upload return value, which cannot be correctly parsed by the swfupload plug-in.

You can see if there is an exception by the response value in firebug.

Fourth, the right to upload due to the expiration of membership rights or session session.

The above are all the contents of how to solve the problem of phpcms file upload failure. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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