How to get Amazon s3 PHP SDK working? -


i'm trying set s3 first time , trying run sample file comes php sdk creates bucket , attempts upload demo files it. error getting:

the difference between request time , current time large. 

i read on question on because amazon determines valid request comparing times between server , client, 2 must within 15 min span of 1 another.

now here problem. laptop's time 12:30am june 8, 2012 @ moment. on server created file called servertime.php , placed code in file:

<?php    print strftime('%c'); ?> 

and output is:

fri jun 8 00:31:22 2012 

it looks day correct don't know make of 00:31:22. in case, how possible make sure time between client , server within 15 minute window of 1 another. if have user in china wishes upload file on site uses s3 cdn. time difference on day. how can make sure user's times within 15 minutes of server time? if user in u.s. time on machine misconfigured.

basically how s3 bucket creation , upload work?

place ec2 instance , s3 bucket inside same region , make sure server has correct time:

debian/ubuntu

// install ntp apt-get install ntp ntpdate 

centos/fedora

// install ntp yum install ntp  // turn on service chkconfig ntpd on  // synchronize system clock 0.pool.ntp.org server ntpdate pool.ntp.org  // start ntp /etc/init.d/ntpd start 

that should fix problems.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -