export page of phpmyadmin goes blank after update php5 to php7.0

1

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: 127.0.0.1, 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"

Ali

Posted 2016-08-09T11:58:55.063

Reputation: 271

Answers

1

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

break 2;

By:

break;

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.

Ali

Posted 2016-08-09T11:58:55.063

Reputation: 271

Line 861 for me, but an otherwise perfect answer - thank you very much. – ajcw – 2016-08-25T20:41:48.813

0

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)) {
            break;
        }

user873009

Posted 2016-08-09T11:58:55.063

Reputation: 1