phpMyAdmin uses port 80 on CloudFlare Flexible SSL

Solution 1:

I found a solution that worked for me :D

In phpmyadmin/libraries/Config.class.php Find the following code:

 if (! empty($url['port'])
                && (($url['scheme'] == 'http' && $url['port'] != 80)
                || ($url['scheme'] == 'https' && $url['port'] != 80)
                || ($url['scheme'] == 'https' && $url['port'] != 443)

            )) {
                $pma_absolute_uri .= ':' . $url['port'];
            }

and remove the last OR condition:

 if (! empty($url['port'])
                && (($url['scheme'] == 'http' && $url['port'] != 80)
                || ($url['scheme'] == 'https' && $url['port'] != 80)
                //|| ($url['scheme'] == 'https' && $url['port'] != 443)

            )) {
                $pma_absolute_uri .= ':' . $url['port'];
            }