core icon indicating copy to clipboard operation
core copied to clipboard

PHP Warnung/Message "filesize() stat failed..." in logs

Open dietmaroc opened this issue 13 years ago • 8 comments

Related to: https://github.com/owncloud/core/issues/4452?source=cc ?

Expected behaviour

A warning / message of a failed filesize() funktion should not occoure in owncloud.log

Actual behaviour

Warnings /Messages inside owncloud.log: The Messages occure with files of all sizes.

Steps to reproduce

  1. upload files
  2. watch owncloud.log on server

Server configuration

Operating system: Ubuntu 13.04 Web server: Apache Database: MySQL PHP version: 5.4.9 ownCloud version: 5.0.11 Just realized i have only 5.0.11 RC2

Client configuration

Browser:

Operating system:

Logs

Web server error log

- Logfile from a 5.0.11 server as described above:
...
{"app":"PHP","message":"filesize(): stat failed for \/var\/www\/5011\/owncloud\/data\/dfk\/files\/uploadfile8GB.iso at \/var\/www\/5011\/owncloud\/lib\/files\/storage\/local.php#74","level":2,"time":"2013-09-09T10:12:47+00:00"}
{"app":"PHP","message":"copy(\/var\/www\/5011\/owncloud\/data\/dfk\/files\/uploadfile8GB.iso): failed to open stream: No such file or directory at \/var\/www\/5011\/owncloud\/lib\/files\/storage\/local.php#143","level":2,"time":"2013-09-09T10:12:47+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for \/var\/www\/5011\/owncloud\/data\/dfk\/files\/uploadfile8GB.iso at \/var\/www\/5011\/owncloud\/lib\/files\/storage\/local.php#92","level":2,"time":"2013-09-09T10:12:47+00:00"}
...

- Customers log on a 5.0.10 Server: {"installed":"true","version":"5.0.17","versionstring":"5.0.10","edition":"Enterprise"}

>> Warning  PHP  filesize(): stat failed for
> /mnt/oc_storage/klein-wiele-j/files/Test222/OSCwebDI.exe.backupFromWebupdate
> at /srv/www/htdocs/owncloud/lib/files/storage/local.php#74
> 2013-09-10T05:38:40+00:00




#### ownCloud log (data/owncloud.log)

Insert your ownCloud log here


#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log b) The network log c) ...

dietmaroc avatar Sep 18 '13 10:09 dietmaroc

@dietmaroc

  1. Do the files exist?
  2. Is the path to the files valid?
  3. Can the web server user access the files and the folders?

DeepDiver1975 avatar Sep 18 '13 10:09 DeepDiver1975

@DeepDiver1975

  1. Do the files exist? It did, but it has been removed. It cannot determined, how|when it has been removed
  2. Is the path to the files valid? no longer
  3. Can the web server user access the files and the folders? I have one in use: Generally he can: new uploads are visible and can be removed but: the Message/Warning could not be reproduced so far.

dietmaroc avatar Sep 18 '13 12:09 dietmaroc

Just reslized I have only 5.0.11 RC2

dietmaroc avatar Sep 18 '13 12:09 dietmaroc

before trying to reproduce please install xdebug on the system because I need to know which function is actually triggering the error - with xdebug we get the call trace in the web server log

DeepDiver1975 avatar Sep 18 '13 13:09 DeepDiver1975

Considering the filename uploadfile8GB.iso, this is likely a problem with 32bit PHP. filesize() fails to files bigger than 2 GiB on 32bit PHP.

bantu avatar Oct 14 '13 20:10 bantu

@karlitschek This is likely not related to #4452.

bantu avatar Oct 14 '13 21:10 bantu

@dietmaroc Can you tell us more about your environment? Is this a 32bit or 64bit system? The following script may help you find out whether your PHP configuration is 32bit or 64bit. https://gist.github.com/bantu/4d33ab72d96742f559c7/raw/2fb7a54a2f4c2f00b0703c32d0487e142f5f0560/php_int_size.php An output of int(8) means it is 64bit.

bantu avatar Oct 14 '13 21:10 bantu

Closing this due to lack of feedback.

bantu avatar Aug 04 '14 13:08 bantu