WAMP Uploading large File

后端 未结 5 1030
Happy的楠姐
Happy的楠姐 2020-12-05 16:43

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 s

相关标签:
5条回答
  • 2020-12-05 17:10

    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/"
    
    <Directory "c:/wamp64/www/wordpress/">
        Options Indexes FollowSymLinks
        AllowOverride all
      <IfDefine APACHE24>
        Require local
      </IfDefine>
      <IfDefine !APACHE24>
        Order Deny,Allow
          Deny from all
          Allow from localhost ::1 127.0.0.1
        </IfDefine>
    
        # 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
    
    </Directory>`
    

    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.

    0 讨论(0)
  • 2020-12-05 17:11

    You Should change all files that starts with php in below folders. For e.g. php.ini, php.ini-development, php.ini-production etc.

    C:/wamp/bin/{Apache Folder and PHP Folder}
    

    Change upload_max_filesize and then restart your Apache server.

    0 讨论(0)
  • 2020-12-05 17:13

    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!

    0 讨论(0)
  • 2020-12-05 17:13

    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.

    0 讨论(0)
  • 2020-12-05 17:18

    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.

    0 讨论(0)
提交回复
热议问题