To increase the timeout and import size in phpMyAdmin on XAMPP for Ubuntu, you’ll need to adjust several configuration settings related to PHP and phpMyAdmin itself. Here’s how to do it:
Step 1: Modify PHP Configuration
Increase PHP memory, upload, and post sizes:
Open PHP Configuration File: Open the php.ini
file, which is usually located in /opt/lampp/etc/
.
sudo nano /opt/lampp/etc/php.ini
Change the following settings to increase the upload limit and execution time:
- Memory Limit: This setting affects the maximum amount of memory a script is allowed to allocate.
memory_limit = 512M # or more if needed
Upload Max Filesize: The maximum size of an uploaded file.
upload_max_filesize = 128M # Increase as needed
Max Execution Time: This setting affects the maximum time in seconds a script is allowed to run before it is terminated by the parser.
max_execution_time = 300 # Increase as needed
Post Max Size: Must be larger than upload_max_filesize
post_max_size = 200M # Increase as needed
Save and Exit:
Save your changes (Ctrl+O, Enter) and exit (Ctrl+X).
Step 2: Configure phpMyAdmin (optional)
To change settings specifically for phpMyAdmin, such as for increasing the import timeout or handling large files:
Edit phpMyAdmin Configuration: The phpMyAdmin configuration can be adjusted by editing the config.inc.php
file located in /opt/lampp/phpmyadmin/
.
sudo nano /opt/lampp/phpmyadmin/config.inc.php
Add or Update Configuration Directives:
If not already present, you might want to add or ensure these lines are included:
$cfg['ExecTimeLimit'] = 0; // Zero for no limit, or increase as needed
- This setting controls the maximum execution time for phpMyAdmin scripts. Setting it to
0
removes any time limits, which is helpful for importing large databases. - Save and Exit: After making changes, save the file and exit the editor.
Step 3: Restart Apache
After making changes to the php.ini
file or phpMyAdmin configuration, restart the Apache server to apply these changes:
sudo /opt/lampp/lampp restartapache
Step 4: Verify Changes
Once Apache is restarted, you can verify the changes by:
- Opening phpMyAdmin: Navigate to
http://localhost/phpmyadmin/
in your web browser. - Checking the Variables: The changes should reflect under the “PHP Information” or similar link on the phpMyAdmin home page, which displays current PHP settings.