I had php5-fpm, nginx, mysql, phpmyadmin that installed on my ubuntu 14.04. every thing was good. When I updated php to php7.0 phpmyadmin required to install mbstring. I installed it and works well. But Export page of phpmyadmin show blank page.

This error is logged in nginx error log file.

2016/08/09 16:20:31 [error] 1494#0: *35 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot 'break' 2 levels in /usr/share/phpmyadmin/export.php on line 864" while reading response header from upstream, client:, server: localhost, request: "POST /phpmyadmin/export.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "localhost", referrer: "http://localhost/phpmyadmin/index.php?token=584932884866cc16a2444d67eb7927d0&phpMyAdmin=4aro5gojhjuli0svkuctbrlot0450dar"

I solved the problem by modifying line 864 in phpmyadmin/export.php, change :

break 2;



Solution provided by bbalent in the following answer:

Don't worry, this is a code mistake from the phpMyAdmin team: you are into one loop and not two nested loops. That's why you can't "break 2" (because 2 denotes that you're inside a nested loop). The error appears because PHP7 is stricter than former versions. By the way, this can fix other packages (PHPExcel, newer versions of phpMyAdmin etc.). Most of the time, the developper deleted the nested loop and forgot to update this line of code.

  • Line 861 for me, but an otherwise perfect answer - thank you very much. – ajcw Aug 25 '16 at 20:41

For me it was in line 604, and it works. Thank you very much

if ($GLOBALS[$what . '_structure_or_data'] == 'structure' || $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data') {
        if (!PMA_exportStructure($db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates, 'triggers', $export_type)) {

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.