[Phpmyadmin-devel] suggestion on $cfgPmaAbsoluteUri
robbat2 at fermi.orbis-terrarum.net
Fri Apr 19 13:39:01 CEST 2002
On Fri, 19 Apr 2002, Jay F. Davis wrote:
> I was having trouble connecting to phpMyAdmin after the login page. This
> occured when I was at my client's site. The config parameter
> $cfgPmaAbsoluteUri was to blame. I fixed the problem by using
> $REMOTE_ADDR in the config file for the parameter, like this:
> $cfgPmaAbsoluteUri = 'http://' . $REMOTE_ADDR . '/pathTo/phpMyAdmin-
> I suspect this is what most users want, and it would have saved me some
> time figuring this out if the above method was used. So, can we change
> the config parameter so that we only ask for the path and not the server
Firstly, you probably meant $SERVER_ADDR instead of $REMOTE_ADDR, as
$REMOTE_ADDR is the address that the browser is going from.
Even if you changed that to $SERVER_ADDR, it will not always work, as
$SERVER_ADDR is an IP, and the site may be using name based vhosts.
Observe my domain for example:
> You could put a parameter such as $cfgPmaPath in the config file and then
> later set $cfgPmaAbsoluteUri by prepending $REMOTE_ADDR onto the path.
Rather than any of these solutions, look at the Documentation.html file
for the proper solution:
cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://' .
$SERVER_NAME . (!empty($SERVER_PORT) ? ':' . SERVER_PORT : '')
. substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')+1);
Robin Hugh Johnson
E-Mail : robbat2 at orbis-terrarum.net
Home Page : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ# : 30269588 or 41961639
More information about the Developers