Fix error with write context in php_for_upload