You probably tried to upload too large file. Please refer to documentation for ways to workaround th
来源:互联网 发布:2g手机怎么用4g网络 编辑:程序博客网 时间:2024/06/06 09:43
如果你的在使用mysql数据库的导入sql文件功能时出现这个错:You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit,
Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 169801888 bytes) in Unknown on line 0
那么我就可以帮到你了。
以上错误出现的原因是,在php的配置文件php.ini里面已经定义了上传文件的大小不得超过2M,只要找到这个文件(如果你找不到,麻烦你用"搜索"的功能,不要问我在哪里能找到,因为不同的php环境放在不同的地方),在相应的地方把限制修改大一些就可以了,以下是方法:
1、打开php.ini。找到 upload_max_filesize 、 memory_limit 、 post_max_size 这三个参数!
(在默认的情况下,php只允许最大的上传数据为2M,也就是2048KB,而极限的最大使用内存memory_limit也仅为128M,Post的最大也为2M)
2、按您的服务器的实际性能配置进行如下改动:(注意:以下是按我的服务器性能和硬件配置进行的更改..)
upload_max_filesize = 8M (上传最大极限设定为8M,这个应该足够一般的文件WEB上传了)
memory_limit = 512M (因为服务器的内存为2GB,所以这里加到512M不过份吧,呵)
post_max_size = 8M (Post数据最大也设置为8MB,这个跟upload_max一样)
3、改完之后,我重新启动系统,再重新执行导入命令后:
Import has been successfully finished, 399 queries executed.
(显示导入成功,有多少个请求处理成功…)
(备注:改完后当你在到phpMyadmin的导入命令行时,虽然(有时候可能会仍然显示为:最大限制:2048KB/Max: 2,048KiB);但实际上你已经可以导入不超过8M的MySQL数据库.sql导出的备份文件了! 另,改完php.ini后,别忘了重启一下web服务或者是服务器哟!重启后升效!)
- You probably tried to upload too large file. Please refer to documentation for ways to workaround th
- You probably tried to upload too large file. Please refer to documentation for ways to workaround th
- You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.
- mysql导入数据库的时候提示:You probably tried to upload too large file. Please refer to documentation for ways
- You probably tried to upload too large file.
- mysql导入大小受限制You probably tried to upload too large file.解决!
- mysql导入数据库文件最大限制更改解决方法:phpmyadmin数据库导入出错:You probably tried to upload too large file
- Security error. You probably don't have enough permissions to upload. Please check your server
- Trac 不能登陆:Authentication information not available. Please refer to the installation documentation
- The download file appears to be corrupted. Please refer to the Troubleshooting section of the Insta
- Shareplex -- Verified config file too large to display
- Enable VT-x in your BIOS security settings (refer to documentation for your computer)
- Enable VT-x in your BIOS security settings (refer to documentation for your computer)
- JDK安装错误_The download file appears to be corrupted. Please refer
- Ubantu安装JDK错误The download file appears to be corrupted. Please refer...
- How to Upload Large Files in PHP
- 解决文件图片等上传DebugFilesKeyError: You tried to access the file "file" in the request
- Conflicting collector combinations in option list; please refer to the release notes for the combina
- underscore学习笔记—对象函数/Objects(一)
- 正则表达式 会员注册 验证
- 斐波那契数列算法分析
- assign()
- Pro Android学习笔记(八十):服务(5):访问远程服务
- You probably tried to upload too large file. Please refer to documentation for ways to workaround th
- oracle中去重复记录 不用distinct
- Android_APP级异常捕获实现方式
- 2014网易运营工程师笔试题
- Python高级编程技巧
- 照相机的成像原理,镜头和单反相机的认识
- XStream使用教程
- Spring管理Hibernate的批量保存
- 棋牌游戏运营分析