Maximum upload file size

Maximum upload file size xampp
September 27, 2024
No Comments
2 min read

English:

It seems you're facing issues uploading large database dump files in phpMyAdmin due to memory, HTTP, or timeout errors. Here are steps you can follow to resolve this issue:

1. Increase PHP Limits in php.ini

You need to adjust the following parameters in your php.ini file to accommodate larger uploads:

  • max_execution_time: This sets the maximum time (in seconds) that a PHP script can run. Increase it to avoid timeout issues.
  max_execution_time = 300
  • upload_max_filesize: This sets the maximum size of uploaded files.
  upload_max_filesize = 128M
  • post_max_size: This controls the maximum size of POST data, including file uploads. It should be larger than upload_max_filesize.
  post_max_size = 130M
  • memory_limit: This defines the maximum amount of memory a script can use.
  memory_limit = 256M

2. Restart Your Server

After making these changes, restart your server for the changes to take effect.

  • For XAMPP:
  • Stop and restart Apache.
  • For Linux (LAMP):
  sudo service apache2 restart

3. Upgrade phpMyAdmin

If you're using an older version of phpMyAdmin, upgrade to at least version 2.7.0 or the latest stable version to benefit from the improvements in the import engine.

4. Use Command-Line for Large Imports

If the issue persists despite increasing PHP limits, you can use the MySQL command-line tool to import large databases:

mysql -u username -p database_name < file.sql

This avoids web-based PHP limitations entirely.

Bangla:

বড় ডাটা আপলোড করতে গেলে আপনাকে কিছু সেটিংস পরিবর্তন করতে হবে। XAMPP-এর php.ini ফাইলটি এডিট করুন এবং নিচের প্যারামিটারগুলোর মান পরিবর্তন করুন:
upload_max_filesize: 1627325 KB-এর জন্য 2G (2048M) করুন।
post_max_size: এই মান upload_max_filesize-এর থেকে কিছু বড় করুন, যেমন 2G (2048M)।
memory_limit: এই মানও 2G (2048M) করুন বা আপনার সিস্টেমের RAM অনুযায়ী বাড়ান।
max_execution_time: 300 বা 600 সেকেন্ডে বাড়ান (আপনার প্রয়োজন অনুযায়ী)।
php.ini ফাইলটি কোথায় পাবেন:
XAMPP ইনস্টলেশন ডিরেক্টরির মধ্যে php ফোল্ডারে (xampp/php/php.ini) পাবেন।
ফাইল পরিবর্তনের পর:
XAMPP Control Panel-এ Apache সার্ভারটি রিস্টার্ট করুন।
এখন আবার চেষ্টা করুন। সমস্যা থাকলে, অন্য কোনো উপায়ে ডেটা আপলোড করার কথা চিন্তা করতে পারেন, যেমন mysql কমান্ড লাইন বা phpMyAdmin-এর কমান্ড লাইন ইন্টারফেস ব্যবহার করে।

©2025 Linux Bangla | Developed & Maintaind by Linux Bangla.