[英]Upload image from EC2 to S3
Please excuse my English, i'm French :) 请原谅我的英文,我是法国人:)
So, I've to upload images from ec2 to s3. 所以,我要将图像从ec2上传到s3。 I'm using the php library but I find it very, very loooong !
我正在使用php库,但我发现它非常非常loooong! So, I've made some search and I've find the s3cmd tool.
所以,我做了一些搜索,我找到了s3cmd工具。 But it doesn't work with exec php function :
但它不适用于exec php函数:
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... 我的配置文件的所有者是apache,权限是777(用于测试;))但没有...我仍然有相同的错误...
For information I've followed this page : http://thephpsolutions.wordpress.com/tag/s3cmd/ 有关我在此页面上的信息,请访问: http : //thephpsolutions.wordpress.com/tag/s3cmd/
Have you got an idea ? 你有个主意吗? Thanks a lot !
非常感谢 !
这可能是你问题中的拼写错误,但在你的exec语句中你需要在配置之前有两个破折号:
-–config=/var/www/html/.s3cfg
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.