Thursday, May 15, 2008

symfony sync

when the project get into production stage, upload the site and upgrade becoming a big problem.

symfony using rsync to do it.

more reference is on:

http://www.symfony-project.org/askeet/1_0/22

http://www.symfony-project.org/forum/index.php/m/50719/?srch=rsync#msg_50719

the 2nd link above is about the solution in Windows

Monday, May 05, 2008

how to get s3 work with symfony

I've tried the s3 plugin, but had no luck. So I started to use the example from IBM on http://www.ibm.com/developerworks/library/os-php-amzmm/index.html
actually, this example is very similar to the official example on http://developer.amazonwebservices.com/connect/entry.jspa?externalID=847&categoryID=137
there's some problem, the solution is on: http://developer.amazonwebservices.com/connect/thread.jspa?threadID=17692

I added the s3 class into lib\myTools.php
installed PEAR package: Crypt_HMAC and HTTP_Request

made 2 changes:
replace 'DATE_RFC822' with 'S3_DATE_RFC822' as my version of PHP (5.2.0) won't allow me to redefine this variable.
commented below out:
/*
        if ( strlen( $contenttypestring ) )

            $contenttypestring = $contenttypestring.",application/x-www-form-urlencoded";

        else if ( $verb == "PUT" )

            $contenttypestring = "application/x-www-form-urlencoded";
*/

Friday, May 02, 2008

symfony amazons3 plugin

this plugin is now on: http://trac.symfony-project.com/wiki/sfAmazonS3Plugin
but you cannot install it if you follow the instruction on the page.

to install it, refer to: http://www.mail-archive.com/symfony-users@googlegroups.com/msg04571.html

or do my way:
create an empty folder on desktop
right click and use svn to checkout
http://svn.symfony-project.com/plugins/sfAmazonS3FSPlugin

and save it as
plugins/sfAmazonS3FSPlugin