上传到App Engine时出现CURLOPT_RETURNTRANSFER错误

When I upload my code to GAE I get the following error. I'm clueless on why I'm getting this.

Notice: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed    

'CURLOPT_RETURNTRANSFER' in /base/data/home/apps/s~yourwebpay/1.379586028882033552/google-api-php-
 client/src/Google_Client.php on line 106 Notice: Use of undefined constant CURLOPT_FOLLOWLOCATION - assumed 'CURLOPT_FOLLOWLOCATION' in /base/data/home/apps/s~yourwebpay/1.379586028882033552/google-api-php-client/src/Google_Client.php on line 106 Notice: Use of undefined constant CURLOPT_FAILONERROR - assumed 'CURLOPT_FAILONERROR' in 

The code that I'm using:

<?php
   require_once 'google-api-php-client/src/Google_Client.php';
   require_once 'google-api-php-client/src/contrib/Google_DriveService.php';

    $client = new Google_Client();
    // Get your credentials from the console
       $client->setClientId('YOUR_CLIENT_ID');
       $client->setClientSecret('YOUR_CLIENT_SECRET');
       $client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
       $client->setScopes(array('https://www.googleapis.com/auth/drive'));

       $service = new Google_DriveService($client);

       $authUrl = $client->createAuthUrl();

       //Request authorization
       print "Please visit:
$authUrl

";
       print "Please enter the auth code:
";
       $authCode = trim(fgets(STDIN));

       // Exchange authorization code for access token
       $accessToken = $client->authenticate($authCode);
        $client->setAccessToken($accessToken);

        //Insert a file
        $file = new Google_DriveFile();
       $file->setTitle('My document');
      $file->setDescription('A test document');
     $file->setMimeType('text/plain');

      $data = file_get_contents('document.txt');

   $createdFile = $service->files->insert($file, array(
  'data' => $data,
  'mimeType' => 'text/plain',
));

 print_r($createdFile);
 ?>

I was able to retrieve the API keys and also enabled the Drive SDK and Drive API in the project.