Pages

Showing posts with label Amazon. Show all posts
Showing posts with label Amazon. Show all posts

Sunday, August 18, 2013

Amazon Cloud-AMI Machines-Setup PHP and mysql on Amazon Cloud

In my case I needed to install -mcrypt library to decrypt passwords

I used

yum install php libmcrypt libmcrypt-devel php-mcrypt php-mbstring

The best complete tutorial I got was here

http://calebogden.com/wordpress-on-linux-in-the-amazon-cloud-with-mac/

Wednesday, July 17, 2013

Amazon S3-RequestTimeTooSkewed The difference between the request time and the current time is too large

Recently while working on a Project which had a hosting on Amazon Cloudfront, Storage on S3 and Streaming from Amazon EC2.I came across an issue which went ok initially but became a 2 day R&D Topic for my team after a server shutdown and Reset...

While requesting bucket I got a strange error from Amazon

"RequestTimeTooSkewed The difference between the request time and the current time is too large"

I checked everything from security credentials to bucket name finally going to Amazon Support where I came to knew that i was the fault of my system clock.

Our Systems must sync to NTP-Network Time Protocol in order to sync with Amazon Cloud Services..

My server

Centos which is redhat/suse based

Here is how i resolved the same

First and foremost I installed ntp again to be on safer side and make sure every stone in path was carved to needs

Install NTP
Yum install ntp

Check from config NTP is On
Chkconfig ntpd on

If everything is going well without any warnings till now its time to finalize

Sync Server time with amazon ntp

You have to check by trying to access your bucket and adding file to it after each and every sync with following servers..its like hit and try depending on your region.

ntpdate -u 0.amazon.pool.ntp.org
ntpdate -d 0.amazon.pool.ntp.org

ntpdate -u 1.amazon.pool.ntp.org
ntpdate -d 1.amazon.pool.ntp.org

ntpdate -u 2.amazon.pool.ntp.org
ntpdate -d 2.amazon.pool.ntp.org

ntpdate -u 3.amazon.pool.ntp.org
ntpdate -d 3.amazon.pool.ntp.org

That's it that solved my issue out

Friday, May 10, 2013

Upload Files to Amazon S3(Simple Storage) using PHP

Recently I was working on a project which required to upload files on Amazon Simple storage service which is S3

The 2 tutorials which worked perfectly for me are mentioned in links as follows

http://www.9lessons.info/2012/08/upload-files-to-amazon-s3-php.html

http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/


The latest SDK has somefor PHP 2 has some limitations I will point further...