phpmyadmin / docker

Docker container for phpMyAdmin
https://hub.docker.com/_/phpmyadmin
GNU General Public License v3.0
665 stars 456 forks source link

Export SQL Fail network error #357

Closed ChronosSong closed 2 years ago

ChronosSong commented 2 years ago

image Environment: k3s Version: 5.1.3 When I export sql, I get a network error, deploy it on k3s, use nginx reverse proxy, everything works fine in version 5.1.1

UnwishingMoon commented 2 years ago

Same problem, I have phpmyadmin deployed on docker behind a nginx proxy. I tried some debugging and at the end I reverted to 5.1.1

To give some more info here is what I tried

I enabled nginx debug in error.log and here is the line:

*96 client canceled stream 1 while reading upstream, client: ...

I tried first editing nginx proxy_buffering alongside proxy_request_buffering without luck I changed phpmyadmin mime_type variable inside Export.php class just to be sure but without success

I fired up a test env with just phpmyadmin and a test database connecting with localhost (excluding nginx entirely) and the problem persist

williamdes commented 2 years ago

Hi

Could you share some config files so I can try to reproduce this on my end ?

Does 5.1.2 work ? So 5.1.3 does not work, right ?

UnwishingMoon commented 2 years ago

I did not tried with 5.1.2 because from https://hub.docker.com/_/phpmyadmin there is no 5.1.2 tag. Only 5.1.3 seems affected

Here is my docker-compose.yml file I used as a test to exclude nginx:

services:
  db:
    image: mariadb:10
    environment:
      - MARIADB_ROOT_PASSWORD=root

  pma:
    image: phpmyadmin:5.1.3-apache
    ports:
      - 127.0.0.1:9000:80
    environment:
      - HIDE_PHP_VERSION=true
      - UPLOAD_LIMIT=30M

I tried port 9000 and port 80 and the error shows up but if port 8080 is used the file is not downloaded at all While using the image with port 8080 the network tab in chrome shows (failed)net::ERR_CONTENT_DECODING_FAILED

The response headers:

HTTP/1.1 200 OK
Date: Mon, 28 Mar 2022 14:28:48 GMT
Server: Apache/2.4.52 (Debian)
Expires: Mon, 28 Mar 2022 14:28:48 +0000
Cache-Control: no-store, no-cache, must-revalidate,  pre-check=0, post-check=0, max-age=0
Last-Modified: Mon, 28 Mar 2022 14:28:48 +0000
X-ob_mode: 1
Content-Encoding: gzip
Vary: Accept-Encoding
Pragma: no-cache
Content-Description: File Transfer
Content-Disposition: attachment; filename="files.sql"
Content-Transfer-Encoding: binary
Keep-Alive: timeout=5, max=43
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/x-sql;charset=utf-8
louis123562 commented 2 years ago

Me and my collegues have the same problem. Seems like it is bound to PHP 8.0.18 as many other report on Stack Overflow; trying it with PHP 7.4.x and any phpmyadmin version below < 5.1.0 works like a charm.

Lordingard commented 2 years ago

Hello,

Same issue for me with lastest version 5.1.3. Docker image 5.1.1 work like a charm.

williamdes commented 2 years ago

This is most probably phpmyadmin/phpmyadmin#17445 The next version of phpMyAdmin will fix this If you use a chrome based browser it should work Let me know

Lordingard commented 2 years ago

This is most probably phpmyadmin/phpmyadmin#17445 The next version of phpMyAdmin will fix this If you use a chrome based browser it should work Let me know

I tryed with Chrome and Firefox, doesn't work for the 2.

williamdes commented 2 years ago

Hi,

5.2.0 and 5.1.4 where released, can you let me know if this works for you ?

UnwishingMoon commented 2 years ago

Exporting from Chrome, Firefox and Safari from Mac Both version 5.2.0 and 5.1.4 exports correctly.

Just for the record, other formats (json, csv, ...) works too

williamdes commented 2 years ago

Duplicate of #https://github.com/phpmyadmin/phpmyadmin/issues/17445

Batsuren-148 commented 2 years ago

myphpadmin is working same error. How can i solve it?

williamdes commented 2 years ago

phpMyAdmin is working same error. How can i solve it?

Use the 5.1.4 image or 5.2.0 image ;)