Activating the bundled PHP server on Mac OS X (Snow Leopard)

2 01 2010

Here is what I did on OS X 10.6.2, assuming that you already have bundled Apache web-server running – if not do this: Apple menu > System Preferences and click Sharing. Select the Web Sharing checkbox.)

1. Open up a terminal window and execute:

sudo nano /private/etc/apache2/httpd.conf

2. Uncomment – the line:

LoadModule php5_module libexec/apache2/<a href="http://libphp5.so" target="_blank">libphp5.so</a>

3. Add the following to handle php files:

<IfModule mod_php5.c>
# If php is turned on, we respect .php and .phps files.
AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps
# Since most users will want index.php to work we
# also automatically enable index.php
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>

4. Restart the web-server:

sudo apachectl graceful

5. My root folder for my webserver is: /Library/WebServer/Documents. Create a PHP test file (e.g. phptest.php) which contains one line:

<?php phpinfo(); ?>

6. Test PHP http://localhost/phptest.php





Lomography FishEye 2 – Test spool 1

10 12 2009

Photobucket

I finally got a chance to get my first spool of film from my Lomography FishEye 2 developed at my local photo place, and then got them to create some low-res digitals (1024 x 1536). I used basic film… Kodak Gold 35mm ASA200 (36 exposures).

I had to ditch many of my shots, as they were simply too dark. The underexposure was due to the low ASA rating of the film, so I would recommend that you use atleast ASA400 – which it’ll try soon.

Here are some idea’s of cost:

1. Kodak Gold ASA200 film (36 exposures) – S$5
2. 35mm Development – $3.50
3. JPG 4 Base scan (inc. CD) – $7.90

Here are some of the useable results I got:

Read the rest of this entry »





Removing a colon : from a Windows directory

4 11 2009

Problem:

Ok, so check this out… I somehow got a colon (:) in a directory folder name on my Windows 7 RC1 box. Why do I care you ask? because I could not access the folder’s contents, as colon in Windows is reserved for device names, such as disk partitions C:,D: etc.

Windows - Colon in directory name

Windows would not allow be to rename, delete, move this folder. If I executed a DIR /X, which shows legacy 8 character MS-DOS directory names, it came up without a short name – not good. I can only imagine that this directory name was created  by one of the MP3 tagging tools I’ve used, which may use a non-standard API call for creation of the directory.

Solution:

After trying a bunch of things under the Windows environment I gave up and brought out the big guns… Went to www.ubuntu.com and downloaded the latest ISO image and burnt it to CD. I booted up of on the live CD, and simply went into the default file manager app and renamed the folder. Done.

Ubuntu saves that day!

P.S. Don’t laugh too hard at the unfortunate example of my music collection… this album is often played in our bedroom after a long day to help put us to sleep… it does the job well!





DD-WRT executing system commands remotely using cURL

29 10 2009

post-2250-1238359496
What you need:

1. A router loaded with DD-WRT.
2. cURL – http://curl.haxx.se/ (Windows users may be able to get a precompiled binary with this google search query)
3. The IP address of your router (default is usually 192.168.1.1)
4. The Web GUI username & password of your router.

Here’s is the syntax, just replace the information in red (Note that spaces in your system command must be replaced with + signs):

curl http://192.168.1.1/apply.cgi -d "submit_button=Ping&action=ApplyTake&submit_type=start&change_action=gozila_cgi&next_page=Diagnostics.asp&ping_ip=your+system+command" -u username:password

Here is an example to add a static route, using the typical username/password combination:

curl http://192.168.1.1/apply.cgi -d "submit_button=Ping&action=ApplyTake&submit_type=start&change_action=gozila_cgi&next_page=Diagnostics.asp&ping_ip=route+add+-net+21.5.128.0+netmask+255.255.128.0+dev+ppp0" -u admin:admin





Apple TV – My music solution

27 10 2009

Apple TVA while back I posted about a little test I did comparing the Sonos ZP90 and AirTunes using an Apple airport express. The remote control for both of these solutions was the respective free app on the iPhone OS platform.

To recap my previous post… Sonos is the best home audio solution, but costs the most. AirTunes using an Apple Airport Express was much less expensive, but had some short comings – the biggest being that the iTunes client (PC/MAC) needs to be open in order to stream the music. After further research, I found a solution that fit the budget and gives me everything I need… the Apple TV.

The name “Apple TV” leads one to believe it’s a video playback device (which it is), but paired with the free Apple remote app on the iPhone OS… it turns into a great living room music device, without even having to put your TV on.

Pro’s:
1. Self contained – No reliance on a PC/Mac or NAS to be on during operation, as it has it’s own internal disk (160GB in my case). The Apple TV syncs just like an iPod, but even better, it can sync over WiFi.
2. Inexpensive – It costs US$229 on the US Apple store. The Apple remote app is free. No need to purchase a NAS.
3. More than just audio – Access to iTunes extensive library of movies & TV shows.
4. Hackable – Load up boxee and stream internet services such as  Hulu (US only), BBC (UK only) and many others. Also you’ll be play your own non-iTunes video content (divx, xvid etc) streaming from your PC/NAS – or via a local copy on the Apple TV.
5. Integrated – It stays in sync with my iTunes library, which means I’ll have access to podcasts, playlists, playcounts, ratings and of course the Genius feature for music recommendation.

Con’s:
1. No true multi-room support. This is in Sonos’s DNA and can be expanded to multi-room support, at a cost.
2. Does not support many audio formats natively. Boxee helps here a bit, but my collection is all MP3 so that’s fine with me.
3. Does not provide access to some of the more popular audio streaming services, such as Rhapsody, Napster, SIRIUS, Pandora etc.

