无法增加文件上传大小 WAMP [英] Can not increase file upload size WAMP

查看:20
本文介绍了无法增加文件上传大小 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 中,适用于 phpMyAdmin 的 PHP 限制可以在此文件 wampaliasphpmyadmin.conf 中找到

In WAMPServer 2.5 the PHP limits applied to phpMyAdmin can be found in this file wampaliasphpmyadmin.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文件的以下参数中插入的参数值以导入wamp吗???

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 帐户密码,只需点击 enter

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.

phpMyAdmin 配置可以在 wampaliasphpmyadmin.conf

The phpMyAdmin config can be found in wampaliasphpmyadmin.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