Welcome to the Hindi Tutor QA. Create an account or login for asking a question and writing an answer.
Sukhdeep Kaur in Web Designing
I am trying to import a large .sql data file using phpMyAdmin in XAMPP. However this is taking a lot of time and I keep getting.

1 Answer

0 votes
Pooja

There's a configuration variable within the phpMyAdmin directory that you can find in libraries\config.default.php called $cfg['ExecTimeLimit'] that you can set to whatever maximum execution time you need.

/**
 * maximum execution time in seconds (0 for no limit)
 *
 * @global integer $cfg['ExecTimeLimit']
 */

$cfg['ExecTimeLimit'] = 30000;

Increase Maximum PHP Execution Time in php folder. php.ini file.

Aftet doing this Restart Apache in XAMPP.

----------------------------------

Increase Maximum PHP Execution Time on Ubuntu Server

Find the file called: php.ini on your server and follow below steps

With apache2 and php7.4 installed you need to make three changes in the php.ini file. First open the file for editing, e.g.:

For PHP v7.3

sudo nano /etc/php/7.3/apache2/php.ini

For PHP v7.4

sudo nano /etc/php/7.4/apache2/php.ini

Next, search (Ctrl + W) in this file for the max_execution_time entry, by defaul it has 30 second, for example:

max_execution_time=30

You can increase value as your requirement. 

Now Restart Apache Services for changes to be applied.

sudo systemctl restart apache2

For PHP-FPM

If you enabled PHP-FPM, then type this command line for open and edit php.ini

sudo nano /etc/php/7.4/fpm/php.ini

Edit, as your requirement:

memory_limit = 300M
post_max_size = 200M
upload_max_filesize = 100M
max_execution_time=300

Restart Apache And PHP-FPM Services for changes to be applied.

sudo systemctl restart apache2
sudo service php7.4-fpm restart
...