Digital Ocean- File size exceeding In PHPMyadmin Resolved
I was working on migrating the scripts from one server to another on the digital ocean. And, After creating a droplet — When I started the process of importing files, I got an error in importing database files to PHPMyAdmin.
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.
It seems there is an issue with the configuration and you need to check for the following parameters in the php.ini file.
max_execution_time = 5000max_input_time = 5000memory_limit = 1000Mpost_max_size = 750Mupload_max_filesize = 750M
The file is present in /etc/php/7.4/apache2 folder
step 1: Open your php.ini file.
Step 2: Upgrading Memory Limit.
memory_limit = 750M
At a times, a default amount of memory used to process the website is not sufficient. A website needs more than the default amount of memory. One can increase the limit according to the requirements.
Step 3: Upgrading Maximum size to post:
post_max_size = 750M
post_max_size is the maximum size for all the POST body data. It is like the superset. Make sure to check post_max_size for all kinds of POST data.
Step 4: Upgrading Maximum file size to upload:
upload_max_filesize = 1000M
By default, a 2MB limit of upload/import size in PHPMyAdmin is set. That makes it highly impossible for larger files to upload a configuration file. Usually, in servers like CentOs, it is located at /etc/php.ini. It is a maximum size only for files that are posted.
Step 5: Upgrading Maximum Execution Time:
max_execution_time = 5000
max_execution_time is a time limit on how long a PHP script can run. Again, it can be adjusted according to the requirements. It is a way hosting providers can limit the use and abuse of server resources, especially for shared hosting.
Step 6: Upgrading Maximum Input Time:
max_input_time = 3000
The maximum Input time is the maximum time a script is allowed to parse input data, like POST and GET. This is usually increased to allow for larger file uploads.
After updating your php.ini file, make sure to restart the apache service. And, check for if new changes are getting reflected over the server. And, now you can see you will be easily able to import your large database files without getting any errors or blockages.