Can not increase file upload size WAMP

后端 未结 4 1471
被撕碎了的回忆
被撕碎了的回忆 2020-12-06 06:50

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.

In WAMPServer

4条回答
  •  醉酒成梦
    2020-12-06 07:13

    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.

    Using the wampmanager icon in the system tray you do this

    wampmanager -> MYSQL -> MYSQL Console
    

    click the MYSQL Console menu and it will run mysql.exe in a command windows.

    It will challenge you for the root password first, so if you have not changed that MYSQL accounts password just hit enter

    If you have changed the root password enter the password and hit Enter

    Now at the mysql> command prompt enter

    source C:/path/to/your/backup.sql
    

    And mysql will run the restore for as long as it takes to complete the restore


    If you must use phpMyAdmin then you will need to amend the correct configurations to do that.

    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.

    The phpMyAdmin config can be found in \wamp\alias\phpmyadmin.conf

    Alias /phpmyadmin "D:/wamp/apps/phpmyadmin4.7.0/"
    
    
        Options Indexes FollowSymLinks MultiViews
      AllowOverride all
      
            Require local
        
        
            Order Deny,Allow
            Deny from all
            Allow from localhost ::1 127.0.0.1
        
    
    # 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
    
    

    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
    

提交回复
热议问题