Menu

#4908 Reverse proxy: infinite internal redirect

4.4.7
wont-fix
None
High
2015-06-02
2015-05-17
Qcybb
No

phpMyAdmin 4.4.7 gets stuck in an infinite internal redirect and will not load whatsoever. I have the same results in IE and Firefox - using Windows 7 64 bit.

Here are the access logs (nothing shows in the error logs) :

22.33.44.55 - - [17/May/2015:09:17:53 -0700] "GET /phpmyadmin/?SID=&SID HTTP/1.0" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
22.33.44.55 - - [17/May/2015:09:17:53 -0700] "GET /phpmyadmin/?SID=&SID HTTP/1.0" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
22.33.44.55 - - [17/May/2015:09:17:53 -0700] "GET /phpmyadmin/?SID=&SID HTTP/1.0" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
22.33.44.55 - - [17/May/2015:09:17:53 -0700] "GET /phpmyadmin/?SID=&SID HTTP/1.0" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
22.33.44.55 - - [17/May/2015:09:17:53 -0700] "GET /phpmyadmin/?SID=&SID HTTP/1.0" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
22.33.44.55 - - [17/May/2015:09:17:53 -0700] "GET /phpmyadmin/?SID=&SID HTTP/1.0" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
22.33.44.55 - - [17/May/2015:09:17:53 -0700] "GET /phpmyadmin/?SID=&SID HTTP/1.0" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"

Discussion

1 2 > >> (Page 1 of 2)
  • Qcybb

    Qcybb - 2015-05-17

    I just wanted to add that 4.3.13.1 ran without issues. This issue started after upgrading to the latest version this morning.

     

    Last edit: Qcybb 2015-05-18
  • Marc Delisle

    Marc Delisle - 2015-05-17

    Did you install in a new directory, or over an existing one?

     
  • Qcybb

    Qcybb - 2015-05-17

    I'm using the FreeBSD ports system to update phpMyAdmin - which deletes everything (except my config file) and installs the new copy in the same directory.

     

    Last edit: Qcybb 2015-05-17
  • Qcybb

    Qcybb - 2015-05-17

    I manually installed a fresh copy in a new directory, copied the config.inc.php file over to it, restarted Apache & Nginx and the issue still persists.

    I reverted back to version 4.3.13.1 and everything is working again.

     

    Last edit: Qcybb 2015-05-17
  • Madhura Jayaratne

    Hi Ken,

    What are the values you have for configurations $cfg['PmaAbsoluteUri'], $cfg['ForceSSL'] in your configuration file?

     
  • Qcybb

    Qcybb - 2015-05-18

    $cfg['PmaAbsoluteUri'] = 'https://example.com/phpmyadmin/';
    $cfg['ForceSSL'] = true;

     
  • Marc Delisle

    Marc Delisle - 2015-05-18

    Please attach here your config.inc.php, obfuscating sensitive details.

     
  • Qcybb

    Qcybb - 2015-05-18

    / * $FreeBSD: ports/databases/phpmyadmin/files/config.inc.php.sample,v 1.3 2006/05/16 06:43:23
    * Skeleton configuration file -- this file is empty on a fresh
    * installaton of phpmyadmin.
    *
    * Copy any settings you want to override from
    * libraries/config.default.php or use scripts/setup.php to generate a
    * basic configuration file
    * /
    $i=0;
    $i++;
    $cfg['PmaAbsoluteUri'] = 'https://example.com/phpmyadmin/';
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['blowfish_secret'] = 'maskedforsecurityreasons';
    $cfg['Servers'][$i]['user'] = 'admin';
    $cfg['Servers'][$i]['password'] = 'somepassword';
    $cfg['ForceSSL'] = true;
    $cfg['NavigationTreeEnableGrouping'] = false;

     
  • Owen

    Owen - 2015-05-20

    I had the same problem upon upgrading from 4.4.6.1 to 4.4.7.

     
  • Marc Delisle

    Marc Delisle - 2015-05-20

    Ken,
    cannot reproduce the problem with version 4.4.7 and your configuration file. I just changed the PmaAbsoluteUri to match my server's URL. Tested on Linux.

     
  • Qcybb

    Qcybb - 2015-05-20

    It appears Owen (the comment above you) is having this issue as well.

    If it helps, I'm running on FreeBSD 10.1

     
    • Marc Delisle

      Marc Delisle - 2015-05-20

      Yes, but we cannot reproduce the problem (on a Linux server). Now, Owen, please describe your server (FreeBSD too?)

       
      • Owen

        Owen - 2015-05-20

        I have reproduced on CentOS 5.11.

        $cfg['PmaAbsoluteUri'] = 'https://mydomain.com/database/';
        $cfg['ForceSSL'] = true;

         
  • Qcybb

    Qcybb - 2015-05-20

    That fixes the issue for me :)

     
  • Owen

    Owen - 2015-05-21

    Not yet. I hope to be able to get to it this afternoon or tomorrow.

     
  • Owen

    Owen - 2015-05-22

    I have confirmed that reverting that commit resolves the issue for me.

     
  • Madhura Jayaratne

    Ken and Owen, Thanks for testing. However, the commit https://github.com/madhuracj/phpmyadmin/commit/47b734473e964546c5ac6f5324324f8ebf7fc3d4 was used to properly enforce ForceSSL directive.

    Now the problem is in PMA_Config::detectHttps() (https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/Config.class.php#L1611...L1659). This method has a comment saying that it ignores things like reverse proxies. Is this the case for you?

     
    • Qcybb

      Qcybb - 2015-05-27

      Yes, the detectHttps() function returns "false" when using Nginx as a Reverse Proxy for Apache (which is how my server is setup).

      If anyone else would like to test it, you will need to grab the required "PMA_getenv" function from libraries/core.lib.php

      Edit : I've attached the PHP script I used for testing.

       

      Last edit: Qcybb 2015-05-27
    • Owen

      Owen - 2015-05-27

      Yes, I'm also using a reverse proxy in my setup. I'm using Apache instead of nginx though.

       
  • Marc Delisle

    Marc Delisle - 2015-06-01

    Just wondering: if you set ForceSSL to false and access phpMyAdmin with https, is everything all right?

     
    • Qcybb

      Qcybb - 2015-06-01

      Yes, that solves the issue.

      I changed "ForceSSL" to 'false' and everything loads and works now (in HTTPS).

       
  • Marc Delisle

    Marc Delisle - 2015-06-01
    • summary: phpMyAdmin 4.4.7 gets stuck in an infinite internal redirect and will not load --> Reverse proxy: infinite internal redirect
     
  • Marc Delisle

    Marc Delisle - 2015-06-02
    • assigned_to: Marc Delisle
     
1 2 > >> (Page 1 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.