psugand / CodeIgniter-S3

Amazon S3 Library for CodeIgniter
http://prashant.es
241 stars 115 forks source link

Dying in $rest->getResponse() in putObject() #17

Closed jeremyjackson89 closed 9 years ago

jeremyjackson89 commented 9 years ago

This runs perfect for me locally, but on my server it's dying inside of the $rest->getResponse() function between

public function getResponse(){

        echo 'in getResponse'.br(1);

        var_dump($this);

        $query = '';
        if (sizeof($this->parameters) > 0){
            $query = substr($this->uri, -1) !== '?' ? '?' : '&';
            foreach ($this->parameters as $var => $value)
                if ($value == null || $value == '')
                    $query .= $var . '&';
                // Parameters should be encoded (thanks Sean O'Dea)
                else
                    $query .= $var . '=' . rawurlencode($value) . '&';
            $query = substr($query, 0, -1);
            $this->uri .= $query;

            if (array_key_exists('acl', $this->parameters) ||
                    array_key_exists('location', $this->parameters) ||
                    array_key_exists('torrent', $this->parameters) ||
                    array_key_exists('logging', $this->parameters))
                $this->resource .= $query;
        }

        $url = ((S3::$use_ssl && extension_loaded('openssl')) ?
                        'https://' : 'http://') . $this->headers['Host'] . $this->uri;
        // var_dump($this->bucket, $this->uri, $this->resource, $url);
        // Basic setup
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_USERAGENT, 'S3/php');

        echo '1'.br(1);
....
....
}

Why would it work locally but die here on the server?

jeremyjackson89 commented 9 years ago

My fault, curl wasn't installed on the server.