Re: move_uploaded_file locks?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew H. North wrote:
Can't find this in the PHP docs, so: does anyone know whether move_uploaded_file locks the target file during the process?

If move_uploaded_file does a rename within the same filesystem this isn't an issue (on unix, anyway, the O/S just reassigns inodes rather than copying data). But if it does a copy instead, or if it has to rename across filesystems, any process that tries to read or write the file before move_uploaded_file completes could be munging things.

I don't *think* it does any locking, it just calls the system functions to handle the rename (so yeh across partitions/file systems it will do a copy).

The internals list might be able to give a more precise answer..

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux