I am David Hamilton. Programmer. (without imported items) http://soup.maracuja.co.uk/ I am David Hamilton. Programmer. (without imported items) http://soup.maracuja.co.uk/ http://asset.soup.io/asset/0173/4971_6774.jpeg 64 64 Hi my name is David, I speak Korean and program in PHP. I drink lattes and post on humhum. WHAT AN INDIVIDUAL PERSONALITY. 안녕. 대철이라고 해. 난 한국말 말하고 PHP로 프로그램밍 해. 카패 랕태 먹고 HumHum으로 수다 더려. 어메이징! php curl s3 tarzan select/poll returning error ok for the last couple of days i've been blighted by an odd error that is affecting the staging server of one of my sites. i've been using the awesome AWS framework Tarzan to send files to S3 and everything was running fine up to christmas. i left for the christmas break and had a great time etc, but came back and the site no longer worked.<div><br /></div><div>after much searching and debugging i finally tracked the problem down to curl producing this error "select/poll returning error". not tremendously helpful and no response seemed to be coming back either which really puzzled me*. thing is the code worked absolutely fine on my local machine.</div><div><br /></div><div>anyway fruitless google searches, i decided to download the latest version of tarzan and just test a file upload in isolation on the staging server. what a good idea THAT was. it immediately gave me a skewed time error, which as it turns out, was the problem causing the uploads to fail.</div><div><br /></div><div>the system time on my staging server had become 15 minutes out of sync with amazon's server time. as soon as i update my server's time to The Actual Time™ my uploads started working again.</div><div><br /></div><div>Now I don't my server to lose track of time again so I did a little research found out about a neat wee app that keeps time for you called NTP and here's how you install it ...</div><div><br /></div><div>$ sudo yum install ntp</div><div>$ sudo /usr/sbin/ntpdate pool.ntp.org</div><div>$ sudo /sbin/service ntpd start</div><div><br /></div><div>i'm going to go and relax with a coffee now</div><div><br /></div><div>* when i use words like puzzled or tricky, what i mean is i was screaming, shouting and throwing things across the room in a primeval rage</div>Wed, 06 Jan 2010 11:27:33 GMThttp://soup.maracuja.co.uk/post/40564066/php-curl-s3-tarzan-select-poll-returningurn:www-soup-io:1:40564066regularphpcurls3tarzanselect poll returning erroraws host-only and nat forwarding remember to add an extra line in your ubuntu guest /etc/network/interfaces if you're planning to use multiple network adaptors!<br /><br />*jazzhands*Fri, 11 Dec 2009 12:47:40 GMThttp://soup.maracuja.co.uk/post/37583959/host-only-and-nat-forwardingurn:www-soup-io:1:37583959regularvboxleopardubuntuhost-onlynatnetworkadaptormultiple adaptors Two Memcached Instances on the Same Box (redhat/centos) 1. Create new config files<br /><br />&gt; sudo cp /etc/init.d/memcached /etc/init.d/memcached_2<br />&gt; sudo vi /etc/init.d/memcached_2<br /><br />change all mentions of memcached to memcached_2<br /><br />&gt; sudo cp /etc/sysconfig/memcached /etc/sysconfig/memcached_2<br />&gt; sudo vi /etc/sysconfig/memcached_2<br /><br />PORT="12212"<br /><br />2. set up the new instance as an executable and a service<br /><br />&gt; sudo ln -s /usr/bin/memcached /usr/bin/memcached_2<br />&gt; sudo ln -s /etc/init.d/memcached_2 /etc/rc0.d/K20memcached_2<br /><br />you have to check your rcX.d memcache file for the K## number, I don't particularly understand the numbering so I've set my second memcache instance to the same K## value.Fri, 30 Oct 2009 14:48:22 GMThttp://soup.maracuja.co.uk/post/33031656/Two-Memcached-Instances-on-the-Same-Boxurn:www-soup-io:1:33031656regular Two Memcached Instances on the Same Box (debian/ubuntu) <strong>1. Create new config files</strong><br /><br />&gt; sudo cp /etc/init.d/memcached /etc/init.d/memcached_2<br />&gt; sudo vi /etc/init.d/memcached_2<br /><br /> <em>DAEMON=/usr/bin/memcached_2</em><br /><em>DAEMONBOOTSTRAP=/usr/share/memcached/scripts/start-memcached_2</em><br /><em>NAME=memcached_2</em><br /><em>DESC=memcached_2</em><br /><br />&gt; sudo cp /usr/share/memcached/scripts/start-memcached /usr/share/memcached/scripts/start-memcached_2<br />&gt; sudo vi /usr/share/memcached/scripts/start-memcached_2<br /><br /> <em>my $params; my $etchandle; my $etcfile = "/etc/memcached_2.conf";</em><br /><em> my $memcached = "/usr/bin/memcached_2";</em><br /><em> my $pidfile = "/var/run/memcached_2.pid";</em><br /><br />&gt; sudo cp /etc/memcached.conf /etc/memcached_2.conf<br />&gt; sudo vi /etc/memcached_2.conf<br /><br /><em>-p 12212</em><br /><br /><strong>2. set up the new instance as an executable and a service</strong><br /><br />&gt; sudo ln -s /usr/bin/memcached /usr/bin/memcached_2<br />&gt; sudo ln -s /etc/init.d/memcached_2 /etc/rc0.d/K20memcached_2Fri, 30 Oct 2009 14:42:06 GMThttp://soup.maracuja.co.uk/post/33031091/Two-Memcached-Instances-on-the-Same-Boxurn:www-soup-io:1:33031091regular note to self: NAT forwarding in virtual box for tomcat VBoxManage setextradata "Ubuntu 9" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Tomcat/Protocol" TCP<br />VBoxManage setextradata "Ubuntu 9" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Tomcat/GuestPort" 8080<br />VBoxManage setextradata "Ubuntu 9" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Tomcat/HostPort" 9090<br /><br />(Apache is coming out of port 8080)Wed, 02 Sep 2009 21:57:36 GMThttp://soup.maracuja.co.uk/post/27283306/note-to-self-NAT-forwarding-in-virtualurn:www-soup-io:1:27283306regular quick install of phpunit on ubuntu because i really need to get going on this code generator thing (the ultimate goal of which is mvc-based php projects deployed using CI /marketing) i needed to get into phpunit as i'm going to use that as my test framework.<br /><br />"this is all very wonderful", you might be thinking to yourself. yes, but the main reason for posting as always is to leave somewhere where i can retrace my steps if i ever need to repeat the phpunit setup :p<br /><br />i didn't have pear setup on my php vanilla install so i installed that and also updated it because for some reason it brought down v1.7 when i needed 1.8 ...<br /><br />sudo apt-get update<br />sudo apt-get install php-pear<br />pear upgrade pear<br />pear channel-discover pear.phpunit.de<br />pear install phpunit/PHPUnit<br /><br />that should do it. phpunit and pear should both run from the command line.Sun, 30 Aug 2009 12:28:24 GMThttp://soup.maracuja.co.uk/post/26897977/quick-install-of-phpunit-on-ubuntuurn:www-soup-io:1:26897977regular running symfony on ubuntu (guest) through virtualbox i'm running apache off a mounted directory in a guest ubuntu install inside virtualbox. symfony was throwing me alsorts of errors that didn't seem to make sense ...<br /><br /><b>Warning</b><em>: copy(/home/htdocs/myproject/cache/frontend/dev/config/config_autoload.yml.php) [</em><a href="http://localhost:8080/orqi.co.uk/web/frontend_dev.php/function.copy">function.copy</a><em>]: failed to open stream: Permission denied in </em><b>/home/htdocs/myproject/lib/vendor/symfony/lib/config/sfConfigCache.class.php</b><em> on line </em><b>356</b><br /> <br /> <b>Warning</b><em>: chmod() [</em><a href="http://localhost:8080/orqi.co.uk/web/frontend_dev.php/function.chmod">function.chmod</a><em>]: No such file or directory in </em><b>/home/htdocs/myproject/lib/vendor/symfony/lib/config/sfConfigCache.class.php</b><em> on line </em><b>362</b><br /> <br /> <b>Warning</b><em>: sfAutoload::include(/home/htdocs/myproject/cache/frontend/dev/config/config_autoload.yml.php) [</em><a href="http://localhost:8080/orqi.co.uk/web/frontend_dev.php/sfautoload.include">sfautoload.include</a><em>]: failed to open stream: No such file or directory in </em><b>/</b><b>home/htdocs/myproject</b><b>/lib/vendor/symfony/lib/autoload/sfAutoload.class.php</b><em> on line </em><b>114</b><br /> <br /> <b>Warning</b><em>: sfAutoload::include() [</em><a href="http://localhost:8080/orqi.co.uk/web/frontend_dev.php/function.include">function.include</a><em>]: Failed opening '/home/htdocs/myproject/cache/frontend/dev/config/config_autoload.yml.php' for inclusion (include_path='/home/htdocs/myproject:/home/htdocs/myproject/lib/vendor/symfony/lib:/home/htdocs/myproject/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor:.:/usr/share/php:/usr/share/pear') in </em><b>/home/htdocs/myproject/lib/vendor/symfony/lib/autoload/sfAutoload.class.php</b><em> on line </em><b>114</b><br /> <br /> <b>Fatal error</b><em>: Class 'sfPropelDatabase' not found in </em><b>/home/htdocs/myproject/cache/frontend/dev/config/config_databases.yml.php</b><em> on line </em><b>6</b><br /><br />basically apache was running as www-data (as i usually just leave it like that on local machines) and it didn't have the right access to the cache directories.<br /><br />there also seems to be some problem running chmod on directories in the mounted directory structure from terminal.<br /><br />anyway i changed apache to run as my main user in ubuntu and everything is fine now.<br /><br />x x xThu, 20 Aug 2009 13:31:11 GMThttp://soup.maracuja.co.uk/post/26035738/running-symfony-on-ubuntu-guest-through-virtualboxurn:www-soup-io:1:26035738regular Teh internets helped us make some new friends at Poke New York yesterday. Som... <p><a href="http://beta.stinkdigital.tv/blog/"><img alt="2869_4b4b_400" height="300" src="http://asset.soup.io/asset/0409/2869_4b4b_400.jpeg" width="400" /></a></p> <p><p>Teh internets helped us make some new friends at Poke New York yesterday. Some of us (above) used their neat <a href="http://live.pokenewyork.com/" title="Poke ny's live page">webcam broadcast feature</a> to talk to some of them.</p> <p>Then some of them tweeted right back at us: <a href="http://twitter.com/MeganNutt/status/2912567111" title="Megan's status update">http://twitter.com/MeganNutt/status/2912567111</a> and <a href="http://twitter.com/lobese/status/2912566837" title="Monica's status">http://twitter.com/lobese/status/2912566837</a></p></p>Thu, 30 Jul 2009 14:23:12 GMThttp://soup.maracuja.co.uk/post/24243059/Teh-internets-helped-us-make-some-newurn:www-soup-io:1:24243059image Education i'm finding technology a bit overwhelming these days. there's always more to learn and i'm fine with that. the problem is what do i learn and why do i want to learn it? i'm short on time so i've got to pick the right stuff plus i don't have any particular problems to solve bar wanting to raise my daily rates, which leaves me the only option of going after the frameworks du jour :/Sat, 18 Apr 2009 17:33:18 GMThttp://soup.maracuja.co.uk/post/17496598/Educationurn:www-soup-io:1:17496598regular Celtic 2 Rangers 0 <p><a href="http://news.bbc.co.uk/sport1/hi/football/scot_cups/7941624.stm">http://news.bbc.co.uk/sport1/hi/football/scot_cups/7941624.stm</a></p>Sat, 21 Mar 2009 11:11:27 GMThttp://soup.maracuja.co.uk/post/15939047/Celtic-2-Rangers-0urn:www-soup-io:1:15939047link here is my school <br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=eh9&amp;sll=37.0625,-95.677068&amp;sspn=31.28862,85.957031&amp;ie=UTF8&amp;t=h&amp;layer=c&amp;cbll=55.937813,-3.20932&amp;panoid=XIhht5Z4ZUI_4QO540K4qw&amp;cbp=12,26.148885528358832,,0,-8.983799705449186&amp;ll=55.937952,-3.1814&amp;spn=0.006658,0.018303&amp;z=14&amp;iwloc=addr">View Larger Map</a></small>Sat, 21 Mar 2009 11:07:34 GMThttp://soup.maracuja.co.uk/post/15938881/here-is-my-schoolurn:www-soup-io:1:15938881regular ipod touch iphone belkin wpa wifi problem have you got a belkin router and your ipod touch or iphone are having problems connecting to your wireless router via wifi?<br /><br />perhaps you just need a firmware update!<br /><a href="http://www.belkin.com/support/download.asp?lang=1&amp;download=F5D6230-3">http://www.belkin.com/support/download.asp?lang=1&amp;amp;download=F5D6230-3</a><br /><br />i updated the firmware on my F5D7632-4 and all is well [h]Wed, 10 Dec 2008 14:23:37 GMThttp://soup.maracuja.co.uk/post/9201434/ipod-touch-iphone-belkin-wpa-wifi-problemurn:www-soup-io:1:9201434regular today's match against everton was an emotional rollercoaster. <p><a href=""><img alt="8113_8049_400" height="275" src="http://asset.soup.io/asset/0185/8113_8049_400.jpeg" width="400" /></a></p> <p>today's match against everton was an emotional rollercoaster.</p>Sun, 07 Dec 2008 20:35:35 GMThttp://soup.maracuja.co.uk/post/8970449/todays-match-against-everton-was-an-emotionalurn:www-soup-io:1:8970449image AWESOME result at celtic considering how pants my Hibs side are. (don't tell ... <p><a href=""><img alt="0340_c1b4_400" height="324" src="http://asset.soup.io/asset/0181/0340_c1b4_400.png" width="400" /></a></p> <p>AWESOME result at celtic considering how pants my Hibs side are. (don't tell the players lol)</p>Sat, 29 Nov 2008 16:06:23 GMThttp://soup.maracuja.co.uk/post/8014274/AWESOME-result-at-celtic-considering-how-pantsurn:www-soup-io:1:8014274image great away result at birmingham - although 9 points off the playoff places :/ <p><a href=""><img alt="0336_a988_400" height="323" src="http://asset.soup.io/asset/0181/0336_a988_400.png" width="400" /></a></p> <p>great away result at birmingham - although 9 points off the playoff places :/</p>Sat, 29 Nov 2008 16:04:24 GMThttp://soup.maracuja.co.uk/post/8014166/great-away-result-at-birmingham-although-9urn:www-soup-io:1:8014166image (Image) <p><a href=""><img alt="4829_a413" height="433" src="http://asset.soup.io/asset/0172/4829_a413.gif" width="325" /></a></p> <p></p>Fri, 14 Nov 2008 01:55:18 GMThttp://soup.maracuja.co.uk/post/6885890/Imageurn:www-soup-io:1:6885890image