HTTP 500 error with Google Geocode Map
<p>Here is my code:</p>

<pre><code>public function geocode($address){
        $a = urlencode($address);
        $geocodeURL = "http://maps.googleapis.com/maps/api/geocode/json?address=$a&amp;sensor=false";
        $ch = curl_init($geocodeURL);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $result = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        curl_close($ch);

        if ($httpCode == 200) {
                $geocode = json_decode($result);
                $lat = $geocode-&gt;results[0]-&gt;geometry-&gt;location-&gt;lat;
                $lng = $geocode-&gt;results[0]-&gt;geometry-&gt;location-&gt;lng;
                var_dump($lat);
                var_dump($lng);
                //return this-&gt;getClosest($lat, $lng);
        } else {
                $geo_status = "HTTP_FAIL_$httpCode";
                //return -1;
        }

   }


    public function executeGet()
    {
        global $my_neighbor_lists;
        $valid = $this-&gt;hasRequiredParameters($this-&gt;requiredParams);
        if ($valid instanceof Frapi_Error) {
            return $valid;
        }

        $origin_address = $this-&gt;getParam('origin', self::TYPE_STRING));
        $this-&gt;geocode($origin_address);
    }
</code></pre>

<p>Why is it giving me a 500 HTTP error... is there some syntax that I am missing? Commenting the call to geocode removes this ERROR</p>

<p>Here's my error log:</p>

<p>2011/03/12 19:58:32 [error] 9966#0: *4555 FastCGI sent in stderr: "PHP Fatal error:  Call to undefined function curl_init() in /var/www/api/src/frapi/custom/Action/Find_route.php on line 128" while reading response header from upstream, client: 70.176.18.156, server: api.frapi, request: "GET /route.printr?origin=1510%20E.%209th%20Street,%20Tucson,%20AZ&amp;destination=32%20North%20Campbell%20Avenue,%20Tucson,%20AZ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "api.adasherasdasbang.me"</p>
