página de exportação do phpmyadmin fica em branco após atualização do php5 para php7.0

1

Eu tinha php5-fpm, nginx, mysql, phpmyadmin que eu instalei no meu Ubuntu 14.04. Tudo estava bom. Quando atualizei o php para php7.0 phpmyadmin necessário para instalar o mbstring. Eu instalei e funciona bem. Mas a página Exportar do phpmyadmin mostra a página em branco.

Este erro é registrado no arquivo de log de erros nginx.

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"
    
por Ali 09.08.2016 / 13:58

2 respostas

1

Eu resolvi o problema modificando a linha 864 no phpmyadmin / export.php, altere:

break 2;

By:

break;

Solução fornecida por bbalent na seguinte resposta :

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.

    
por 09.08.2016 / 14:59
0

Para mim, estava na linha 604 e funciona. Muito obrigado

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;
        }
    
por 15.02.2018 / 13:36