Can I lock a file to stop it from opening when the GD library accesses it?
What I'm looking for is similar to the isolation level of the "serialzable" database ... I want only one session / user to access the image at a time to stop the dirty reading.
My application allows users to add a larger image.
, eg
- large image is empty
- Raj and Janet upload their images
- The Raj Session opens a large image.
- 1 ms later, Janet opens a large image.
- Raj Session Adds Your Image and Saves a Large Image
- 1 ms after the session, Janet adds his image and saves his version of a large image.
- As a result, the Raj image is not in the final image as the Janet version overwritten it.
I hope this will be clear enough.
Pablo source
share