可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I have 2.24MB file size to upload to database, it displays
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.
Iam using WAMP server 2.2 with supported versions
Apache 2.2.21 PHP 5.3.8 MySQL 5.5.16
I made the following changes too
C:\wamp\bin\apache\apache2.2.6\bin\php.ini post_max_size = 750M upload_max_filesize = 750M max_execution_time = 5000 max_input_time = 5000 memory_limit = 1000M C:\wamp\bin\mysql\mysql5.0.45\my.ini: max_allowed_packet = 200M
Could anyone suggest me the option to upload large file.
回答1:
THIS IS WHAT U HAVE TO DO!
Go to c:\wamp\alias\phpmyadmin.conf
NOW set php_admin_value upload_max_filesize to 1024M
Bye!
回答2:
Your problem is that you modified the wrong PHP.ini file. It's WAMP trickery.
WAMP uses an annoying system where the actual .ini files aren't used - they are dynamically generated on startup. To modify the .ini
entries, you will actually need to left click on the WAMP icon, and select php.ini
from the context menu. It will default to notepad, make your changes and hit "Save" (Hitting "Save As" will generate a notepad error). Once you save it, then restart WAMP again.
This one got me too the first time I just went to the folder and tried to edit the file.
回答3:
There's another way to do it and you do not have to touch default settings at all.
You can use the option of httpd (apache server that is run underneath wamp) called aliases for individual needs and setup your directory structure as you like. For example here is how i have set up my wordpress with alias.
Configuration files are in:
.../wamp64/alias/
There you will probably find some files already, eg.adminer.conf
or phpmyadmin.conf
. So, simply create a new file and call it with .conf
extension eg wordpress.conf
and inside you can make your configurations, eg. for windows:
Alias /wordpress "c:/wamp64/www/wordpress/" Options Indexes FollowSymLinks AllowOverride all Require local Order Deny,Allow Deny from all Allow from localhost ::1 127.0.0.1 # Maximum allowed size for uploaded files PHP. # http://php.net/upload-max-filesize php_value upload_max_filesize 20M php_admin_value upload_max_filesize 128M `
The line with php_value upload_max_filesize 20M
is where you can set size for php and php_admin_value upload_max_filesize 128M
line is where you setup your preference for phpMyAdmin.
Thought I should just point out to this as an option instead of editing php.ini
file directly as that will make a system wide change and aliasing option can be selective.
回答4:
Go to C:\wamp64\bin\apache\apache2.4.23\bin (don t foreget to change the apache version if you'll copy paste) and edit upload_max_filesize to 20M or more and post_max_size to 20M or more in php.ini file. Mow restart wamp server(left click on wamp hidden icon and restart server) If you still have problems, try to edit php.ini from here too C:\wamp64\bin\php\php7.0.10 (change the php version if you'll copy paste) and restart the server again. Now it must work.