We have developed a web application and integrated with log4php, which is used by hundred of users. When the size of log file exceed the maximum file size, it calls rollOver() function to create back up file for log file and truncate the current log file.
We faced one error while renaming the file from "filename" to "filename.1". This error is generated when hundred of users are accessing the application at the same time. The error is generated as below:
PHP Warning: rename(C:\PHP\errors/Test_Module.log,C:\PHP\errors/Test_Module.log.1) [<a href='function.rename'>function.rename</a>]: Permission denied in C:\Inetpub\wwwroot\Test_Application\System\System_Logger\log4php\src\main\php\appenders\LoggerAppenderRollingFile.php on line 140
Also, back up of log files are not created in sequence when above warning is generated. For example, log file "Test_Module.log" is already exists and rollOver() function is called to create new back up file then it creates "Test_Module.log.4" instead of "Test_Module.log.1".
Moreover, log file has given all the required permissions and it works fine while appending the logs.
We would appreciate if you can help us by providing a solution or work-around for resolving this issue.
Please let me know if more details are required.
|Field||Original Value||New Value|
|Fix Version/s||2.1 [ 12313917 ]|
|Fix Version/s||2.0 [ 12313916 ]|
|Assignee||Christian Grobmeier [ cgrobmeier ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|55d 2h 10m||1||Ivan Habunek||14/Jun/11 14:47|
|900d 20h 11m||1||Ivan Habunek||01/Dec/13 10:59|