Writing files on VIP Go

On VIP Go it is not possible for PHP to write files to any part of the system except the system temporary directory. We recommend that you avoid writing files even to the system temporary directory, but we recognise that sometimes this is necessary, and in these cases you must follow these conditions:

  • You can only write to the system temp directory. Use get_temp_dir() to find the right path.
  • Files need to be removed by the end of the request that created them. Use unlink() to remove your files.
  • Files can only be relied on for the duration of the current request.
    • Each request may be served by a different container, and the sequence of requests from a given user are not guaranteed to be served by the same container
    • We don’t guarantee that a given container will be around for any length of time; containers may be created and destroyed due to autoscaling at any point

 

If you have any questions, please don’t hesitate to get in touch to discuss your requirements.

Ready to get started?

Tell us about your needs

Let us lead the way. We’ll help you select a top tier development partner. We’ll train your developers, operations, infrastructure, and editorial teams. We’ll coarchitect your deployment processes. We will provide live support for peak events. We’ll help your people avoid dark alleys and blind corners, and reduce wasted cycles.