No logro descubrir por que el siguiente script me produce un Error Interno de Servidor 500 (error inesperado):
<?php
$id = $_GET['id'];
echo $id;
$GM_KEY = '************************************************************************';
$link = mysql_connect('localhost','******','******')or
die('No se pudo conectar con MySQL'); $sql = 'SELECT id, categoria, nombre, direccion, latitude, longitude FROM lugares WHERE lugares.id='.$id;
{
}
$URL = "http://maps.google.com/maps/geo?q=". urlencode($lugar->direccion) .",Rawson,Chubut,Argentina&output=json&language=es&oe=utf8&key=". $GM_KEY; //die($URL);
if( $json->Status->code == 200 )
{
$coor = $json->Placemark[0]->Point->coordinates;
}
else
{
die("Status code: " . $json->Status->code); }
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Probando Gogle Maps</title>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?=$GM_KEY?>" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="jquery.gmap-1.1.0-min.js" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width:700px; height:500px; border:1px solid #777; overflow: hidden;"></div>
<script>
$("#map").gMap({
markers: [{
latitude: <?=$coor[1]?>,
longitude: <?=$coor[0]?>,
html:"<p><b><?=$lugar->nombre?></b></p><a href='./comollegar.php?lat=<?=$coor[1]?>&lon=<?=$coor[0]?>'>Cómo Llegar?</a>",
popup:true
}],
zoom:15
});
</script>
</body>
</html>
Resultado:
script?id=1
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@******* and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Alguna idea?
Saludos
PD: Los asterisco son intencionales
SolucionTenia un conflicto con la redireccion, y no me toma el script sino indicaba la extensión '.php' en la url.