Undefined index: id and mimetype
I'm getting this on Apache's error.log (it's not shown on the browser):
PHP Notice: Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
I can use the webpage regardless.
Environment: HomeServer - Ubuntu 12.10 Server: Apache/2.2.22 (Ubuntu) Database: MySQL Ver 14.14 Distrib 5.5.28, for debian-linux-gnu Client: OwnCloud Sync Client 1.1.2 (Windows XP) OwnCloud: 4.5.3 PHP: 5.4.6-1ubuntu1
Do you know what led to it? Does those messages always occur?
I have just installed the 4.5.3 version from the opensuse repository yesterday and it's been reporting these errors since then.
And yes, it is printing those 3 messages (there is another mimetype error on line 359) every time:
[Wed Nov 28 16:25:57 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Wed Nov 28 16:25:57 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
[Wed Nov 28 16:25:59 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 359
[Wed Nov 28 16:25:59 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Wed Nov 28 16:25:59 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
[Wed Nov 28 16:26:23 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 359
[Wed Nov 28 16:26:23 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Wed Nov 28 16:26:23 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
[Wed Nov 28 16:26:25 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 359
[Wed Nov 28 16:26:26 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Wed Nov 28 16:26:26 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
Same problem here:
[Thu Nov 29 09:29:11 2012] [error] [client 79.7.229.94] PHP Notice: Undefined index: mimetype in /var/www/cloud/lib/filecache.php on line 359
I have this error only opening a shared directory from the browser
Ubuntu 12.04 Postgresql 9.1 Client Sync 1.1.2 (Windows/Mac) OwnCloud: 4.5.3
@MTGap @schiesbn might be related to files sharing, could you have a look?
With owncloud 5 pre alpha there isn't the problem.
Until now I'm not able to reproduce this errors. Did you upgrade ownCloud from a previous version or was it a fresh installation?
I just had a quick look at the code and it seems like all "undefined index" errors come from lines introduced by this commit: https://github.com/owncloud/core/commit/3e20032a322f4f97931eca7fbad3416d4b5fb6c4
@icewind1991 do you have any idea what could cause this errors?
I had a prior version installed but I have removed the folders (web and data) and dropped the database (MySQL) before installing the new version from the opensuse repository:
http://software.opensuse.org/download/package?project=isv:ownCloud:community&package=owncloud
Here has the similar problem. Fresh installation on version 4.5.3 on centos 5 php: 5.3.17 mysql: 5.5.21
My scenario: user1 with folder: ProjectA shared to user2 with create permission
user2 logged in and try to upload file to Shared/ProjectA/ The upload progress bar is shown and file will be appeared, however, checking the web server log and following Error message was shown [Fri Nov 30 16:47:36 2012] [error] [client 192.168.1.81] PHP Notice: Undefined index: mimetype in /var/www/owncloud/apps/files/ajax/upload.php on line 56, referer: http://owncloud/?app=files&dir=%2FShared%2FProjectA [Fri Nov 30 16:47:36 2012] [error] [client 192.168.1.81] PHP Notice: Undefined index: size in /var/www/owncloud/apps/files/ajax/upload.php on line 56, referer: http://owncloud/?app=files&dir=%2FShared%2FProjectA
Once clicked the ProjectA folder, the uploaded file will be disappear. Also, there is no file created in data store.
Hope this information will help.
I now tried it with a complete new 4.5.3 installation and still can't reproduce it (but I'm using the tar file provided at owncloud.org, not the opensuse packages) . Are you using the web interface or the sync client? Please make sure that the "create" permission is set on the shared folder.
Finally I was able to reproduce at least some of the error messages, those in line 359.
The error in line 359 happen because the file versions are added to our file cache. If this is true than it might be fixed once https://github.com/owncloud/core/issues/327 is backported to stable45.
Can you disable the "Versions" app and check if the error messages still appear? Since I can't reproduce the other errors messages this would be helpful to isolate the problem.
I'm still getting the errors on line 371 and 373, but it looks like the error on 359 disappears after disabling Versions:
[Fri Nov 30 21:47:13 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: id in /var/www/owncloud/lib/filecache.php on line 371
[Fri Nov 30 21:47:13 2012] [error] [client x.x.x.x] PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
I just wanted to give a little background on a similar issue we are having. We were running into issues with a zip folder running on the client sync and kept getting PHP Warning: ZipArchive::locateName(): Invalid or unitialized Zip object in /var/www/html/owncloud/lib/archive/zip.php on line 141 log entries. We disabled the Archive support feature and immediately started getting the undefined mimetype and undefined id entries on lines 371, 373, and 359.
this issue is duplicated as #661. We are using a clean install from gentoo, which downloads the tar directly from owncloud. For us it is causing #648, forever spinners on uploads. If I simply return from the increaseSize functions(increaseSize:355) the forever spinners go away.
Please try ownCloud 4.5.4 and report back if the problem still exists
At least the error on line 371 and 373 still happens (when uploading with the desktop client):
[Tue Dec 04 23:46:56 2012] [error] [client x.x.x.x] PHP Notice: Undefined
index: id in /var/www/owncloud/lib/filecache.php on line 371
[Tue Dec 04 23:46:56 2012] [error] [client x.x.x.x] PHP Notice: Undefined
index: mimetype in /var/www/owncloud/lib/filecache.php on line 373
It seems that I'm not getting the error on line 359 anymore though.
fixed undefined indexes for me with 4.5.4 but I still have the forever spinning upload. #648
Finally I was able to reproduce the other error messages too. All of them should be fixed once this pull request is merged: https://github.com/owncloud/core/pull/710
reproduce thix bug too
PHP Notice: Undefined index: mimetype in /var/www/owncloud/lib/filecache.php on line 359
owncloud version 4.5.4
the bug fix is not yet released but prepared for the next bug fix release.
Any update on this? I am running OC 4.5.6 and still see the dreaded "PHP Notice: Undefined index: mimetype in /var/www/html/discovirt/lib/filecache.php on line 362"