无法增加文件上传大小WAMP [英] Can not increase file upload size WAMP
问题描述
我正在使用Wampserver(32位和PHP 5.5)2.5.里面的phpmyadmin允许我导入最大128mib的数据库,执行时间很短.
I am using Wampserver (32 bits & PHP 5.5) 2.5. phpmyadmin inside of it is allowing me to import database of max 128mib and execution time is low.
在WAMPServer 2.5中,可以在此文件\ wamp \ alias \ phpmyadmin.conf中找到应用于phpMyAdmin的PHP限制
In WAMPServer 2.5 the PHP limits applied to phpMyAdmin can be found in this file \wamp\alias\phpmyadmin.conf
问题是我不知道值插入.我想上传一个5GB的文件.我已经更改了相关文件中的值,并且该文件以及phpmyadmin中的值也已更改,但是当我导入5GB文件时,它在phpmyadmin上给了我以下错误.
The question is that i am unaware about the values insert. I want to upload a file of 5GB. I have changed the values in relevant file and values are also changed in that file as well as phpmyadmin but when i import my 5GB file it gave me following error on phpmyadmin.
您可能尝试上载了太大的文件.有关此限制的解决方法,请参阅文档."
有人可以帮我介绍我应该在以下参数中插入的参数值吗? 5GB文件,以便在沼泽中导入?
Can someone please help me about the parameters value that i should insert in below parameters for 5GB file to import in wamp???
php_admin_value upload_max_filesize **??**
php_admin_value post_max_size **??**
php_admin_value max_execution_time **??**
php_admin_value max_input_time **??**
推荐答案
使用如此大的数据库备份文件,使用MYSQL Console
还原该数据库将更加容易.它没有php脚本的大小和运行时限制.
With a database backup file that big it would be easier to use the MYSQL Console
to restore this database. It does not have any of the size and runtime limitations that a php script does.
使用系统托盘中的wampmanager图标执行此操作
Using the wampmanager icon in the system tray you do this
wampmanager -> MYSQL -> MYSQL Console
单击MYSQL Console
菜单,它将在命令窗口中运行mysql.exe
.
click the MYSQL Console
menu and it will run mysql.exe
in a command windows.
它将首先要求您输入root
密码,因此,如果您尚未更改MYSQL帐户密码,只需点击输入
It will challenge you for the root
password first, so if you have not changed that MYSQL accounts password just hit enter
如果您更改了root
密码,请输入密码,然后按 Enter
If you have changed the root
password enter the password and hit Enter
现在在mysql>
命令提示符下输入
Now at the mysql>
command prompt enter
source C:/path/to/your/backup.sql
并且mysql将运行恢复所需的时间,直到完成恢复为止
And mysql will run the restore for as long as it takes to complete the restore
如果必须使用phpMyAdmin,则需要修改正确的配置才能执行此操作.
If you must use phpMyAdmin then you will need to amend the correct configurations to do that.
phpMyAdmin别名为此目的包含了这些参数,并且当然会覆盖这些参数的标准php.ini
设置.毕竟,您不想修改php.ini
进行还原,您可能只会运行一次,并且会永久影响整个PHP环境.
The phpMyAdmin alias contains these parameters for this very purpose and of course will override the standard php.ini
setting of these parameters. Afterall you dont want to amend the php.ini
for a restore you will only run maybe once, and affect the whole PHP environment permanantly.
可以在\wamp\alias\phpmyadmin.conf
Alias /phpmyadmin "D:/wamp/apps/phpmyadmin4.7.0/"
<Directory "D:/wamp/apps/phpmyadmin4.7.0/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<ifDefine APACHE24>
Require local
</ifDefine>
<ifDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</ifDefine>
# To import big file you can increase values
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
您需要做的就是增加相关值,例如,您可以尝试这些
All you need to do is increase the relevant values, so for example you could try these
php_admin_value upload_max_filesize 5128M
php_admin_value post_max_size 5256M
php_admin_value max_execution_time 600
php_admin_value max_input_time 600
这篇关于无法增加文件上传大小WAMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!