Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27588

Warning shown when renaming files in concurrency situations

    Details

      Description

      The following warning is shown in rare situations on the customer's page: "Warning: unlink(var/log/error.log.1): No such file or directory in /var/www/xxx/ezpublish_legacy/lib/ezfile/classes/ezfile.php".
      Unfortunately, I wasn't able to reproduce it on local installation but based on this information I think I know why it is happening and I have a good idea what can be done to fix it.
      In my opinion, the warning is the result of the log rotation. Theoretically, if two rotations for the same file are run simultaneously, there could be a case that a file is already moved. If that's the case, there actually could be a warning thrown from this line: https://github.com/ezsystems/ezpublish-legacy/blob/master/lib/ezfile/classes/ezfile.php#L172.
      The easiest fix would be to add the error suppression operator "@" before the unlink function, just like it is done above (https://github.com/ezsystems/ezpublish-legacy/blob/master/lib/ezfile/classes/ezfile.php#L157).

        Activity

        Show
        Jacek Foremski (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-legacy/pull/1305
        Hide
        Jacek Foremski (Inactive) added a comment -

        Closing the ticket for now as the issue no longer appears for the customer.

        Show
        Jacek Foremski (Inactive) added a comment - Closing the ticket for now as the issue no longer appears for the customer.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jacek Foremski (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: