phpMyAdmin export stops with Failed - Network error
Failed - Network errorShort answer
The browser lost the download because the PHP script behind the export stopped or sent a broken file. The documented causes are the time limit, the memory limit for compressed dumps, and output compression. Raise the limits, switch to gzip, or turn off compression for the page.
Fix it fast
1Find out which cause you have
Check the PHP limits the export runs under. Exports of big databases are the ones that fail.
php -i | grep -E "max_execution_time|memory_limit"2Match what you see, then jump to its fix
- 1
The download dies after a fixed time, with large databases onlyThe export runs longer than the time limitFix - 2
You picked zip, gzipped or bzipped output and the export dies on big databasesA compressed dump is built in memoryFix - 3
The page or download ends empty or cut offOutput compression breaks large pagesFix
- 1
What does the error look like?
Failed - Network error
Cause 1 of 3
The export runs longer than the time limit
1Check
phpMyAdmin has its own ExecTimeLimit (default 300 seconds), and PHP has max_execution_time. The FAQ tells you to check both limits.
grep -n "ExecTimeLimit" config.inc.php2Fix
Raise ExecTimeLimit in config.inc.php (0 means no limit) and max_execution_time in php.ini, then restart Apache.
// config.inc.php
$cfg['ExecTimeLimit'] = 600;
; php.ini
max_execution_time = 6003Verify
Export the same database again.
php -i | grep max_execution_timeConfirmed by docs.phpmyadmin.net
Cause 2 of 3
A compressed dump is built in memory
1Check
The FAQ says compressed dumps are built in memory and limited by PHP's memory limit. Zip exports cannot be compressed on the fly.
php -i | grep memory_limit2Fix
Use gzip or bzip2 so CompressOnFly (on by default) applies, or export without compression, or raise the memory limit.
// config.inc.php
$cfg['CompressOnFly'] = true;3Verify
Run the export with gzip chosen in the Format and Compression options.
gzip -t exported.sql.gz && echo OKConfirmed by docs.phpmyadmin.net
Cause 3 of 3
Output compression breaks large pages
1Check
The FAQ names $cfg['OBGzip'] and zlib.output_compression as the cause of blank or broken big pages.
php -i | grep zlib.output_compression
grep -n "OBGzip" config.inc.php2Fix
Turn both off, then restart Apache.
// config.inc.php
$cfg['OBGzip'] = false;
; php.ini
zlib.output_compression = Off3Verify
Try the export again.
php -i | grep zlib.output_compressionConfirmed by docs.phpmyadmin.net
How do I stop it coming back?
- For very large databases, use mysqldump on the command line instead of the browser.
- Test limits on a small export first, then a big one.
- Keep php.ini changes in one file and note them with the server.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Back end
Android gets HTML instead of JSON from a PHP API
org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject
The response body is not JSON.
2 causes, each with a fixBack end
Apache returns 403 when a URL contains %3F
a request like /page%3Fname=test is refused while /page?name=test works
Recent Apache httpd blocks a rewrite when the request contains an encoded question mark (%3F) and the rewritten target has a literal ?.
2 causes, each with a fixBack end
Apache returns 500 with Premature end of script headers
500 Internal Server Error
Apache ran your script, but the script printed no valid HTTP header before its output.
3 causes, each with a fixBack end
Apache returns 503 or 504 because PHP-FPM did not answer in time
Error dispatching request
Apache sent the request to PHP-FPM and gave up waiting.
3 causes, each with a fixBack end
AWS SDK for PHP cannot get credentials from the instance profile metadata server
Error retrieving credentials from the instance profile metadata server.
The SDK tries the EC2 instance metadata service when it has no valid credentials from anywhere earlier in its chain.
4 causes, each with a fixBack end
AWS SDK for PHP rejects requests: the signature is from the future
Signature not yet current: {date} is still later than {date}
AWS compares the timestamp in your signed request with its own clock.
2 causes, each with a fix