Reputation: 11
Ok, I know how this question has been asked and all. But, heres the thing.
ini_set('memory_limit', '400M');
The script I'm using is a library out there, to communicate with the Amazon S3
Help please!
EDIT
Ok heres the code, as you can see I'm not doing much, its all about the script I'm using.. That is here: http://belgo.org/backup_and_restore_to_amazo.html
ini_set('memory_limit', '400M');
require 'lib/s3backup.php';
$bucket = 'thebucketname';
$bucket_dir = 'apts';
$local_dir = "/home/apartmen/public_html/transfer/t/tr";
$s3_backup = new S3_Backup;
$s3_backup->upload_dir( $bucket, $bucket_dir, $local_dir );
Upvotes: 1
Views: 2991
Reputation: 6935
The AWS SDK for PHP has an AmazonS3 class that can stream a local file up to S3.
http://docs.amazonwebservices.com/AWSSDKforPHP/latest/#m=AmazonS3/create_object
The parameter you need to pay attention to is "fileUpload".
Upvotes: 0
Reputation: 212402
"allowed mem of 400MB exhausted when it was trying to allocate 239MB.." means that PHP was trying to allocate an additional 239MB of memory that (when added to the memory already allocated to the script) pushed it over the 400MB limit.
Upvotes: 4