Home >CMS Tutorial >PHPCMS >What to do if phpcms upload login fails
Solution to phpcms upload login failure: first enter the phpcms background; then open "Allow attachment size" and enter the value; then open the php configuration file "php.ini" and search for "upload_max_filesize"; final modification Its parameter value is enough.
What to do if the phpcms file upload fails
The reasons are as follows:
1. Caused by incorrect configuration parameters of the server PHP.
In the php.ini configuration file, if the upload_max_filesize and post_max_size parameter values are set improperly, it may limit the upper limit of the file size you can upload, causing the upload to fail and return an exception. Symptoms are often that small files, pictures, etc. can be uploaded normally, but large files will fail.
The solution is also very simple. Find the php.ini in the server and set all the parameters related to uploading to reasonable values.
1. Modify phpcms background configuration
phpcms background--site settings--modify--attachment settings--allow attachment size, enter The value is 10240. (This value can be the size you want)
2. Modify the php.ini file configuration
(1) Open the php configuration Search the file php.ini for upload_max_filesize and change this value to 10240. (As above, the value can be changed as needed)
(2) Continue to search for post_max_size in php.ini and change this value to 30000. (The maximum limit for form submission. This item does not limit the size of a single uploaded file, but limits the data submitted by the entire form.)
Note: Be sure to ensure 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. Must restart.
2. Upload failure caused by file read and write permissions
Make sure the uploadfile directory has read and write permissions.
3. The secondary development of the background PHP program resulted in an incorrect upload return value, which could not be correctly parsed by the swfupload plug-in.
You can observe whether there are abnormalities through the response value in firebug.
4. No permission to upload due to expired membership rights or session.
Recommended: "phpcms tutorial"
The above is the detailed content of What to do if phpcms upload login fails. For more information, please follow other related articles on the PHP Chinese website!