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-
2.2.6-rc2/';
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
address?
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:
http://sql.orbis-terrarum.net/mysql/
http://24.84.50.235/mysql/
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(a)orbis-terrarum.net
Home Page :
http://www.orbis-terrarum.net/?l=people.robbat2
ICQ# : 30269588 or 41961639