fixes for lighttpd and php 5.4