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

Warning shown when renaming files in concurrency situations

    XMLWordPrintable

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).

      Attachments

        Activity

          People

            Unassigned Unassigned
            jacek.foremski-obsolete@ez.no Jacek Foremski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: