October 26th, 2013, 02:46 AM
Waiting for Process to complete
I am currently writing a upload script with limitation that the actual destination is not a server. So I am using intermediate server to copy temporary file from this server to destination using "exec" ( /usr/bin/sudo cp source destination )
This works perfectly fine. but the problem is , Since I am using "uploadify" lib; it just marks the process complete before exec() completes so won't give proper output & in background it copies the file.
What I want here is to wait till exec completes its execution. ?
or is there any alternative approach for this ?
October 26th, 2013, 04:10 AM
Originally Posted by ryand
In fact, I will rephrase my question here...
How to get status of copy command until it reaches to 100% ?
October 27th, 2013, 12:06 PM
exec waits for the command to execute before your PHP moves on to the next line. Why do you believe it's not doing this?
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.