I am in the process of migrating a lot of files in a large PHP application from local to remote storage. File operations are being transitioned using PHP stream wrappers as an intermediate solution so that we can easily change calls such as fopen('/local/file/path')
to fopen('scheme://remote/file/path')
.
So far I've come across only one feature which is broken by this, which is the GD image library (its file write methods such as imagejpeg, imagegif and imagepng will not write to file streams).
In addition, PHP security options deny include()
and require()
calls on URLs.
I've tried looking for a list of known incompatibilities but can't find one.
I already have several workarounds available, so I'm covered there, and we'll perform extensive testing, but I would like to know in advance of any pain points if someone's been through the same process before.
Specifically, we are using PHP 5.3.6 on Debian Squeeze.