Archive for June, 2007

Development web server, domain setup

Thursday, June 7th, 2007

I have a development server on my local network that runs Symfony. When starting a new project, I add a new virtual host configuration to Apache and an entry in Windows’ Hosts file. The entries are similar to the following.

On my Ubuntu box, in /etc/apache2/apache2.conf add

<VirtualHost *>
ServerName PROJECTNAME
DocumentRoot "/var/www/PROJECTNAME/web"
DirectoryIndex index.php
Alias /sf /usr/share/php/data/symfony/web/sf

<Directory "/var/www/PROJECTNAME/web">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>

On my Windows machine, in C:\WINDOWS\system32\drivers\etc\hosts add

192.168.SERVERIPADDRESS PROJECTNAME

This will allow me to type the URL PROJECTNAME into my browsers address bar. The biggest benefit of this is the similarity between relative paths for my development sever and my production server.

!important iePNGfix bug

Wednesday, June 6th, 2007

I found my first browser bug. Unfortunately, the bug surfaces in a browser that is fastly becoming obsolete, IE6 - I say that with great pleasure - and it is also a quasi-bug because the bug only surfaces with the famous iepngfix.htc hack to make PNGs work in IE6. I haven’t investigated the bug yet. I will when time permits, but, in a nutshell, if you are used the aforementioned hack on CSS background images and use the keyword !important, then the hack won’t work. You’ll get a ~20% gray background color instead of a nice clean transparent image.

Streaming Flash Video

Wednesday, June 6th, 2007

I don’t do much video stuff, but this post on streaming FLVs via PHP at FlashGuru seems like it could be pretty handy. If you are encoding a video into an FLV, the word on the street is that Sorenson Media’s Squeeze for Flash is the best encoder.