-
-
Save Danack/ce6be556842d645ab0ce to your computer and use it in GitHub Desktop.
CurlCrashRepoScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require './vendor/autoload.php'; | |
// Download https://github.com/aws/aws-sdk-php and stick this file | |
// in the root directory and do a composer update. The segfault | |
// occurs before the incorrect secrets are used. | |
use Aws\S3\S3Client; | |
$s3Key = '12345'; | |
$s3Secret = '12345'; | |
$s3Region = 'eu-west-1'; | |
$s3Client = S3Client::factory([ | |
'key' => $s3Key, | |
'secret' => $s3Secret, | |
'region' => $s3Region | |
]); | |
//$s3Client->getConfig()->set('curl.options', array(CURLOPT_VERBOSE => true)); | |
$sourceFile = "./LICENSE.md"; | |
$destFile = "LICENSE.md"; | |
$bucket = 'rpm.example.com'; | |
$result = $s3Client->putObject(array( | |
'Bucket' => $bucket, | |
'Key' => $destFile, | |
'SourceFile' => $sourceFile, | |
'Metadata' => array( | |
) | |
)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment