ugly php4 vs php5 compatibility issue. the sooner php4 goes away the better