PHP download fixes