[英]"You probably tried to upload a file that is too large." when trying to import a database file to myphpadmin (Windows 10)
I am trying to run a PHP website (Prestashop 1.4) locally using XAMPP.我正在尝试使用 XAMPP 在本地运行 PHP 网站(Prestashop 1.4)。 I copied all the data from public_html and put it in htdocs.
我从 public_html 复制了所有数据并将其放入 htdocs。
When I tried to use phpmyadmin to import the database, it said that the file was too large.当我尝试使用phpmyadmin导入数据库时,它说文件太大。 I went to the ini file and changed
我去了ini文件并更改
myisam_sort_buffer_size = 8M
myisam_sort_buffer_size = 8M
to到
myisam_sort_buffer_size = 1500M
myisam_sort_buffer_size = 1500M
I tried to import the file again, and it said :我再次尝试导入文件,它说:
You probably tried to upload a file that is too large.
您可能尝试上传过大的文件。 Please refer to documentation for a workaround for this limit.
有关此限制的解决方法,请参阅文档。
Is there another way to bypass that limit?还有其他方法可以绕过该限制吗? Thanks in advance.
提前致谢。
If you are using MySQL
in Xampp
then do the steps below.如果您在
Xampp
中使用MySQL
,请执行以下步骤。
Find the following in php.ini
file在
php.ini
文件中找到以下内容
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
And change their sizes according to your need.并根据您的需要更改它们的大小。 I'm using these values
我正在使用这些值
post_max_size = 30M
upload_max_filesize = 30M
max_execution_time = 4500
max_input_time = 4500
memory_limit = 850M
Note:1 upload_max_filesize
is essential But it's better to change all.注意:1
upload_max_filesize
是必不可少的,但最好全部更改。
Note:2 You must restart apache service.注意:2您必须重新启动 apache 服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.