///////////// fp = fopen(logFile."/log.txt", "a"); flock(fp, 2); $ren= rename(logFile."/log.txt", logFile.$time); flock($this->fp, 3); ////////////////////////////////////////
This code is making the system to hang( deadlock, since i am locking the file and then trying to rename the file). Is there a better solution to achieve the same functionality. Thanks Regards, Puru