The remote app is really the thing that makes this (and the Sonos) solution work so well. All music navigation is done within the app and all music can be controlled from anywhere within the home (within, WiFI coverage of course). From within the Apple app  - you’ll have access to all iTunes functions including: playlists, Genius, playcounts, ratings etc. As your TV will not need to be on, you will not consume much power

So far I’m very happy with this solution, and would recommend it to any music lover who has an existing Home WiFi network, iPhone/iPod Touch, amplifier (A/V receiver) of some kind and is using Apple iTunes today.

Does not support many audio formats. My collection is all MP3, so… no biggie.
Does not provide access to some of the more popular audio streaming services, such as Rhapsody, Napster, SIRIUS, Pandora etc.





Flickr Upload: Analogue photography

15 10 2009

Analogue photography

For our 2nd year anniversary Lindi got me something I’ve wanted for a while, but I never considered it practical enough to justify the purchase being film and all. So here it is a 35mm film based Lomography Fish Eye 2 camera. I’m looking forward to playing with this crazy 10mm equiv fish-eye and getting some films developed! If you don’t know what lomography is… here are the 10 “golden rules”:

1. Take your camera everywhere you go.
2. Use it any time – day and night.
3. Lomography is not an interference in your life, but part of it.
4. Try the shot from the hip.
5. Approach the objects of your Lomographic desire as close as possible.
6. Don’t think.
7. Be fast.
8. You don’t have to know beforehand what you captured on film.
9. Afterwards either.
10. Don’t worry about any rules.

So really, it’s just a more care-free style of photography which does not worry about technical excellence, and actually embraces visual flaws… but most importantly it’s about capturing our lives. I’m looking forward to dropping the DSLR every now and then, and having some fun!





iPhone 3.1 Bug: No auto reconnect to hidden SSID wireless networks

14 10 2009

Sad iPhone

Problem: I’ve got an iPhone 3G running 3.1.2(7D11) and I use a WLAN network at our office which does not broadcast it’s SSID for obscurity security reasons. Since some version, I guess 3.1, when I get within range of the SSID hidden network it no longer auto connects. Frustrating.

Solution: Apple to fix it in the next version I guess.

“Work around”: Not really a workaround, but a sightly less frustrating way of reconnecting… when in range of the network… recreate the network by entering the SSID and leave out any of the security stuff then click Join. The join will fail (for obvious reasons), but will then “remind” the phone that that network exists and will then connect using the previously configured settings.





Canon EOS 400D & EFS 17-85mm Err99

15 09 2009

Er99The symptom:

My Canon EOS 400D (XTi in the states) along with my EFS 17-85mm f/4-5.6 was giving the famous Err 99 – “Shooting is not possible. Turn the power switch to <OFF> and <ON> again or re-install the battery” when I fully depressed the shutter button. It did not do it at all times, and also the problem did not occur with my EF 50mm f/1.8.

The problem:

I found through a process of elimination that the problem (Err 99) would only occur on the wide angle (17-35mm) when using an aperture smaller than f/4. So I guessed that either the lens was the problem, or perhaps the communication between the lens and body. I cleaned the contact points with an eraser… but no go… same problem.

The solution:

Took both the out-of-warranty body and lens into the Canon Service Centre in Singapore. They found the problem to be with the len’s power diaphragm assembly, and replaced it as a cost of S$111.28 (Part S$24, Labor S$80 & GST S$7.28). They also did a great job cleaning the internal lens elements and external housing, so it looks as good as new now.

Unrelated they found my focus screen on the body to be really scratched too, and replaced it for S$26.75 (Part S$5, Labor S$20 & GST S$1.75).

Image credit to Rowen Atkinson





Canon lenses – How they are made

9 09 2009

After watching this video on how Canon lenses, and in particular the EF 500mm F4L (~USD10K) are made… I can appreciate why these things are so damn expensive!

Part 1:

Part 2:

Part 3:





Linksys WRT54G Wireless Ethernet Bridge

6 09 2009

I found that our PS3’s streaming was pretty bad using it’s internal radio, so I setup a wireless bridge using two LinkSys WRT54G’s. One was a version 7 (non-hackable), and the other a version 4 (hackable). I loaded HyperWRT onto the V4 in order to activate the ‘wireless ethernet bridge’ mode.

After PS3 is wired directly into the V4 box, and establishing a wireless bridge between the routers… streaming has improved considerably. Here is view of things today:

Internet -wired-> *WRT54G v7* -wireless->*WRT54G v4* -wired-> PS3

I put the improvement down to the router’s having proper external antenna’s and prehaps more powerful radios. Here are the settings and firmware versions I used:

Main router
Firmware version: 7.00.6
Internet connection: Auto

LAN IP: 192.168.1.1
Mask: 255.255.255.0
DHCP server: Enabled

SSID: whateveryoulike
SSID broadcast: enable

Security: WPA Personal
WPA Alogrithm: AES
WPA Shared Key: whateveryoulike

Bridge router
Firmware version: 4.30.1, HyperWRT 2.1b1 +tofu13c
Internet connection: Disabled

LAN IP: 192.168.1.2
LAN Gateway: 192.168.1.1
LAN Mask: 255.255.255.0
DHCP server: disabled

Wirless mode: Wireless Ethernet Bridge
SSID: same as main WLAN network
SSID broadcast: enable

Security: WPA Personal
WPA Alogrithm: AES
WPA Shared Key: same as main WLAN network