Yelotofu

Yelotofu ~ “In building standards compliant sites we are creating a better Web for the future.”

Archive for February 8th, 2007

Quick tip: upload_tmp_dir on Win2k

If you are running PHP as a module on a Win2k server remember to set the upload_tmp_dir in your php.ini to a folder that allows the Anonymous Internet User read/write permissions. Otherwise you'd end up with 0.0 byte files when performing PHP uploads...By default the upload_tmp_dir is set to %windir%\temp if no value is given. This system folder is normally restricted to known Admin and User accounts only, hence files that are uploaded via PHP are not saved to the filesystem. You may notice stat failed warnings if you try performing file operations on uploaded files.

To resolve this problem you should either give Anonymous users access to the %windir%\temp folder (not recommended) or create a folder in D:\uploads, if you have a D drive that is, and point your upload_tmp_dir to it, then give Anonymous users access to the new folder.

@font-face reloaded

@font-face is W3C's answer to font embedding. It was introduced as a CSS2 standard but later dropped in CSS2.1. You might remember the font embedding hype 2 or 3 years ago that just died off silently. The problem with @font-face at the time was the inconsistency of implementation across browsers, even the font type could not be agreed upon. It's an ingenious idea none-the-less hence its new and improved self is back in force for CSS3!**Nowadays it's trendier, or should I say sexier, to show whose daddy by being most compliant rather than inventing propriety extensions to kill off the competition. A prime example is the launch of IE7, a great improvement from IE6 by the way. We’re seeing a new twist in Microsoft's approach to browser development. No longer is it the Microsoft way that all should follow but they're finally kneeling to the W3C god and listening to what we want! So this time round I'm adamant. When browsers do finally support @font-face again, which would probably be many years from now, it would be much closer to standard and more importantly - work! Finally could we bin the alternatives like FIR, sIFR and dynamic text replacement techniques.

**Web fonts are still in W3C Working Draft so there's no guarantee that @font-face will definately be back in force!