Maximum execution time in phpMyadmin

Maximum execution time in phpMyadmin

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

Maximum execution time in phpMyAdmin

When you attempt to run a query against a massive table—say, one exceeding nine million records—you might hit the familiar wall: Fatal error: Maximum execution time of 60 seconds exceeded. The stack trace often points deep into the database abstraction layer, specifically something like C:\xampp\phpmyadmin\libraries\dbi\mysql.dbi.lib.php.

The immediate instinct is to edit php.ini and bump max_execution_time from 60 to 1000. You restart Apache or PHP-FPM, yet the error persists. This happens because the configuration file you are editing is not the one being used by phpMyAdmin itself.

phpMyAdmin does not run on your server's global PHP configuration. It runs inside a containerized environment (if using Docker) or, in the case of XAMPP, as a standalone PHP process that isolates its own runtime settings. The C:\xampp\php\php.ini file controls the CLI and the Apache module for that specific installation. However, phpMyAdmin often loads its own bundled version of PHP or utilizes an embedded setup where the global config is ignored in favor of local overrides.

To resolve this, you must locate the active configuration for the specific PHP instance running the web server component of XAMPP. In a standard XAMPP installation on Windows, the active php.ini is usually located at C:\xampp\php\php.ini. If you modified that file and it didn't work, check if phpMyAdmin is using a bundled php.ini within its own directory structure or if it relies on .htaccess directives that are being overridden.

A more direct approach involves modifying the configuration specifically for the Apache module serving the site. Open the C:\xampp\apache\conf\extra\php.ini file (if present) or ensure your edits in the main C:\xampp\php\php.ini are actually taking precedence. You can verify this by creating a PHP file with <?php phpinfo(); ?> at the root of your XAMPP htdocs and accessing it via a browser. If that page still shows 60 seconds, your edit to the main php.ini hasn't been picked up or Apache isn't reading it correctly.

If editing php.ini feels like shooting in the dark, use .htaccess. This is often cleaner for web-specific settings. Add the following directive to your .htaccess file located in the root directory of your phpMyAdmin installation (or globally if you prefer):

php_value max_execution_time 1000

Note that this only works if AllowOverride All or at least AllowOverride FileInfo is enabled in your Apache configuration (httpd.conf). Without this, the directive is silently ignored.

However, there is a critical distinction between execution time and memory limits. A query on 9+ million rows might exhaust memory before it hits the time limit. If you increase execution time but not memory_limit, PHP will crash with an out-of-memory error once it tries to process the result set. Ensure you also adjust memory_limit in the same configuration scope if needed:

memory_limit = 512M

Another pitfall is how phpMyAdmin handles result sets. By default, older configurations or specific modes might try to load the entire result set into memory before streaming it back to the browser. For very large tables, this is inefficient and prone to timeouts regardless of your max_execution_time setting.

Consider modifying the read_default_file_limit or ensuring that your query uses LIMIT clauses effectively. If you are running complex aggregations without limits, phpMyAdmin might be buffering too much data internally. In some versions of phpMyAdmin, there is a configuration option in config.inc.php to control how result sets are fetched. Check if blowup_limit or similar internal timeouts are being enforced by the application logic itself rather than PHP's SAPI layer.

If you are working within a Laravel ecosystem and need similar database operations, remember that framework-level queues or cron jobs might have their own execution constraints. While this specific error is tied to the web server environment in XAMPP, understanding where the boundary lies between global PHP settings and application-specific configuration prevents future headaches when scaling queries. For robust production environments involving large datasets, consider offloading heavy reporting tasks to a separate worker process or using a dedicated analytics database rather than relying on phpMyAdmin for bulk operations.

Our network