#3964 (ok 4.0.4) Import using https does not work

4.0.2
fixed
Marc Delisle
None
1
2013-06-17
2013-06-02
aommundsen
No

I am running apache 2.4.4, php 5.4.15 (mod_ruid2) and mysql 5.5.31

The problem started from phpMyAdmin version 4.0.0. I am now running phpMyAdmin 4.0.2

When using phpMyAdmin 4.0.2 over https, I can't import databases using newest version of Chrome, Internet Explorer and Opera. It seems to work in Firefox.

There is no visible errors, but when try to import it just hangs on the page loading/text:

"The file is being processed, please be patient."

Nothing more happens, and nothing is uploaded.

As soon as I don't use https, then import of database work immediately!

To conclude: Import over https does not work in Chrome, Internet Explorer and Opera, but seem to work in Firefox. When not using https it works immediately.

Please let me know if you need more information. I hope you will test import in https soon to confirm the bug. This creates a lot of trouble for us, because we offer shared webhosting, and there is a lot of customers contacting us with this problem.

Discussion

  • aommundsen
    aommundsen
    2013-06-02

    Update: I have tested more. When uploading a very small .sql file wich was 2.12 kB, it works without problem. And further, after uploading the small .sql file on only 2.12 kB, if I then try to upload the bigger .sql file wich is 1.06 MB to the same database in phpMyAdmin, it also works! So this is getting very confusing to debug for me.

    So when you try to replicate the bug, please make sure that the database you are importing to is completely empty, and also make sure that the .sql file you are importing is at least 1.06 MB big. This is a real issue.

     
  • aommundsen
    aommundsen
    2013-06-06

    I have now upgraded to phpMyAdmin version 4.0.3, and the problem is still there. Only in Firefox it seems to work fine importing over https. Remember that very small .sql files work fine, but when I try with a .sql file bigger then 1MB, it's not possible to import, it just hangs on the text "The file is being processed, please be patient."

     
  • aommundsen
    aommundsen
    2013-06-06

    Now we also get random users complaint about import not working also in Firefox, and even one user was having this problem in Firefox even without using https - same as said before:

    "The file is being processed, please be patient."

    And nothing more happens. However I am not able to replicate this myself, it works for me in Firefox, both with and without https

    However, as said, it does not work on other browsers when using https. I am now considering to downgrade phpMyAdmin to version 3.5.x

    I hope you will take a real close look at the import function in phpMyAdmin 4.x, something is really wrong. I have 4 dedicated servers, all with the same problems.

     
    Last edit: aommundsen 2013-06-06
  • aommundsen
    aommundsen
    2013-06-09

    Please let me know what to do in order to debug this so that I can provide you more information.

     
  • Marc Delisle
    Marc Delisle
    2013-06-09

    With PHP 5.3.25, https, IE 10 and a 5 MB file imported for the first time, I cannot reproduce this problem, so it's related to running on PHP 5.4.

    I remember an issue with importing with phpMyAdmin 4.x under PHP 5.4, I'll try to dig it.

     
  • Marc Delisle
    Marc Delisle
    2013-06-09

    I can also reproduce the problem with http, Firefox 21 on Windows 8, server running PHP 5.4.
    As a workaround to disable this problematic feature, please try this patch and confirm here the outcome:

    diff --git a/libraries/display_import_ajax.lib.php b/libraries/display_import_ajax.lib.php
    index e747d41..fa8aea5 100644
    --- a/libraries/display_import_ajax.lib.php
    +++ b/libraries/display_import_ajax.lib.php
    @@ -31,7 +31,7 @@ $upload_id = uniqid("");
    * and own file with functions in upload_#KEY#.php
    */
    $plugins = array(
    - "session",
    +// "session",
    "progress",
    "apc",
    "noplugin"

     
  • Ann + J.M.
    Ann + J.M.
    2013-06-09

    Hello aommundsen,
    Please try the following:

    • Install Fiddler (www.fiddler2.com)
    • Open its options, allow to record and decrypt HTTPS traffic, install the certificate
    • Delete your cookies from the phpMyAdmin installation
    • Reload the phpmyadmin page, and switch to the database, import tab
    • Upload the >1.06MB file
    • Note down what it does
    • Export the captured traffic from Fiddler.

    Repeat for phpmyadmin 3.5.x.

    Sorry for the effort that this needs.

     
  • aommundsen
    aommundsen
    2013-06-09

    @Marc Delisle, I changed line number 34 in libraries/display_import_ajax.lib.php to be commented like this: // "session",

    Is that all I should do in you patch? Because it did not help, I am still not able to import when i tested in phpmyadmin 4.0.3 using opera browser over https

    (Edit: The patch works when testing again.)

    @J.M., I will try to look into this fiddler thing in a few hours. Thanks.

     
    Last edit: aommundsen 2013-06-09
  • Marc Delisle
    Marc Delisle
    2013-06-09

    Yes, this is all I have to do to make it work. By the way, do you have the problem also with http? and with Firefox when you try your big file first?

     
  • aommundsen
    aommundsen
    2013-06-09

    No, the moment I change to http, the import work without any problem when I test in Internet Explorer and Opera - then moment I change back to https it stops working when I import using those two browsers.

    Regarding Firefox it works for me both in https and http (but I have one client that it did not work importing in Firefox over http, however I am not able to replicate that).

    I have downgraded my production servers to 3.5.8.1, and that solved all the problems. I still have two servers running 4.0.3 (without clients on), and hope we can solve this. I will soon look into Fiddler.

    Edit: I have Firefox 21 on Windows 7 64bit, import works both on http and https in it.

     
    Last edit: aommundsen 2013-06-09
  • Ann + J.M.
    Ann + J.M.
    2013-06-09

    Besides https://bugs.php.net/bug.php?id=64075, there seem to be even more problems with the native session upload progress feature in PHP 5.4. In my tests, multiple times the progress information was not written to $_SESSION, especially after deleting session cookies. Should we disable PHP 5.4's upload progress feature for now, and plan to re-add it in master?

     
  • aommundsen
    aommundsen
    2013-06-09

    @Marc Delisle, I spoke to soon. Your patch did fix the problem importing over https. When I test again, it does work importing over https using Opera 12.15 and Internet Explorer 10

    I don't know why it did not the first time, but there must have been something that was cached somewhere ... So, I comment out // "session", in line 34 in libraries/display_import_ajax.lib.php, and all seems to work correct importing over https in phpmyadmin 4.0.3

    Can we expect this change or similar to be added to phpmyadmin 4.0.4? Should it be safe for me to upgrade my production servers to 4.0.3 and add this patch? Thanks!

     
    Last edit: aommundsen 2013-06-09
  • aommundsen
    aommundsen
    2013-06-09

    @Marc Delisle, I have now tested your patch in more browsers over https. It works in all I have tested, I have tested with your patch over https in newest versions of: Chrome, Internet Explorer, Opera and Firerfox. Problem seem to be completely solved by commenting out // "session", in libraries/display_import_ajax.lib.php

     
  • aommundsen
    aommundsen
    2013-06-09

    @J.M., because the patch from Marc Delisle completely have fixed the problem regarding import over https, I will not look into Fiddler at this time. Instead I will wait for answer from Marc Delisle if it is safe to apply the patch to phpmyadmin 4.0.3 on production servers.

     
  • Marc Delisle
    Marc Delisle
    2013-06-09

    @J.M.: Yes we should disable this in QA_4_0. Any objection to my patch + some clarifications in the docs?

    @aommundsen: yes it's safe to apply this patch to 4.0.3. This session-based upload progress feature will be disabled for 4.0.4.

     
  • Marc Delisle
    Marc Delisle
    2013-06-09

    • assigned_to: Marc Delisle
     
  • Marc Delisle
    Marc Delisle
    2013-06-10

    • summary: Import using https does not work --> (ok 4.0.4) Import using https does not work
    • status: open --> open-fixed
    • Priority: 7 --> 1
     
  • Michal Čihař
    Michal Čihař
    2013-06-11

    • Status: open-fixed --> resolved
     
  • Marc Delisle
    Marc Delisle
    2013-06-17

    • Status: resolved --> fixed