[isf-wifidog] Hostname+Port number and Google Maps API

Avinash Duduskar avinash.duduskar at gmail.com
Mer 29 Avr 18:26:23 EDT 2009


Hello list,

This is my network setup:
http://img293.imageshack.us/img293/1097/networkm.jpg
I am running both components of WiFiDog on the linux PC with the
AP(192.168.2.1) connecting to eth2(192.168.2.2)


My Google Maps API key is for "192.168.1.101:82"
I also have localhost in my list of virtual hosts besides 192.168.1.101:82



 When one goes to "Find Hotspots --> Deployed Hotspots map" this error is
displayed:

"Detailed error was: Uncaught Exception Unable to get the google API key,
because I couldn't find a vhost matching the current hostname (0) thrown in
file /var/www/htdocs/wifidog/wifidog-auth/wifidog/hotspots_map.php, line 97
#0 {main}"



 So I had a look.

# cat /var/www/htdocs/wifidog/wifidog-auth/wifidog/hotspots_map.php|grep -A
7 -B 7 API

/*
 * Header JavaScripts
 */

// Add Google Maps JavaScript (must set config values)
if(!$vhost=VirtualHost::getCurrentVirtualHost()) {
    throw new Exception(_("Unable to get the google API key, because I
couldn't find a vhost matching the current hostname"));
}
$html_headers  = "<script
src='http://maps.google.com/maps?file=api&amp;v=2&amp;&key=" .
$vhost->getGoogleAPIKey() . "' type='text/javascript'></script>";
$html_headers .= "<script src='js/hotspots_status_map.js'
type='text/javascript'></script>";

$html = null;
/*
 * Main content
 */




This gave me no leads and it was suggested on IRC that maybe the virtualhost
section was not tested with port numbers in it.
Could a developer shed light on this?



Regards,
Avinash



Plus d'informations sur la liste de diffusion WiFiDog