Stackoverflow热门问题(二十四)-PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
如有翻译问题欢迎评论指出,谢谢。
PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
- novicePrgrmr asked:
- 我在本地XAMPP环境上传文件到WordPress时发生了错误:
- Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
- 即便将
upload_max_filesize
从2M改为1000M也没有解决。 - 有其他解决办法吗?
- Answers:
- Fluffeh - vote: 384
- 8388608B是8M,PHP的默认限制。更新php.ini的
post_max_size
成一个更大的值可以解决。 upload_max_filesize
设置用户能上传的单文件大小限制,post_max_size
则是表示一次POST上传的最大数据量。- 所以将
upload_max_filesize
设为1M,可以使得用户能上传的最大单文件大小变为1M,如果post_max_size
设为5,那么就能上传5个最大文件。 - 改变设置后需要重启服务器生效。
- 8388608B是8M,PHP的默认限制。更新php.ini的
- Altab Hossen - vote: 69
- 这样更改php.ini的设置即可:
upload_max_filesize = 1000M;
post_max_size = 1000M;
- Muhammad Tahseen Ur Rehman - vote: 32
- 1. 找到php.ini
- php.ini 文件在 C:\xampp\php 或者 xampp 文件夹。
- 2. 打开并改变php.ini的设置:
1. post-max-size (8M 改为 800M).
2. upload-max-filesize (2M 改为 2000M). - 3. 停止Apache和MySQL。
- 4. 重启Apache和MySQL
- 这样就解决了。
- 🙂
- 1. 找到php.ini
- Fluffeh - vote: 384
PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
- novicePrgrmr asked:
- I am getting this error when trying to upload an import on WordPress on my XAMPP local dev environment:
我在本地XAMPP环境上传文件到WordPress时发生了错误: - Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
- I changed the
upload_max_filesize
from2M
to1000M
, but that didn\'t seem to do anything.
即便将upload_max_filesize
从2M改为1000M也没有解决。 - Any ideas?
有其他解决办法吗?
- I am getting this error when trying to upload an import on WordPress on my XAMPP local dev environment:
- Answers:
- Fluffeh - vote: 384
- 8388608 bytes is 8M, the default limit in PHP. Update your
post_max_size
in php.ini to a larger value.
8388608B是8M,PHP的默认限制。更新php.ini的post_max_size
成一个更大的值可以解决。 upload_max_filesize
sets the max file size that a user can upload whilepost_max_size
sets the maximum amount of data that can be sent via a POST in a form.
upload_max_filesize
设置用户能上传的单文件大小限制,post_max_size
则是表示一次POST上传的最大数据量。- So you can set
upload_max_filesize
to 1 meg, which will mean that the biggest single file a user can upload is 1 megabyte, but they could upload 5 of them at once if thepost_max_size
was set to 5.
所以将upload_max_filesize
设为1M,可以使得用户能上传的最大单文件大小变为1M,如果post_max_size
设为5,那么就能上传5个最大文件。 - Changes will take effect after a restart of the server.
改变设置后需要重启服务器生效。
- 8388608 bytes is 8M, the default limit in PHP. Update your
- Altab Hossen - vote: 69
- Just set these in php.ini:
这样更改php.ini的设置即可: upload_max_filesize = 1000M;
post_max_size = 1000M;
- Just set these in php.ini:
- Muhammad Tahseen Ur Rehman - vote: 32
- 1. First u will find the php.ini file.
找到php.ini- u can find php.ini file from this path. C:\xampp\php or from xampp folder.
php.ini 文件在 C:\xampp\php 或者 xampp 文件夹。
- u can find php.ini file from this path. C:\xampp\php or from xampp folder.
- 2. Now open php.ini file and change the following:
打开并改变php.ini的设置:1. post-max-size (change 8M to 800M).
post-max-size (8M 改为 800M).
2. upload-max-filesize (change 2M to 2000M).
upload-max-filesize (2M 改为 2000M). - 3. Now stop the Apache server and MySQL.
停止Apache和MySQL。 - 4. Now restart Apache server and MySQL.
重启Apache和MySQL - It worked fine after that.
这样就解决了。 - Enjoy ur working now 🙂
🙂
- 1. First u will find the php.ini file.
- Fluffeh - vote: 384
共有 0 条评论