php and folder operations on unix
Posted: Thu Mar 04, 2010 2:43 am
Hello everybody,
I have got a question concerning php and large file operations in unix.
I want to move folders with php from a directory to another.
That could be a whole folder tree with several files, for example 5gb or more.
I want to do this with an url that can be started remotly
example: http://.../move.php?source=developmentPlatform&destination=livePlatform&password=sha256hash
I know about the copy function of php, but it can be very slow and I run into timeouts sometimes.
I found out about the system commands, that you can embed in php to do unix operations.
Unfortunately I think system commands dont return any true or false in case of success or failure, which makes error handling and statehandling quite a challenge.
Is php the right language to do this? I read about perl but do not have any experience with it. Would you recommend perl and cgi?
How would you solve this problem?
Is there a way to get success or failure back from system commands to evaluate it in php?
Are there any ready-to-use-module that I could combine with my php modules?
thx for your answers and patience
toby
I have got a question concerning php and large file operations in unix.
I want to move folders with php from a directory to another.
That could be a whole folder tree with several files, for example 5gb or more.
I want to do this with an url that can be started remotly
example: http://.../move.php?source=developmentPlatform&destination=livePlatform&password=sha256hash
I know about the copy function of php, but it can be very slow and I run into timeouts sometimes.
I found out about the system commands, that you can embed in php to do unix operations.
Unfortunately I think system commands dont return any true or false in case of success or failure, which makes error handling and statehandling quite a challenge.
Is php the right language to do this? I read about perl but do not have any experience with it. Would you recommend perl and cgi?
How would you solve this problem?
Is there a way to get success or failure back from system commands to evaluate it in php?
Are there any ready-to-use-module that I could combine with my php modules?
thx for your answers and patience
toby