Installing Apache + MySQL + PHP on Windows 7 64Bit

December 16, 2009 · Posted in General · Comment 

The process is pretty straight-forward, except for a few bumps along the way. The majority of problems were caused by the Access Control functionality of Win 7. Make sure your text editor is running with admin rights. Without which you’ll not be able to save any edits to the config files.

The first issue was during Apache (2.2.14-x86) install; kept getting the following error:

Errors reported here must be corrected before the service can be started.
httpd.exe: Could not reliably determine the server's fully qualified domain name ,
using 192.168.1.3 for ServerName (OS 10048)
Only one usage of each socket address (protocol/network address/port) is normally permitted.
: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available,
shutting down Unable to open logs
Note the errors or messages above, and press the key to exit. 24...

After 10mins of trying to figure out the problem with no success, did a search and found that this was due to port 80 being used by another program – typically Skype! Which made sense as I had Skype running. Once I quit Skype and restarted Apache, everything started up smoothly.

Next, I wanted to get my virtual hosts setup. I like to keep my virtuals in their own separate file – 1 file per host. This is pretty easy to setup – just direct Apache to load up additional conf files with an “Include” directive.

NOTE: There’s a sample virtual host config file included with the Apache install in “conf/extra” folder, which may be modified to your needs.

Open the default httpd.conf and add the following to the end of it.

# Setup virtual hosts
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "D:/webapps/_root"
<Directory />
        Order Allow,Deny
        Allow from all
</Directory>
</VirtualHost>
Include "D:/webapps/_virtuals/*.conf"

Next, create blog.conf file with the following content. Make sure to give it a meaningful name – something like blog.sprit3.conf, so that it can be located easily. Save the file in the _virtuals folder.

<VirtualHost *:80>
ServerName blog.sprit3.net
DocumentRoot "D:/webapps/www/blog.sprit3"
<Directory />
        Order Allow,Deny
        Allow from all
</Directory>
</VirtualHost>

By default Apache will deny any requests to the virtual folders unless allowed explicitly. Hence the <Directory> tag.

Save this in the _virtuals folder and restart Apache. Verify if virtuals are running properly by entering “httpd -S” via the command prompt.

Next step is to add the virtual host address to the local host file so that any requests to blog.sprit3.net will be directed to my localhost instead of the live site. Windows hosts file is located at %SystemRoot%/system32/drivers/etc folder.

That should get the virtual folder running and all the web apps nicely organised!

Google translate – simply amazing!

December 14, 2009 · Posted in General · Comment 

Google Translate

…one step closer to a wearable “Universal Translator”!

Fluid sculpture

May 5, 2009 · Posted in Coolspot, General · Comment 

First time I’ve ever seen anything like this, looks awesome!

Fluid Sculpture from Charlie Bucket on Vimeo.

Flickr Architecture | High Scalability

March 11, 2009 · Posted in Database, General · Comment 

While I was considering how I would go about storing images for an app I’m building, I thought “wonder what approach Flickr takes?”. A quick search, and I find this greatly insightful post, which just boggles my mind!

Till now, I didn’t know that Flickr is built on LAMP – what a testament if there ever was one?!

Directly manipulating videos

February 17, 2009 · Posted in General, Video · Comment 

Bump top – desktop prototype

February 17, 2009 · Posted in General · Comment 

FLV MIME type with IIS

December 11, 2008 · Posted in General, Video · Comment 

This is something I often have to do when setting up a new server, if you’re planning on using FLV video with the site:

  1. Open properties and “HTTP Headers” tab
  2. Select “File types”->”New type”
  3. Enter .flv for extension and “video/x-flv” for content type

Pretty simple, but if you forget to do, could leave you scratching your head for some time, thinking “Now, why don’t my f#$@ing video player work?!”.

WMODE and Color Transfom weirdness…

November 30, 2008 · Posted in General, JavaScript · Comment 

Just the other day, while I was building a Flash site, I noticed that the color transform that I was applying to my menu items did not work in FF (ver 3 in this case, not sure same across versions), but worked fine in IE and standalone Flash player.

I figured it would have to be caused by the embed code, and after playing around and changing params around, I found that it was due to the wmode param. If I set it to either “opaque” or “transparent” the transform failed to show. But worked fine when set to “window”, the default value. It seems strange that all other thing worked except for the transform?! What is it about it that would stop it working in the other wmodes…?

The winning code:

       <script type="text/javascript">
            // <![CDATA[
                var flashVars = {
                };
                var params = {
                      wmode: 'window'
                    , allowscriptaccess: "sameDomain"
                }
                 var attributes = {
                      id: 'flashcontent'
                };
                var expressInstall = false;
                swfobject.embedSWF( "main.swf", "flashcontent", "100%", "100%", "9.0.115", expressInstall, flashVars, params, attributes );
            // ]]>
        </script>

The LED – A movie about the origins of the LED and how to make your own from carborundum!

November 24, 2008 · Posted in General · Comment 


MAKE presents: The LED from make magazine on Vimeo.

From the tank…

August 25, 2008 · Posted in General · Comment 

My little aquarium!

Added a few more plants over the weekend ( thanks Akka!!). Its made it a lot more interesting for the fish. They seem to be enjoying all the cover.

Current fish:

  • 1 x Flame Gurami
  • 2 x Pacific blue eye
  • 1 x Corrydora
  • 1 x Flying fox

Next Page »