Florian Mac Langlade
Florian Mac Langlade

Reputation: 1903

Upload image from EC2 to S3

Please excuse my English, i'm French :)

So, I've to upload images from ec2 to s3. I'm using the php library but I find it very, very loooong ! So, I've made some search and I've find the s3cmd tool. But it doesn't work with exec php function :

exec("/usr/bin/s3cmd  put –acl-public –guess-mime-type  –config=/var/www/html/.s3cfg   /var/www/html/website/public/img/a/1380098080346/1.jpg  s3://mybucket  2>&1")

The output is :

ERROR: Can't find a config file. Please use --config option.

My config file's owner is apache, and rights are 777 (for testing ;)) but nothing... I still have the same error...

For information I've followed this page : http://thephpsolutions.wordpress.com/tag/s3cmd/

Have you got an idea ? Thanks a lot !

Upvotes: 0

Views: 228

Answers (1)

Peter
Peter

Reputation: 981

This may be a typo in your question, but in your exec statement you need to have two dashes before the config:

-–config=/var/www/html/.s3cfg

Upvotes: 2

Related Questions