简体   繁体   English

服务器上传大小限制,但不是php.ini

[英]Server upload size limit but not php.ini

I use a Linux VPS server. 我使用Linux VPS服务器。 All sites have the same upload limit of 188KB. 所有网站的上传限制均为188KB。 On all wordpress sites if I upload an image over 188KB I get "Failed to write file to disk." 在所有wordpress网站上,如果我上传了超过188KB的图像,则会显示“无法将文件写入磁盘”。

I used a plugin to download images from external URLs and it just crops the image once it reaches the size of 188KB. 我使用了一个插件从外部URL下载图像,一旦图像达到188KB大小,它便会对其进行裁剪。

Both upload_max_filesize and post_max_size are set to 64M so it's not a php.ini problem. upload_max_filesizepost_max_size都设置为64M,因此这不是php.ini问题。

I have no idea where this limitation is coming from, any ideas? 我不知道这个限制来自哪里,有什么想法吗?

Is there anything else on server that can affect the upload file size, apart from php.ini? 除了php.ini之外,服务器上还有其他可能影响上传文件大小的内容吗? Notice that anything uploaded via ftp has no limit.. only when files are uploaded via sites directly. 请注意,仅当通过站点直接上传文件时,通过ftp上传的任何内容都没有限制。

Okay, so after some thinking and minor researching, I've found a few things: 好的,经过一番思考和较小的研究,我发现了一些东西:

Disk Full? 磁盘已满?
Make sure that your Disk has some space! 确保您的磁盘上有一些空间!

Correct File Permissions 正确的文件权限
You or someone else might have done something to the file permissions, or this could have been done by some application, to fix something like this, make sure that you have setup read, write and delete permissions on your WP-Content Folder. 您或其他人可能已对文件权限执行了某些操作,或者某些应用程序可能已执行此操作,以修复类似问题,请确保已对WP-Content文件夹设置了读取,写入和删除权限。

Clear temporary folder of the server 清除服务器的临时文件夹
Sometimes this issue occurs if the temporary directory where PHP stores the newly uploaded file is full. 如果PHP存储新上载文件的临时目录已满,有时会发生此问题。 Normally users don't have access to this temporary directory and that's why you will need to contact your web host and ask them to clear the temporary files in the server directory. 通常,用户无权访问此临时目录,因此,您需要联系您的虚拟主机,并要求他们清除服务器目录中的临时文件。 Contacting support of your host will help you here. 联系您的房东的支持将在这里为您提供帮助。

Other than these three, I was unable to find much else. 除了这三个之外,我找不到其他东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM