PHP-5.5 tmp fixes